linux-stable/drivers/gpu/drm/i915
Ville Syrjälä e339c6d628 drm/i915: Retry gtt fault when out of fence registers
If we can't find a free fence register to handle a fault in the GMADR
range just return VM_FAULT_NOPAGE without populating the PTE so that
userspace will retry the access and trigger another fault. Eventually
we should find a free fence and the fault will get properly handled.

A further improvement idea might be to reserve a fence (or one per CPU?)
for the express purpose of handling faults without having to retry. But
that would require some additional work.

Looks like this may have gotten broken originally by
commit 39965b3766 ("drm/i915: don't trash the gtt when running out of fences")
as that changed the errno to -EDEADLK which wasn't handle by the gtt
fault code either. But later in commit 2feeb52859 ("drm/i915/gt: Fix
-EDEADLK handling regression") I changed it again to -ENOBUFS as -EDEADLK
was now getting used for the ww mutex dance. So this fix only makes
sense after that last commit.

Cc: stable@vger.kernel.org
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9479
Fixes: 2feeb52859 ("drm/i915/gt: Fix -EDEADLK handling regression")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231012132801.16292-1-ville.syrjala@linux.intel.com
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
(cherry picked from commit 7f403caabe)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2023-10-17 22:08:54 -04:00
..
display drm/i915/cx0: Only clear/set the Pipe Reset bit of the PHY Lanes Owned 2023-10-17 22:08:49 -04:00
gem drm/i915: Retry gtt fault when out of fence registers 2023-10-17 22:08:54 -04:00
gt drm/i915: Don't set PIPE_CONTROL_FLUSH_L3 for aux inval 2023-10-04 09:00:29 -04:00
gvt ARM: 2023-09-07 13:52:20 -07:00
pxp drm/i915: Make i915_coherent_map_type GT-centric 2023-08-10 14:14:11 +02:00
selftests drm/i915: Make i915_coherent_map_type GT-centric 2023-08-10 14:14:11 +02:00
soc drm/i915/jsl: s/JSL/JASPERLAKE for platform/subplatform defines 2023-08-07 15:37:06 -07:00
.gitignore
i915_active_types.h
i915_active.c drm/i915: Fix premature release of request's reusable memory 2023-08-01 10:56:34 +01:00
i915_active.h
i915_cmd_parser.c
i915_cmd_parser.h
i915_config.c
i915_config.h
i915_debugfs_params.c
i915_debugfs_params.h
i915_debugfs.c drm/i915: separate display info printing from the rest 2023-06-29 16:28:14 +03:00
i915_debugfs.h
i915_deps.c
i915_deps.h
i915_driver.c drm for 6.6-rc1 2023-08-30 13:34:34 -07:00
i915_driver.h
i915_drm_client.c
i915_drm_client.h
i915_drv.h drm/i915/adls: s/ADLS_RPLS/RAPTORLAKE_S in platform and subplatform defines 2023-08-07 15:37:13 -07:00
i915_file_private.h
i915_fixed.h
i915_gem_evict.c
i915_gem_evict.h
i915_gem_gtt.c
i915_gem_gtt.h
i915_gem_ww.c
i915_gem_ww.h
i915_gem.c drm/i915: Register engines early to avoid type confusion 2023-10-04 09:00:34 -04:00
i915_gem.h
i915_getparam.c
i915_getparam.h
i915_gpu_error.c Merge tag 'drm-intel-gt-next-2023-08-04' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2023-08-07 13:49:25 +10:00
i915_gpu_error.h drm/i915: separate display info printing from the rest 2023-06-29 16:28:14 +03:00
i915_hwmon.c
i915_hwmon.h
i915_ioc32.c
i915_ioc32.h
i915_ioctl.c
i915_ioctl.h
i915_iosf_mbi.h
i915_irq.c drm/i915/irq: move all PCH irq postinstall calls to display code 2023-08-10 15:14:58 +03:00
i915_irq.h
i915_memcpy.c
i915_memcpy.h
i915_mitigations.c
i915_mitigations.h
i915_mm.c
i915_mm.h
i915_module.c
i915_params.c
i915_params.h
i915_pci.c Revert "drm/i915: use localized __diag_ignore_all() instead of per file" 2023-07-17 13:39:04 +01:00
i915_pci.h
i915_perf_oa_regs.h
i915_perf_types.h
i915_perf.c drm/i915: use direct alias for i915 in requests 2023-07-24 17:24:35 +02:00
i915_perf.h
i915_pmu.c
i915_pmu.h
i915_priolist_types.h
i915_pvinfo.h
i915_query.c
i915_query.h
i915_reg_defs.h
i915_reg.h Merge tag 'drm-intel-gt-next-2023-08-04' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2023-08-07 13:49:25 +10:00
i915_request.c drm/i915: mark requests for GuC virtual engines to avoid use-after-free 2023-08-30 11:32:48 -04:00
i915_request.h
i915_scatterlist.c
i915_scatterlist.h
i915_scheduler_types.h
i915_scheduler.c
i915_scheduler.h
i915_selftest.h
i915_suspend.c
i915_suspend.h
i915_sw_fence_work.c
i915_sw_fence_work.h
i915_sw_fence.c
i915_sw_fence.h
i915_switcheroo.c
i915_switcheroo.h
i915_syncmap.c
i915_syncmap.h
i915_sysfs.c
i915_sysfs.h
i915_tasklet.h
i915_trace_points.c
i915_trace.h drm/i915: use direct alias for i915 in requests 2023-07-24 17:24:35 +02:00
i915_ttm_buddy_manager.c
i915_ttm_buddy_manager.h
i915_user_extensions.c
i915_user_extensions.h
i915_utils.c
i915_utils.h
i915_vgpu.c
i915_vgpu.h
i915_vma_resource.c
i915_vma_resource.h
i915_vma_types.h
i915_vma.c drm/i915: Fix TLB-Invalidation seqno store 2023-08-22 11:21:29 -04:00
i915_vma.h drm/i915/fbc: Moved fence related code away from intel_fbc 2023-08-07 08:28:28 +03:00
intel_clock_gating.c drm/i915/kbl: s/KBL/KABYLAKE for platform/subplatform defines 2023-08-07 15:37:03 -07:00
intel_clock_gating.h
intel_device_info.c drm/i915: make device info a const pointer to rodata 2023-06-29 16:28:14 +03:00
intel_device_info.h drm/i915: move display device and runtime info to struct intel_display 2023-06-29 16:28:14 +03:00
intel_gvt_mmio_table.c
intel_gvt.c
intel_gvt.h
intel_mchbar_regs.h
intel_memory_region.c
intel_memory_region.h
intel_pci_config.h
intel_pcode.c
intel_pcode.h
intel_region_ttm.c
intel_region_ttm.h
intel_runtime_pm.c
intel_runtime_pm.h
intel_sbi.c
intel_sbi.h
intel_step.c drm/i915/adls: s/ADLS_RPLS/RAPTORLAKE_S in platform and subplatform defines 2023-08-07 15:37:13 -07:00
intel_step.h
intel_uncore.c drm/i915/uncore: fix race around i915->params.mmio_debug 2023-08-01 19:39:17 +03:00
intel_uncore.h drm/i915/uncore: add intel_uncore_regs() helper 2023-07-04 17:12:48 +03:00
intel_wakeref.c
intel_wakeref.h
Kconfig fbdev: Use _IOMEM_ infix for I/O-memory helpers 2023-07-31 20:06:52 +02:00
Kconfig.debug
Kconfig.profile
Makefile Merge tag 'drm-intel-gt-next-2023-08-04' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2023-08-07 13:49:25 +10:00
TODO.txt
vlv_sideband_reg.h
vlv_sideband.c
vlv_sideband.h
vlv_suspend.c
vlv_suspend.h