2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/gpu/drm/i915/gem
Brian Geffon fa6182c8b1
drm/i915: Fix page cleanup on DMA remap failure
When converting to folios the cleanup path of shmem_get_pages() was
missed. When a DMA remap fails and the max segment size is greater than
PAGE_SIZE it will attempt to retry the remap with a PAGE_SIZEd segment
size. The cleanup code isn't properly using the folio apis and as a
result isn't handling compound pages correctly.

v2 -> v3:
(Ville) Just use shmem_sg_free_table() as-is in the failure path of
shmem_get_pages(). shmem_sg_free_table() will clear mapping unevictable
but it will be reset when it retries in shmem_sg_alloc_table().

v1 -> v2:
(Ville) Fixed locations where we were not clearing mapping unevictable.

Cc: stable@vger.kernel.org
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Vidya Srinivas <vidya.srinivas@intel.com>
Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13487
Link: https://lore.kernel.org/lkml/20250116135636.410164-1-bgeffon@google.com/
Fixes: 0b62af28f2 ("i915: convert shmem_sg_free_table() to use a folio_batch")
Signed-off-by: Brian Geffon <bgeffon@google.com>
Suggested-by: Tomasz Figa <tfiga@google.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250127204332.336665-1-bgeffon@google.com
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
(cherry picked from commit 9e304a1863)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2025-02-03 09:26:49 -05:00
..
selftests treewide: Introduce kthread_run_worker[_on_cpu]() 2025-01-08 18:15:03 +01:00
i915_gem_busy.c
i915_gem_clflush.c
i915_gem_clflush.h
i915_gem_context_types.h
i915_gem_context.c
i915_gem_context.h
i915_gem_create.c
i915_gem_create.h
i915_gem_dmabuf.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
i915_gem_dmabuf.h
i915_gem_domain.c
i915_gem_domain.h
i915_gem_execbuffer.c drm/i915/display: convert skl_universal_plane.c to struct drm_gem_object 2024-09-19 16:19:42 +03:00
i915_gem_internal.c
i915_gem_internal.h
i915_gem_ioctls.h
i915_gem_lmem.c drm/i915: Remove deadcode 2024-12-30 01:31:31 +01:00
i915_gem_lmem.h drm/i915: Remove deadcode 2024-12-30 01:31:31 +01:00
i915_gem_mman.c drm/i915/gem: Calculate object page offset for partial memory mapping 2024-08-21 15:28:33 +02:00
i915_gem_mman.h
i915_gem_object_frontbuffer.h
i915_gem_object_types.h drm/i915: Replace double blank with single blank after comma in gem/ and gt/ 2024-08-08 11:40:41 +01:00
i915_gem_object.c
i915_gem_object.h Revert "drm/i915/dpt: Make DPT object unshrinkable" 2024-11-28 17:33:48 +02:00
i915_gem_pages.c
i915_gem_phys.c
i915_gem_pm.c drm/i915: use IS_ENABLED() instead of defined() on config options 2024-09-05 21:12:08 +03:00
i915_gem_pm.h
i915_gem_region.c
i915_gem_region.h
i915_gem_shmem.c drm/i915: Fix page cleanup on DMA remap failure 2025-02-03 09:26:49 -05:00
i915_gem_shrinker.c drm/i915: use NULL for zero wakeref_t instead of plain integer 0 2024-10-04 10:29:24 +03:00
i915_gem_shrinker.h
i915_gem_stolen.c drm/i915: remove IS_LP() 2024-10-02 12:06:20 +03:00
i915_gem_stolen.h
i915_gem_throttle.c
i915_gem_tiling.c
i915_gem_tiling.h
i915_gem_ttm_move.c drm/ttm: Move swapped objects off the manager's LRU list 2024-10-09 13:41:30 +02:00
i915_gem_ttm_move.h
i915_gem_ttm_pm.c drm/ttm: Move swapped objects off the manager's LRU list 2024-10-09 13:41:30 +02:00
i915_gem_ttm_pm.h
i915_gem_ttm.c Merge tag 'drm-intel-next-2024-10-11' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next 2024-10-18 09:13:31 +10:00
i915_gem_ttm.h
i915_gem_userptr.c
i915_gem_wait.c treewide: Fix wrong singular form of jiffies in comments 2024-09-08 20:47:40 +02:00
i915_gemfs.c
i915_gemfs.h