linux-stable/drivers/gpu/drm
Andrzej Hajda f8cc091e05 drm/i915/fbdev: suspend HPD before fbdev unregistration
HPD event after fbdev unregistration can cause registration of deferred
fbdev which will not be unregistered later, causing use-after-free.
To avoid it HPD handling should be suspended before fbdev unregistration.

It should fix following GPF:
[272.634530] general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b6b6b: 0000 [#1] PREEMPT SMP NOPTI
[272.634536] CPU: 0 PID: 6030 Comm: i915_selftest Tainted: G     U            5.18.0-rc5-CI_DRM_11603-g12dccf4f5eef+ #1
[272.634541] Hardware name: Intel Corporation Raptor Lake Client Platform/RPL-S ADP-S DDR5 UDIMM CRB, BIOS RPLSFWI1.R00.2397.A01.2109300731 09/30/2021
[272.634545] RIP: 0010:fb_do_apertures_overlap.part.14+0x26/0x60
...
[272.634582] Call Trace:
[272.634583]  <TASK>
[272.634585]  do_remove_conflicting_framebuffers+0x59/0xa0
[272.634589]  remove_conflicting_framebuffers+0x2d/0xc0
[272.634592]  remove_conflicting_pci_framebuffers+0xc8/0x110
[272.634595]  drm_aperture_remove_conflicting_pci_framebuffers+0x52/0x70
[272.634604]  i915_driver_probe+0x63a/0xdd0 [i915]

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5329
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5510
Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220826141929.189681-3-andrzej.hajda@intel.com
2022-09-05 16:21:43 +03:00
..
amd Merge tag 'amd-drm-fixes-6.0-2022-08-17' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes 2022-08-19 09:45:22 +10:00
arm drm: Remove linux/fb.h from drm_crtc.h 2022-07-05 21:14:02 +03:00
armada drm: Remove linux/fb.h from drm_crtc.h 2022-07-05 21:14:02 +03:00
aspeed drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
ast drm/ast: Enable primary plane with CRTC 2022-06-27 11:10:43 +02:00
atmel-hlcdc drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
bridge One patch for imx/dcss to get rid of a warning message, one off-by-one 2022-08-18 08:51:42 +10:00
display drm: Remove linux/fb.h from drm_crtc.h 2022-07-05 21:14:02 +03:00
etnaviv Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next 2022-05-17 12:20:04 +10:00
exynos sound updates for 6.0-rc1 2022-08-06 10:19:51 -07:00
fsl-dcu drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
gma500 drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
gud drm: Drop drm_blend.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
hisilicon drm: Remove linux/fb.h from drm_crtc.h 2022-07-05 21:14:02 +03:00
hyperv drm/hyperv-drm: Include framebuffer and EDID headers 2022-06-22 16:07:38 +02:00
i2c sound updates for 6.0-rc1 2022-08-06 10:19:51 -07:00
i810
i915 drm/i915/fbdev: suspend HPD before fbdev unregistration 2022-09-05 16:21:43 +03:00
imx One patch for imx/dcss to get rid of a warning message, one off-by-one 2022-08-18 08:51:42 +10:00
ingenic drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
kmb drm: Remove linux/fb.h from drm_crtc.h 2022-07-05 21:14:02 +03:00
lib
lima drm/lima: Migrate to dev_pm_opp_set_config() 2022-07-08 11:27:33 +05:30
logicvc drm/logicvc: add missing of_node_put() in logicvc_layers_init() 2022-06-24 17:23:38 +02:00
mcde drm: Remove linux/i2c.h from drm_crtc.h 2022-07-05 21:15:23 +03:00
mediatek Mediatek DRM Next for Linux 5.20 2022-07-12 17:01:42 +10:00
meson One patch for imx/dcss to get rid of a warning message, one off-by-one 2022-08-18 08:51:42 +10:00
mga
mgag200 drm/mgag200: Don't read-back PCI option register before writing 2022-07-14 15:14:45 +02:00
msm - The usual batches of cleanups from Baoquan He, Muchun Song, Miaohe 2022-08-05 16:32:45 -07:00
mxsfb drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
nouveau One patch for imx/dcss to get rid of a warning message, one off-by-one 2022-08-18 08:51:42 +10:00
omapdrm drm: Remove linux/fb.h from drm_crtc.h 2022-07-05 21:14:02 +03:00
panel drm for 5.20/6.0 2022-08-03 19:52:08 -07:00
panfrost More power management updates for 5.20-rc1 2022-08-08 14:29:00 -07:00
pl111 drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
qxl drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
r128 drm/r128: Fix undefined behavior due to shift overflowing the constant 2022-05-21 18:02:47 +02:00
radeon drm/radeon: Fix comment typo 2022-07-25 09:31:02 -04:00
rcar-du Miscellaneous R-Car DU fixes and enhancements 2022-07-22 13:43:32 +10:00
rockchip drm for 5.20/6.0 2022-08-03 19:52:08 -07:00
savage
scheduler drm/scheduler: Don't kill jobs in interrupt context 2022-07-15 10:09:15 -04:00
selftests drm/display/selftests: drop extra word 'for' in comments for MST selftests 2022-06-28 18:53:20 -04:00
shmobile drm: shmobile: Use backlight helper 2022-06-24 21:45:28 +02:00
sis
solomon drm for 5.20/6.0 2022-08-03 19:52:08 -07:00
sprd drm: Drop drm_blend.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
sti sound updates for 6.0-rc1 2022-08-06 10:19:51 -07:00
stm drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
sun4i One patch for imx/dcss to get rid of a warning message, one off-by-one 2022-08-18 08:51:42 +10:00
tdfx
tegra drm/tegra: Changes for v5.20-rc1 2022-07-12 16:50:05 +10:00
tests drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332() 2022-06-27 13:45:53 +02:00
tidss drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
tilcdc drm: Remove linux/fb.h from drm_crtc.h 2022-07-05 21:14:02 +03:00
tiny drm for 5.20/6.0 2022-08-03 19:52:08 -07:00
ttm One patch for imx/dcss to get rid of a warning message, one off-by-one 2022-08-18 08:51:42 +10:00
tve200 drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
udl drm: Drop drm_edid.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
v3d drm/v3d: Add support for bcm2711 2022-06-12 22:10:50 -01:00
vboxvideo drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
vc4 sound updates for 6.0-rc1 2022-08-06 10:19:51 -07:00
vgem dma-buf: specify usage while adding fences to dma_resv obj v7 2022-04-07 12:53:53 +02:00
via
virtio drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
vkms drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
vmwgfx drm: Remove linux/fb.h from drm_crtc.h 2022-07-05 21:14:02 +03:00
xen Linux 5.19-rc6 2022-07-13 10:54:56 +10:00
xlnx drm: xlnx: add <linux/io.h> for readl/writel 2022-07-06 22:54:51 +03:00
Kconfig Revert "drm/amdgpu: add drm buddy support to amdgpu" 2022-07-08 14:24:30 +02:00
Makefile drm: lcdif: Add support for i.MX8MP LCDIF variant 2022-06-29 01:44:48 +02:00
drm_agpsupport.c
drm_aperture.c drm/aperture: Run fbdev removal before internal helpers 2022-07-09 11:12:05 -07:00
drm_atomic.c drm: Drop drm_blend.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_atomic_helper.c drm/atomic-helper: Add helper drm_atomic_helper_check_crtc_state() 2022-06-27 11:10:43 +02:00
drm_atomic_state_helper.c drm: Drop drm_blend.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_atomic_uapi.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_auth.c
drm_blend.c drm/doc: Fix comment typo 2022-06-28 07:56:32 +02:00
drm_bridge.c drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
drm_bridge_connector.c drm: Config orientation property if panel provides it 2022-06-21 08:52:59 -07:00
drm_buddy.c drm: add a check to verify the size alignment 2022-04-11 15:35:47 +02:00
drm_bufs.c
drm_cache.c drm for 5.18-rc1 2022-03-24 16:19:43 -07:00
drm_client.c
drm_client_modeset.c drm: Drop drm_edid.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_color_mgmt.c drm: fix typo in comment 2022-05-04 14:09:34 +02:00
drm_connector.c drm: Remove linux/fb.h from drm_crtc.h 2022-07-05 21:14:02 +03:00
drm_context.c
drm_crtc.c drm: Drop drm_blend.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_crtc_helper.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_crtc_helper_internal.h
drm_crtc_internal.h drm/edid: abstract debugfs override EDID set/reset 2022-06-30 10:50:59 +03:00
drm_damage_helper.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_debugfs.c drm/edid: abstract debugfs override EDID set/reset 2022-06-30 10:50:59 +03:00
drm_debugfs_crc.c
drm_displayid.c drm/displayid: convert to drm_edid 2022-05-13 18:55:13 +03:00
drm_dma.c
drm_drv.c
drm_dumb_buffers.c
drm_edid.c drm/edid: take HF-EEODB extension count into account 2022-06-30 10:51:12 +03:00
drm_edid_load.c
drm_encoder.c drm: use ENOMEM for drmm_kzalloc allocation failures 2022-05-25 17:39:49 +02:00
drm_encoder_slave.c
drm_fb_cma_helper.c
drm_fb_helper.c drm/fb-helper: Fix out-of-bounds access 2022-06-27 11:10:43 +02:00
drm_file.c fs: remove no_llseek 2022-07-16 09:19:47 -04:00
drm_flip_work.c
drm_format_helper.c drm/format-helper: Share implementation among conversion helpers 2022-05-05 08:54:09 +02:00
drm_fourcc.c
drm_framebuffer.c
drm_gem.c drm/gem: Properly annotate WW context on drm_gem_lock_reservations() error 2022-08-09 18:43:28 +02:00
drm_gem_atomic_helper.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_gem_cma_helper.c drm/cma-helper: Describe what a "contiguous chunk" actually means 2022-06-08 17:36:15 +02:00
drm_gem_framebuffer_helper.c drm/gem: Warn on trying to use a non-existing framebuffer plane 2022-05-19 19:25:23 +02:00
drm_gem_shmem_helper.c drm/shmem-helper: Add missing vunmap on error 2022-08-09 18:15:42 +02:00
drm_gem_ttm_helper.c drm/ttm: fix locking in vmap/vunmap TTM GEM helpers 2022-07-18 09:18:53 +02:00
drm_gem_vram_helper.c drm/gem-vram: Ignore planes that are unused by framebuffer format 2022-05-19 19:25:19 +02:00
drm_hashtab.c
drm_internal.h
drm_ioc32.c
drm_ioctl.c GPU: drm: drop unexpected word "the" in the comments 2022-06-22 09:23:08 +02:00
drm_irq.c
drm_kms_helper_common.c drm: Drop drm_edid.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_lease.c
drm_legacy.h
drm_legacy_misc.c
drm_lock.c
drm_managed.c drm: Add DRM-managed mutex_init() 2022-05-05 09:04:10 +02:00
drm_memory.c
drm_mipi_dbi.c drm: Remove linux/fb.h from drm_crtc.h 2022-07-05 21:14:02 +03:00
drm_mipi_dsi.c drm/display: Move DSC header and helpers into display-helper module 2022-04-25 11:19:36 +02:00
drm_mm.c
drm_mode_config.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_mode_object.c drm/object: Add drm_object_property_get_default_value() function 2022-02-25 17:55:42 +01:00
drm_modes.c drm: Remove linux/fb.h from drm_crtc.h 2022-07-05 21:14:02 +03:00
drm_modeset_helper.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_modeset_lock.c
drm_nomodeset.c
drm_of.c drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
drm_panel.c
drm_panel_orientation_quirks.c drm for 5.20/6.0 2022-08-03 19:52:08 -07:00
drm_pci.c
drm_plane.c drm/plane: Move range check for format_count earlier 2022-04-28 16:13:04 +01:00
drm_plane_helper.c
drm_prime.c drm/prime: drop unexpected word "the" in the comments 2022-06-22 09:22:05 +02:00
drm_print.c
drm_privacy_screen.c
drm_privacy_screen_x86.c
drm_probe_helper.c drm/probe-helper: add drm_connector_helper_get_modes() 2022-06-30 10:51:03 +03:00
drm_property.c
drm_rect.c
drm_scatter.c
drm_self_refresh_helper.c
drm_simple_kms_helper.c drm/simple-kms: Use drm_atomic_helper_check_crtc_state() 2022-06-27 11:10:43 +02:00
drm_syncobj.c drm/syncobj: add missing error return code in drm_syncobj_transfer_to_timeline() 2022-06-13 08:54:16 +02:00
drm_sysfs.c
drm_trace.h
drm_trace_points.c
drm_vblank.c drm: Use drm_mode_copy() 2022-04-12 09:27:20 +03:00
drm_vblank_work.c
drm_vm.c LoongArch: Add writecombine support for drm 2022-06-03 20:09:27 +08:00
drm_vma_manager.c
drm_writeback.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00