drm/prime: automatically set gem_obj->resv on import

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

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
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>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-42-daniel.vetter@ffwll.ch
This commit is contained in:
Daniel Vetter 2019-06-14 22:35:57 +02:00
parent 634cdf7fd9
commit 5f6ed9879a

View File

@ -899,6 +899,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;