linux/drivers/gpu/drm
Daniele Ceraolo Spurio 03552d8ac0 drm/xe/gsc: do not flush the GSC worker from the reset path
The workqueue used for the reset worker is marked as WQ_MEM_RECLAIM,
while the GSC one isn't (and can't be as we need to do memory
allocations in the gsc worker). Therefore, we can't flush the latter
from the former.

The reason why we had such a flush was to avoid interrupting either
the GSC FW load or in progress GSC proxy operations. GSC proxy
operations fall into 2 categories:

1) GSC proxy init: this only happens once immediately after GSC FW load
   and does not support being interrupted. The only way to recover from
   an interruption of the proxy init is to do an FLR and re-load the GSC.

2) GSC proxy request: this can happen in response to a request that
   the driver sends to the GSC. If this is interrupted, the GSC FW will
   timeout and the driver request will be failed, but overall the GSC
   will keep working fine.

Flushing the work allowed us to avoid interruption in both cases (unless
the hang came from the GSC engine itself, in which case we're toast
anyway). However, a failure on a proxy request is tolerable if we're in
a scenario where we're triggering a GT reset (i.e., something is already
gone pretty wrong), so what we really need to avoid is interrupting
the init flow, which we can do by polling on the register that reports
when the proxy init is complete (as that ensure us that all the load and
init operations have been completed).

Note that during suspend we still want to do a flush of the worker to
make sure it completes any operations involving the HW before the power
is cut.

v2: fix spelling in commit msg, rename waiter function (Julia)

