]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Move __i915_gem_free_object to ttm_bo_destroy
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 30 Aug 2021 12:09:48 +0000 (14:09 +0200)
committerJani Nikula <jani.nikula@intel.com>
Tue, 21 Sep 2021 10:36:34 +0000 (13:36 +0300)
commit001b16bd300fc0f0126f32f9893f6062074374b8
tree394e0f13c74ef91ad39d3bd35fcfc54c8feac5bc
parent676608b1758dc9076d37be5da642b48bf702f9a0
drm/i915: Move __i915_gem_free_object to ttm_bo_destroy

When we implement delayed destroy, we may have a second
call to the delete_mem_notify() handler, while free_object()
only should be called once.

Move it to bo->destroy(), to ensure it's only called once.
This fixes some weird memory corruption issues with delayed
destroy when async eviction is used.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210830121006.2978297-2-maarten.lankhorst@linux.intel.com
Fixes: 4379e2ccc2d5 ("drm/i915/ttm: Introduce a TTM i915 gem object backend")
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
(cherry picked from commit 48b0961269546716c3232748bf37e64e49fb866c)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/gem/i915_gem_ttm.c