linux/drivers/gpu/drm/i915/gem
Ville Syrjälä 760039c95c
drm/i915/frontbuffer: Move bo refcounting intel_frontbuffer_{get,release}()
Currently xe's intel_frontbuffer implementation forgets to
hold a reference on the bo. This makes the entire thing
extremely fragile as the cleanup order now depends on bo
references held by other things
(namely intel_fb_bo_framebuffer_fini()).

Move the bo refcounting to intel_frontbuffer_{get,release}()
so that both i915 and xe do this the same way.

I first tried to fix this by having xe do the refcounting
from its intel_bo_set_frontbuffer() implementation
(which is what i915 does currently), but turns out xe's
drm_gem_object_free() can sleep and thus drm_gem_object_put()
isn't safe to call while we hold fb_tracking.lock.

Fixes: 10690b8a49 ("drm/i915/display: Add intel_fb_bo_framebuffer_fini")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20251003145734.7634-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
(cherry picked from commit eb4d490729a5fd8dc5a76d334f8d01fec7c14bbe)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2025-10-13 14:08:41 -04:00
..
selftests Cross-subsystem Changes: 2025-09-12 12:17:10 +10:00
i915_gem_busy.c
i915_gem_clflush.c
i915_gem_clflush.h
i915_gem_context.c drm/i915: Replace kmalloc() + copy_from_user() with memdup_user() 2025-09-03 08:18:54 +01:00
i915_gem_context.h
i915_gem_context_types.h
i915_gem_create.c
i915_gem_create.h
i915_gem_dmabuf.c
i915_gem_dmabuf.h
i915_gem_domain.c
i915_gem_domain.h
i915_gem_execbuffer.c Merge drm/drm-next into drm-intel-next 2025-09-10 08:01:42 -04:00
i915_gem_internal.c
i915_gem_internal.h
i915_gem_ioctls.h
i915_gem_lmem.c
i915_gem_lmem.h
i915_gem_mman.c
i915_gem_mman.h
i915_gem_object.c drm/i915/gem: Clean-up outdated struct_mutex comments 2025-09-09 10:36:27 -04:00
i915_gem_object.h drm/{i915,xe}/panic: pass struct intel_panic to intel_panic_setup() 2025-09-08 14:23:46 +03:00
i915_gem_object_frontbuffer.h drm/i915/frontbuffer: Move bo refcounting intel_frontbuffer_{get,release}() 2025-10-13 14:08:41 -04:00
i915_gem_object_types.h
i915_gem_pages.c Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
i915_gem_phys.c
i915_gem_pm.c
i915_gem_pm.h
i915_gem_region.c
i915_gem_region.h
i915_gem_shmem.c drm/i915: set O_LARGEFILE in __create_shmem() 2025-09-23 08:52:15 +01:00
i915_gem_shrinker.c drm/i915/gem: Clean-up outdated struct_mutex comments 2025-09-09 10:36:27 -04:00
i915_gem_shrinker.h
i915_gem_stolen.c
i915_gem_stolen.h
i915_gem_throttle.c
i915_gem_tiling.c
i915_gem_tiling.h
i915_gem_ttm.c
i915_gem_ttm.h
i915_gem_ttm_move.c
i915_gem_ttm_move.h
i915_gem_ttm_pm.c
i915_gem_ttm_pm.h
i915_gem_userptr.c
i915_gem_wait.c Merge drm/drm-next into drm-intel-next 2025-09-10 08:01:42 -04:00
i915_gemfs.c change the calling conventions for vfs_parse_fs_string() 2025-09-04 15:20:51 -04:00
i915_gemfs.h