From b2ad978fd00467e8109918849a817018aaaeed19 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Thu, 25 Jul 2019 15:26:54 +0200 Subject: drm/amdgpu: Fill out gem_object->resv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit That way we can ditch our gem_prime_res_obj implementation. Since ttm absolutely needs the right reservation object all the boilerplate is already there and we just have to wire it up correctly. Note that gem/prime doesn't care when we do this, as long as we do it before the bo is registered and someone can call the handle2fd ioctl on it. Aside: ttm_buffer_object.ttm_resv could probably be ditched in favour of always passing a non-NULL resv to ttm_bo_init(). At least for gem drivers that would avoid having two of these, on in ttm_buffer_object and the other in drm_gem_object, one just there for confusion. Acked-by: Gerd Hoffmann Cc: Gerd Hoffmann Reviewed-by: Emil Velikov Signed-off-by: Daniel Vetter Cc: Alex Deucher Cc: "Christian König" Cc: Daniel Vetter Cc: "Michel Dänzer" Cc: Chris Wilson Cc: Huang Rui Cc: Felix Kuehling Cc: Andrey Grodzovsky Cc: Evan Quan Cc: Sonny Jiang Cc: Amber Lin Cc: "Michał Mirosław" Cc: Junwei Zhang Cc: Thomas Zimmermann Cc: Samuel Li Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20190725132655.11951-4-daniel.vetter@ffwll.ch --- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h') diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h index 7f73a4f94204..5012e6ab58f1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h @@ -34,7 +34,6 @@ struct dma_buf *amdgpu_gem_prime_export(struct drm_gem_object *gobj, int flags); struct drm_gem_object *amdgpu_gem_prime_import(struct drm_device *dev, struct dma_buf *dma_buf); -struct reservation_object *amdgpu_gem_prime_res_obj(struct drm_gem_object *); void *amdgpu_gem_prime_vmap(struct drm_gem_object *obj); void amdgpu_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr); int amdgpu_gem_prime_mmap(struct drm_gem_object *obj, -- cgit v1.2.1