From aa77e7f6d5d1e8e22907370fdbfe7a3431b16bac Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Thu, 25 Jul 2019 15:26:53 +0200 Subject: drm/nouveau: Fill out gem_object->resv 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: Ben Skeggs Cc: nouveau@lists.freedesktop.org Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20190725132655.11951-3-daniel.vetter@ffwll.ch --- drivers/gpu/drm/nouveau/nouveau_prime.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'drivers/gpu/drm/nouveau/nouveau_prime.c') diff --git a/drivers/gpu/drm/nouveau/nouveau_prime.c b/drivers/gpu/drm/nouveau/nouveau_prime.c index 1fefc93af1d7..ec50017692d4 100644 --- a/drivers/gpu/drm/nouveau/nouveau_prime.c +++ b/drivers/gpu/drm/nouveau/nouveau_prime.c @@ -107,10 +107,3 @@ void nouveau_gem_prime_unpin(struct drm_gem_object *obj) nouveau_bo_unpin(nvbo); } - -struct reservation_object *nouveau_gem_prime_res_obj(struct drm_gem_object *obj) -{ - struct nouveau_bo *nvbo = nouveau_gem_object(obj); - - return nvbo->bo.resv; -} -- cgit v1.2.3