mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 07:03:03 +02:00
drm/i915: Test for imported buffers with drm_gem_is_imported()
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The test itself does not change. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Tvrtko Ursulin <tursulin@ursulin.net> Cc: intel-gfx@lists.freedesktop.org Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net> Link: https://lore.kernel.org/r/20260227133113.235940-5-tzimmermann@suse.de
This commit is contained in:
parent
8103ecc199
commit
945d0fec02
|
|
@ -371,12 +371,12 @@ void __i915_gem_object_pages_fini(struct drm_i915_gem_object *obj)
|
|||
* and ttm_bo_cleanup_memtype_use() shouldn't be invoked for
|
||||
* dma-buf, so it's safe to take the lock.
|
||||
*/
|
||||
if (obj->base.import_attach)
|
||||
if (drm_gem_is_imported(&obj->base))
|
||||
i915_gem_object_lock(obj, NULL);
|
||||
|
||||
__i915_gem_object_put_pages(obj);
|
||||
|
||||
if (obj->base.import_attach)
|
||||
if (drm_gem_is_imported(&obj->base))
|
||||
i915_gem_object_unlock(obj);
|
||||
|
||||
GEM_BUG_ON(i915_gem_object_has_pages(obj));
|
||||
|
|
@ -390,7 +390,7 @@ void __i915_gem_free_object(struct drm_i915_gem_object *obj)
|
|||
|
||||
bitmap_free(obj->bit_17);
|
||||
|
||||
if (obj->base.import_attach)
|
||||
if (drm_gem_is_imported(&obj->base))
|
||||
drm_prime_gem_destroy(&obj->base, NULL);
|
||||
|
||||
drm_gem_free_mmap_offset(&obj->base);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user