[PATCH 41/59] drm/prime: automatically set gem_obj->resv on import

Daniel Vetter
2019-06-14T20:35:57Z

It's really the only reasonable thing to do, and it won't hurt drivers
which don't (yet) use drm_gem_object->resv.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
drivers/gpu/drm/drm_prime.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
index d545e681cb41..58d595f4a4f5 100644
--- a/drivers/gpu/drm/drm_prime.c
+++ b/drivers/gpu/drm/drm_prime.c
@@ -896,6 +896,7 @@ struct drm_gem_object *drm_gem_prime_import_dev(struct drm_device *dev,
}

obj->import_attach = attach;
+ obj->resv = dma_buf->resv;

return obj;

--
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org