mirror-linux/drivers/gpu/drm
Michal Wajdeczko 2ddbb73ec2 drm/xe/guc: Explicitly exit CT safe mode on unwind
During driver probe we might be briefly using CT safe mode, which
is based on a delayed work, but usually we are able to stop this
once we have IRQ fully operational.  However, if we abort the probe
quite early then during unwind we might try to destroy the workqueue
while there is still a pending delayed work that attempts to restart
itself which triggers a WARN.

This was recently observed during unsuccessful VF initialization:

 [ ] xe 0000:00:02.1: probe with driver xe failed with error -62
 [ ] ------------[ cut here ]------------
 [ ] workqueue: cannot queue safe_mode_worker_func [xe] on wq xe-g2h-wq
 [ ] WARNING: CPU: 9 PID: 0 at kernel/workqueue.c:2257 __queue_work+0x287/0x710
 [ ] RIP: 0010:__queue_work+0x287/0x710
 [ ] Call Trace:
 [ ]  delayed_work_timer_fn+0x19/0x30
 [ ]  call_timer_fn+0xa1/0x2a0

Exit the CT safe mode on unwind to avoid that warning.

Fixes: 09b286950f ("drm/xe/guc: Allow CTB G2H processing without G2H IRQ")
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20250612220937.857-3-michal.wajdeczko@intel.com
2025-06-24 22:27:12 +02:00
..
adp drm: convert many bridge drivers from devm_kzalloc() to devm_drm_bridge_alloc() API 2025-05-23 15:03:47 +02:00
amd drm/amdgpu: Make use of drm_wedge_task_info 2025-06-17 11:32:48 -03:00
arm drm/arm/hdlcd: Replace struct simplefb_format with custom type 2025-06-11 09:29:47 +02:00
armada
aspeed
ast Merge drm/drm-next into drm-misc-next 2025-06-11 09:01:34 +02:00
atmel-hlcdc
bridge drm/bridge: ti-sn65dsi86: use new GPIO line value setter callbacks 2025-06-16 17:10:25 -07:00
ci
clients drm/client: Include <linux/export.h> 2025-06-16 09:02:29 +02:00
display Merge tag 'drm-intel-next-2025-06-18' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next 2025-06-23 10:49:27 +10:00
etnaviv drm/sched: Store the drm client_id in drm_sched_fence 2025-05-28 16:15:58 +02:00
exynos treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
fsl-dcu
gma500 pci-v6.16-changes 2025-06-04 11:26:17 -07:00
gud treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
hisilicon pci-v6.16-changes 2025-06-04 11:26:17 -07:00
hyperv drm/hyperv: Add support for drm_panic 2025-06-05 14:59:56 +02:00
i915 Merge tag 'drm-intel-next-2025-06-18' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next 2025-06-23 10:49:27 +10:00
imagination drm/sched: Store the drm client_id in drm_sched_fence 2025-05-28 16:15:58 +02:00
imx drm/imx: Add i.MX8qxp Display Controller KMS 2025-05-14 15:11:31 +08:00
ingenic
kmb
lib drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
lima drm: Get rid of drm_sched_job.id 2025-05-28 16:16:15 +02:00
logicvc
loongson
mcde
mediatek Merge drm/drm-next into drm-misc-next 2025-06-11 09:01:34 +02:00
meson drm-misc-next for 6.17: 2025-06-18 08:09:35 +10:00
mgag200 Merge drm/drm-next into drm-misc-next 2025-06-11 09:01:34 +02:00
msm Merge drm/drm-next into drm-misc-next 2025-06-11 09:01:34 +02:00
mxsfb
nouveau Merge drm/drm-next into drm-misc-next 2025-06-11 09:01:34 +02:00
nova gpu: drm: nova: select AUXILIARY_BUS instead of depending on it 2025-05-15 20:59:32 +02:00
omapdrm drm: omapdrm: reduce clang stack usage 2025-06-12 21:29:52 +03:00
panel drm/panel: Include <linux/export.h> 2025-06-16 09:02:39 +02:00
panfrost drm/panfrost: Fix panfrost device variable name in devfreq 2025-06-02 13:51:15 +01:00
panthor drm/panthor: Clean up 64-bit register definitions 2025-06-06 12:44:41 +02:00
pl111
qxl
radeon drm fixes for 6.16-rc1 2025-06-06 08:09:56 -07:00
renesas drm: renesas: rz-du: mipi_dsi: Add function pointers for configuring VCLK and mode validation 2025-06-12 19:42:28 +01:00
rockchip drm/rockchip: cleanup fb when drm_gem_fb_afbc_init failed 2025-05-19 22:29:16 +02:00
scheduler drm/scheduler: Include <linux/export.h> 2025-06-16 09:02:41 +02:00
sitronix drm-misc-next for 6.17: 2025-06-18 08:09:35 +10:00
solomon
sprd
sti drm/sti: dvo: convert to devm_drm_bridge_alloc() API 2025-05-21 13:40:09 +02:00
stm drm/bridge: stm_lvds: convert to devm_drm_bridge_alloc() API 2025-05-21 13:40:09 +02:00
sun4i drm: sun4i: de33: mixer: add mixer configuration for the H616 2025-06-02 09:59:10 +02:00
sysfb drm/format-helper: Move drm_fb_build_fourcc_list() to sysfb helpers 2025-06-18 10:46:03 +02:00
tegra
tests drm/format-helper: Move drm_fb_build_fourcc_list() to sysfb helpers 2025-06-18 10:46:03 +02:00
tidss drm/tidss: Add support for AM62L display subsystem 2025-05-20 14:43:56 +03:00
tilcdc
tiny pci-v6.16-changes 2025-06-04 11:26:17 -07:00
ttm drm/ttm: Include <linux/export.h> 2025-06-16 09:02:44 +02:00
tve200
udl drm/udl: use DRM_GEM_SHMEM_DRIVER_OPS_NO_MAP_SGT 2025-06-03 09:21:02 +02:00
v3d Merge drm/drm-next into drm-misc-next 2025-06-11 09:01:34 +02:00
vboxvideo
vc4 drm-misc-next for 6.17: 2025-06-18 08:09:35 +10:00
vgem treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
virtio drm/virtio: Fix NULL pointer deref in virtgpu_dma_buf_free_obj() 2025-05-12 14:49:41 +03:00
vkms drm/vkms: Compile all tests with CONFIG_DRM_VKMS_KUNIT_TEST 2025-06-13 19:11:39 +02:00
vmwgfx drm/vmwgfx: Fix Host-Backed userspace on Guest-Backed kernel 2025-06-17 22:54:16 -04:00
xe drm/xe/guc: Explicitly exit CT safe mode on unwind 2025-06-24 22:27:12 +02:00
xen
xlnx drm: zynqmp_dp: convert to devm_drm_bridge_alloc() API 2025-05-21 13:40:09 +02:00
Kconfig pci-v6.16-changes 2025-06-04 11:26:17 -07:00
Kconfig.debug drm/format-helper: Move drm_fb_build_fourcc_list() to sysfb helpers 2025-06-18 10:46:03 +02:00
Makefile drm for 6.16-rc1 2025-05-28 09:46:39 -07:00
drm_atomic.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_atomic_helper.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_atomic_state_helper.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_atomic_uapi.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_auth.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_blend.c
drm_bridge.c drm/bridge: Include <linux/export.h> 2025-06-16 09:02:25 +02:00
drm_bridge_helper.c drm/bridge: Include <linux/export.h> 2025-06-16 09:02:25 +02:00
drm_buddy.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_cache.c
drm_client.c drm/client: Include <linux/export.h> 2025-06-16 09:02:29 +02:00
drm_client_event.c drm/client: Include <linux/export.h> 2025-06-16 09:02:29 +02:00
drm_client_modeset.c drm/client: Include <linux/export.h> 2025-06-16 09:02:29 +02:00
drm_color_mgmt.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_connector.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_crtc.c
drm_crtc_helper.c
drm_crtc_helper_internal.h
drm_crtc_internal.h
drm_damage_helper.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_debugfs.c drm/debugfs: Output client_id in in drm_clients_info 2025-05-28 16:15:56 +02:00
drm_debugfs_crc.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_displayid.c
drm_displayid_internal.h
drm_draw.c
drm_draw_internal.h
drm_drv.c drm: Create a task info option for wedge events 2025-06-17 11:32:47 -03:00
drm_dumb_buffers.c
drm_edid.c Merge tag 'drm-intel-next-2025-06-18' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next 2025-06-23 10:49:27 +10:00
drm_edid_load.c
drm_eld.c
drm_encoder.c
drm_exec.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_fb_dma_helper.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_fb_helper.c drm/client: Include <linux/export.h> 2025-06-16 09:02:29 +02:00
drm_fbdev_dma.c drm/client: Include <linux/export.h> 2025-06-16 09:02:29 +02:00
drm_fbdev_shmem.c drm/client: Include <linux/export.h> 2025-06-16 09:02:29 +02:00
drm_fbdev_ttm.c drm/client: Include <linux/export.h> 2025-06-16 09:02:29 +02:00
drm_file.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_flip_work.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_format_helper.c drm/format-helper: Move drm_fb_build_fourcc_list() to sysfb helpers 2025-06-18 10:46:03 +02:00
drm_format_internal.h drm/tests: Do not use drm_fb_blit() in format-helper tests 2025-06-18 10:46:02 +02:00
drm_fourcc.c drm: drm_fourcc: add 10/12/16bit software decoder YCbCr formats 2025-05-29 16:32:58 +01:00
drm_framebuffer.c
drm_gem.c drm/gem: Include <linux/export.h> 2025-06-16 09:02:35 +02:00
drm_gem_atomic_helper.c drm/gem: Include <linux/export.h> 2025-06-16 09:02:35 +02:00
drm_gem_dma_helper.c
drm_gem_framebuffer_helper.c drm/gem: Include <linux/export.h> 2025-06-16 09:02:35 +02:00
drm_gem_shmem_helper.c drm/shmem-helper: Import dmabuf without mapping its sg_table 2025-06-03 09:21:01 +02:00
drm_gem_ttm_helper.c drm/gem: Include <linux/export.h> 2025-06-16 09:02:35 +02:00
drm_gem_vram_helper.c drm/gem: Include <linux/export.h> 2025-06-16 09:02:35 +02:00
drm_gpusvm.c drm-misc-next for 6.17: 2025-06-20 11:34:09 +10:00
drm_gpuvm.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_internal.h Revert "drm/prime: remove drm_prime_lookup_buf_by_handle" 2025-06-13 15:52:52 +02:00
drm_ioc32.c
drm_ioctl.c
drm_kms_helper_common.c
drm_lease.c
drm_managed.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_mipi_dbi.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_mipi_dsi.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_mm.c
drm_mode_config.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_mode_object.c
drm_modes.c
drm_modeset_helper.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_modeset_lock.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_of.c
drm_panel.c drm/panel: Include <linux/export.h> 2025-06-16 09:02:39 +02:00
drm_panel_backlight_quirks.c drm/panel: Include <linux/export.h> 2025-06-16 09:02:39 +02:00
drm_panel_orientation_quirks.c drm/panel: Include <linux/export.h> 2025-06-16 09:02:39 +02:00
drm_panic.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_panic_qr.rs
drm_pci.c drm: Do not include <linux/export.h> 2025-06-16 09:00:09 +02:00
drm_plane.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_plane_helper.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_prime.c Revert "drm/prime: remove drm_prime_lookup_buf_by_handle" 2025-06-13 15:52:52 +02:00
drm_print.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_privacy_screen.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_privacy_screen_x86.c
drm_probe_helper.c
drm_property.c
drm_rect.c
drm_self_refresh_helper.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_simple_kms_helper.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_suballoc.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_syncobj.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_sysfs.c
drm_trace.h
drm_trace_points.c
drm_vblank.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
drm_vblank_work.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_vma_manager.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00
drm_writeback.c drm: Include <linux/export.h> 2025-06-16 09:01:23 +02:00