Fixes: dd0e89e5ed ("drm/xe/gsc: GSC FW load")
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4830
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
Cc: <stable@vger.kernel.org> # v6.8+
Reviewed-by: Julia Filipchuk <julia.filipchuk@intel.com>
Link: https://lore.kernel.org/r/20250502155104.2201469-1-daniele.ceraolospurio@intel.com
(cherry picked from commit 12370bfcc4)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2025-05-08 12:44:41 -07:00
..
adp drm: adp: Remove pointless irq_lock spin lock 2025-04-28 14:17:53 -04:00
amd drm/amdgpu: Add DPG pause for VCN v5.0.1 2025-05-01 11:02:00 -04:00
arm Merge drm/drm-next into drm-misc-next 2025-02-18 07:43:43 +01:00
armada
aspeed drm/aspeed: move to devm_platform_ioremap_resource() usage 2025-02-26 15:27:06 +01:00
ast drm/ast: cursor: Move implementation to separate source file 2025-02-20 08:38:34 +01:00
atmel-hlcdc
bridge A set of final cleanups for the timer subsystem: 2025-04-06 08:35:37 -07:00
ci
clients printk: Rename console_start to console_resume 2025-03-11 12:51:21 +01:00
display drm for 6.15-rc1 2025-03-28 17:44:52 -07:00
etnaviv
exynos drm/exynos: Fix spelling mistake "enqueu" -> "enqueue" 2025-04-23 23:07:28 +09:00
fsl-dcu
gma500 drm for 6.15-rc1 2025-03-28 17:44:52 -07:00
gud treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
hisilicon
hyperv drm/hyperv: Fix address space leak when Hyper-V DRM device is removed 2025-03-09 23:46:56 +00:00
i915 drm/i915/pxp: fix undefined reference to `intel_pxp_gsccs_is_ready_for_sessions' 2025-04-22 10:55:38 +03:00
imagination Merge drm/drm-fixes into drm-misc-fixes 2025-04-08 10:15:47 +02:00
imx
ingenic drm/bridge: Pass full state to atomic_disable 2025-02-19 16:59:12 +01:00
kmb
lib
lima Driver core updates for 6.15-rc1 2025-04-01 11:02:03 -07:00
logicvc
loongson drm/atomic: Let drivers decide which planes to async flip 2025-02-14 00:54:29 +02:00
mcde
mediatek treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
meson drm/meson: use unsigned long long / Hz for frequency types 2025-04-22 09:23:58 +02:00
mgag200 drm/mgag200: Fix value in <VBLKSTR> register 2025-04-17 09:56:28 +02:00
msm Merge tag 'drm-msm-fixes-2025-04-18' of https://gitlab.freedesktop.org/drm/msm into drm-fixes 2025-04-19 15:09:29 +10:00
mxsfb
nouveau drm/nouveau: Fix WARN_ON in nouveau_fence_context_kill() 2025-04-23 17:38:25 +02:00
omapdrm treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
panel drm: panel: jd9365da: fix reset signal polarity in unprepare 2025-04-22 09:42:04 +02:00
panfrost
panthor drm/panthor: Clean up FW version information display 2025-03-05 14:15:04 +00:00
pl111
qxl
radeon drm/radeon/uvd: Replace nested max() with single max3() 2025-03-19 15:51:40 -04:00
renesas drm/bridge: Pass full state to atomic_disable 2025-02-19 16:59:12 +01:00
rockchip drm/rockchip: dw_hdmi_qp: Fix io init for dw_hdmi_qp_rockchip_resume 2025-04-10 10:51:06 +02:00
scheduler drm for 6.15-rc1 2025-03-28 17:44:52 -07:00
solomon
sprd
sti Merge drm/drm-fixes into drm-misc-fixes 2025-04-08 10:15:47 +02:00
stm drm/stm: move to devm_platform_ioremap_resource() usage 2025-02-26 15:27:07 +01:00
sun4i
tegra drm/atomic: Let drivers decide which planes to async flip 2025-02-14 00:54:29 +02:00
tests drm/tests: shmem: Fix memleak 2025-04-29 17:28:28 +02:00
tidss
tilcdc
tiny Short summary of fixes pull: 2025-03-24 17:52:28 +10:00
ttm drm/ttm: fix the warning for hit_low and evict_low 2025-04-28 10:01:03 +02:00
tve200
udl
v3d drm/v3d: Fix Indirect Dispatch configuration for V3D 7.1.6 and later 2025-04-10 15:28:02 -03:00
vboxvideo drm/vboxvideo: Remove unused hgsmi_cursor_position 2025-02-28 09:05:10 +01:00
vc4 treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
vgem treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
virtio virtgpu: don't reset on shutdown 2025-04-18 10:05:49 -04:00
vkms drm for 6.15-rc1 2025-03-28 17:44:52 -07:00
vmwgfx These are objtool fixes and updates by Josh Poimboeuf, centered 2025-04-02 10:30:10 -07:00
xe drm/xe/gsc: do not flush the GSC worker from the reset path 2025-05-08 12:44:41 -07:00
xen
xlnx drm/bridge: Pass full state to atomic_disable 2025-02-19 16:59:12 +01:00
drm_atomic_helper.c drm/atomic-helper: Add a note in drm_atomic_helper_reset_crtc() kernel-doc 2025-02-21 10:57:21 +01:00
drm_atomic_state_helper.c
drm_atomic_uapi.c drm for 6.15-rc1 2025-03-28 17:44:52 -07:00
drm_atomic.c
drm_auth.c
drm_blend.c
drm_bridge.c drm/bridge: Change parameter name of drm_atomic_bridge_chain_enable() 2025-02-19 16:59:20 +01:00
drm_buddy.c
drm_cache.c
drm_client_event.c drm/client: Send pending hotplug events after resume 2025-03-05 21:48:49 +01:00
drm_client_modeset.c
drm_client.c
drm_color_mgmt.c
drm_connector.c drm/atomic: Filter out redundant DPMS calls 2025-03-10 18:18:37 +02:00
drm_crtc_helper_internal.h
drm_crtc_helper.c
drm_crtc_internal.h
drm_crtc.c
drm_damage_helper.c drm/damage-helper: add const qualifier in drm_atomic_helper_damage_merged() 2025-03-03 14:45:40 +02:00
drm_debugfs_crc.c
drm_debugfs.c drm/debugfs: fix printk format for bridge index 2025-02-17 14:17:53 +01:00
drm_displayid_internal.h
drm_displayid.c
drm_draw_internal.h
drm_draw.c drm/draw: include missing headers 2025-03-01 21:00:22 +01:00
drm_drv.c drm: Introduce device wedged event 2025-02-13 12:15:43 -05:00
drm_dumb_buffers.c
drm_edid_load.c
drm_edid.c
drm_eld.c
drm_encoder.c
drm_exec.c
drm_fb_dma_helper.c drm/fb-dma-helper: Test for imported buffers with drm_gem_is_imported() 2025-03-06 08:59:17 +01:00
drm_fb_helper.c drm/fb-helper: Remove struct drm_fb_helper.fb_probe 2025-03-05 21:48:50 +01:00
drm_fbdev_dma.c drm/fbdev-dma: Add shadow buffering for deferred I/O 2025-02-27 09:37:55 +01:00
drm_fbdev_shmem.c
drm_fbdev_ttm.c
drm_file.c drm/fdinfo: Protect against driver unbind 2025-04-28 20:04:15 +02:00
drm_flip_work.c
drm_format_helper.c drm/format-helper: Add conversion from XRGB8888 to BGR888 2025-03-03 16:13:33 +01:00
drm_fourcc.c
drm_framebuffer.c
drm_gem_atomic_helper.c
drm_gem_dma_helper.c drm/gem-dma: Use dma_buf from GEM object instance 2025-03-06 08:59:01 +01:00
drm_gem_framebuffer_helper.c drm/gem-framebuffer: Use dma_buf from GEM object instance 2025-03-06 08:59:14 +01:00
drm_gem_shmem_helper.c drm/gem-shmem: Use dma_buf from GEM object instance 2025-03-06 08:59:07 +01:00
drm_gem_ttm_helper.c
drm_gem_vram_helper.c
drm_gem.c drm/gem: Test for imported GEM buffers with helper 2025-03-06 08:58:27 +01:00
drm_gpusvm.c drm/gpusvm: set has_dma_mapping inside mapping loop 2025-05-01 21:45:31 -05:00
drm_gpuvm.c
drm_internal.h
drm_ioc32.c
drm_ioctl.c
drm_kms_helper_common.c
drm_lease.c
drm_managed.c
drm_mipi_dbi.c drm/mipi-dbi: Fix blanking for non-16 bit formats 2025-04-29 17:29:49 +02:00
drm_mipi_dsi.c drm/mipi-dsi: stop passing non struct drm_device to drm_err() and friends 2025-03-04 17:00:24 +02:00
drm_mm.c
drm_mode_config.c
drm_mode_object.c
drm_modes.c
drm_modeset_helper.c
drm_modeset_lock.c
drm_of.c drm: of: drm_of_find_panel_or_bridge: move misplaced comment 2025-02-17 14:17:55 +01:00
drm_panel_backlight_quirks.c
drm_panel_orientation_quirks.c drm: panel-orientation-quirks: Add quirk for OneXPlayer Mini (Intel) 2025-02-17 09:19:07 +01:00
drm_panel.c drm/bridge: panel: forbid initializing a panel with unknown connector type 2025-02-17 14:17:59 +01:00
drm_panic_qr.rs Rust changes for v6.15 2025-03-30 17:03:26 -07:00
drm_panic.c Rust changes for v6.15 2025-03-30 17:03:26 -07:00
drm_pci.c
drm_plane_helper.c
drm_plane.c
drm_prime.c drm/prime: Use dma_buf from GEM object instance 2025-03-06 08:59:36 +01:00
drm_print.c
drm_privacy_screen_x86.c
drm_privacy_screen.c
drm_probe_helper.c
drm_property.c
drm_rect.c
drm_self_refresh_helper.c
drm_simple_kms_helper.c
drm_suballoc.c
drm_syncobj.c
drm_sysfs.c drm/sysfs: Constify 'struct bin_attribute' 2025-02-21 09:20:31 +01:00
drm_trace_points.c
drm_trace.h
drm_vblank_work.c
drm_vblank.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
drm_vma_manager.c
drm_writeback.c drm: writeback: Fix kernel doc name 2025-02-20 15:02:09 +01:00
Kconfig drm: Select DRM_KMS_HELPER from DRM_DEBUG_DP_MST_TOPOLOGY_REFS 2025-04-28 14:17:53 -04:00
Makefile UAPI Changes: 2025-03-11 10:26:17 +10:00