linux/drivers/gpu/drm
Mark yao 8415ab565d drm/rockchip: fix race with kms hotplug and fbdev
According to the kerneldoc[0], should do fbdev setup before calling
drm_kms_helper_poll_init(), otherwise, Kms hotplug event may race
into fbdev helper initial, and fb_helper->dev may be NULL pointer,
that would cause the bug:
[    0.735411] [00000200] *pgd=00000000f6ffe003, *pud=00000000f6ffe003, *pmd=0000000000000000
[    0.736156] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[    0.736648] Modules linked in:
[    0.736930] CPU: 2 PID: 20 Comm: kworker/2:0 Not tainted 4.4.41 #20
[    0.737480] Hardware name: Rockchip RK3399 Board rev2 (BOX) (DT)
[    0.738020] Workqueue: events cdn_dp_pd_event_work
[    0.738447] task: ffffffc0f21f3100 ti: ffffffc0f2218000 task.ti: ffffffc0f2218000
[    0.739109] PC is at mutex_lock+0x14/0x44
[    0.739469] LR is at drm_fb_helper_hotplug_event+0x30/0x114
[    0.756253] [<ffffff8008a344f4>] mutex_lock+0x14/0x44
[    0.756260] [<ffffff8008445708>] drm_fb_helper_hotplug_event+0x30/0x114
[    0.756271] [<ffffff8008473c84>] rockchip_drm_output_poll_changed+0x18/0x20
[    0.756280] [<ffffff8008439fcc>] drm_kms_helper_hotplug_event+0x28/0x34
[    0.756286] [<ffffff800846c444>] cdn_dp_pd_event_work+0x394/0x3c4
[    0.756295] [<ffffff80080b2b38>] process_one_work+0x218/0x3e0
[    0.756302] [<ffffff80080b3538>] worker_thread+0x2e8/0x404
[    0.756308] [<ffffff80080b7e70>] kthread+0xe8/0xf0
[    0.756316] [<ffffff8008082690>] ret_from_fork+0x10/0x40

[0]: https://01.org/linuxgraphics/gfx-docs/drm/gpu/drm-kms-helpers.html

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Reviewed-by: Sandy huang <sandy.huang@rock-chips.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1501575103-20136-1-git-send-email-mark.yao@rock-chips.com
2017-08-04 16:09:46 +08:00
..
amd drm/amdgpu: Use the drm_driver.dumb_destroy default 2017-07-29 14:00:55 +02:00
arc drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
arm drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
armada drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
ast drm/<drivers>: Drop fbdev info flags 2017-07-26 13:22:40 +02:00
atmel-hlcdc drm/atmel-hlcdc: switch to drm_*{get,put} helpers 2017-08-03 16:41:56 +02:00
bochs drm/<drivers>: Drop fbdev info flags 2017-07-26 13:22:40 +02:00
bridge drm/bridge: Add a devm_ allocator for panel bridge. 2017-07-26 12:19:47 -07:00
cirrus drm/<drivers>: Drop fbdev info flags 2017-07-26 13:22:40 +02:00
etnaviv main drm pull for v4.13 2017-07-09 18:48:37 -07:00
exynos drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
fsl-dcu drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
gma500 drm/gma500: remove an unneeded NULL check 2017-06-28 19:17:38 +02:00
hisilicon drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
i2c drm: handle HDMI 2.0 VICs in AVI info-frames 2017-07-14 21:23:54 +03:00
i810 drm/pci: Deprecate drm_pci_init/exit completely 2017-06-20 10:41:03 +02:00
i915 drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
imx drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
lib
mediatek drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
meson drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
mga Merge airlied/drm-next into drm-misc-next 2017-07-26 13:43:33 +02:00
mgag200 drm/<drivers>: Drop fbdev info flags 2017-07-26 13:22:40 +02:00
msm drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
mxsfb drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
nouveau drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
omapdrm drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
panel drm: Convert to using %pOF instead of full_name 2017-07-26 13:45:06 +02:00
pl111 drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
qxl drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
r128 drm/pci: Deprecate drm_pci_init/exit completely 2017-06-20 10:41:03 +02:00
radeon Linux 4.13-rc2 2017-07-27 08:15:43 +10:00
rcar-du drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
rockchip drm/rockchip: fix race with kms hotplug and fbdev 2017-08-04 16:09:46 +08:00
savage drm/pci: Deprecate drm_pci_init/exit completely 2017-06-20 10:41:03 +02:00
selftests
shmobile drm/shmobile: Use .dumb_map_offset and .dumb_destroy defaults 2017-07-29 13:57:33 +02:00
sis drm/pci: Deprecate drm_pci_init/exit completely 2017-06-20 10:41:03 +02:00
sti drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
stm drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
sun4i drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
tdfx drm/pci: Deprecate drm_pci_init/exit completely 2017-06-20 10:41:03 +02:00
tegra drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
tilcdc drm/tilcdc: Use .dumb_map_offset and .dumb_destroy defaults 2017-07-29 13:58:26 +02:00
tinydrm drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
ttm drm/ttm: Fix use-after-free in ttm_bo_clean_mm 2017-07-03 16:25:43 -04:00
udl drm/<drivers>: Drop fbdev info flags 2017-07-26 13:22:40 +02:00
vc4 drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
vgem drm/vgem: add compat_ioctl support 2017-07-17 21:08:31 +02:00
via drm/pci: Deprecate drm_pci_init/exit completely 2017-06-20 10:41:03 +02:00
virtio drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
vmwgfx drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
zte drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic_helper.c drm/atomic: Use new iterator macros in drm_atomic_helper_wait_for_flip_done, again. 2017-08-01 11:03:06 +02:00
drm_atomic.c drm: rename, adjust and export drm_atomic_replace_property_blob 2017-07-14 15:53:06 +02:00
drm_auth.c
drm_blend.c
drm_bridge.c
drm_bufs.c switch compat_drm_mapbufs() to drm_ioctl_kernel() 2017-07-04 13:16:26 -04:00
drm_cache.c
drm_color_mgmt.c drm: More links for gamma support helpers 2017-06-20 12:13:11 +02:00
drm_connector.c Linux 4.12-rc7 2017-06-27 08:28:30 +10:00
drm_context.c
drm_crtc_helper_internal.h
drm_crtc_helper.c
drm_crtc_internal.h
drm_crtc.c
drm_debugfs_crc.c drm/crc: Only open CRC on atomic drivers when the CRTC is active. 2017-07-17 16:34:51 +02:00
drm_debugfs.c
drm_dma.c
drm_dp_aux_dev.c drm_dp_aux_dev: switch to read_iter/write_iter 2017-07-08 20:51:46 -04:00
drm_dp_dual_mode_helper.c
drm_dp_helper.c
drm_dp_mst_topology.c Linux 4.13-rc2 2017-07-27 08:15:43 +10:00
drm_drv.c drm: inhibit drm drivers register to uninitialized drm core 2017-07-11 12:03:11 +02:00
drm_dumb_buffers.c drm/dumb-buffers: Add defaults for .dumb_map_offset and .dumb_destroy 2017-07-29 13:51:44 +02:00
drm_edid_load.c
drm_edid.c drm/edid: parse ycbcr 420 deep color information 2017-07-14 21:23:54 +03:00
drm_encoder_slave.c
drm_encoder.c
drm_fb_cma_helper.c drm: Convert CMA fbdev console suspend helpers to use bool 2017-06-20 16:23:40 +02:00
drm_fb_helper.c drm/fb-helper: add new drm_setup_crtcs_fb() function 2017-08-03 19:48:15 +02:00
drm_file.c Merge remote-tracking branch 'airlied/drm-next' into drm-misc-next 2017-06-27 09:18:17 -04:00
drm_flip_work.c
drm_fourcc.c
drm_framebuffer.c Merge airlied/drm-next into drm-misc-next 2017-07-26 13:43:33 +02:00
drm_gem_cma_helper.c drm: Update docs around gem_free_object 2017-07-26 13:22:39 +02:00
drm_gem.c drm/gem: Add drm_gem_dumb_map_offset() 2017-07-29 13:49:55 +02:00
drm_global.c
drm_hashtab.c
drm_info.c
drm_internal.h Merge airlied/drm-next into drm-misc-next 2017-07-26 13:43:33 +02:00
drm_ioc32.c Merge airlied/drm-next into drm-misc-next 2017-07-26 13:43:33 +02:00
drm_ioctl.c Merge airlied/drm-next into drm-misc-next 2017-07-26 13:43:33 +02:00
drm_irq.c drm/doc: Polish irq helper documentation 2017-06-01 08:02:14 +02:00
drm_kms_helper_common.c
drm_legacy.h switch compat_drm_mapbufs() to drm_ioctl_kernel() 2017-07-04 13:16:26 -04:00
drm_lock.c
drm_memory.c
drm_mipi_dsi.c drm: Convert to using %pOF instead of full_name 2017-07-26 13:45:06 +02:00
drm_mm.c
drm_mode_config.c drm: Create a format/modifier blob 2017-08-01 17:50:06 +01:00
drm_mode_object.c
drm_modes.c drm/modes: Fix drm_mode_is_420_only() comment 2017-07-31 14:23:30 +02:00
drm_modeset_helper.c drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
drm_modeset_lock.c drm: Improve kerneldoc for drm_modeset_lock 2017-07-26 13:45:08 +02:00
drm_of.c drm: Convert to using %pOF instead of full_name 2017-07-26 13:45:06 +02:00
drm_panel.c
drm_pci.c drm/pci: Deprecate drm_pci_init/exit completely 2017-06-20 10:41:03 +02:00
drm_plane_helper.c
drm_plane.c drm: Create a format/modifier blob 2017-08-01 17:50:06 +01:00
drm_prime.c
drm_print.c
drm_probe_helper.c drm: add helper to validate YCBCR420 modes 2017-07-14 21:23:54 +03:00
drm_property.c drm: rename, adjust and export drm_atomic_replace_property_blob 2017-07-14 15:53:06 +02:00
drm_rect.c
drm_scatter.c
drm_scdc_helper.c drm: Fix warning when building docs for scdc_helper 2017-07-31 14:24:14 +02:00
drm_simple_kms_helper.c drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
drm_syncobj.c Merge airlied/drm-next into drm-misc-next 2017-07-26 13:43:33 +02:00
drm_sysfs.c
drm_trace_points.c
drm_trace.h
drm_vblank.c Merge airlied/drm-next into drm-misc-next 2017-07-26 13:43:33 +02:00
drm_vm.c
drm_vma_manager.c
Kconfig
Makefile Merge tag 'drm-misc-next-2017-06-15' of git://anongit.freedesktop.org/git/drm-misc into drm-next 2017-06-16 09:33:43 +10:00