linux_dsm_epyc7002/drivers/gpu/drm/rockchip
Guenter Roeck 5eb2e6ee97 drm/rockchip: cdn-dp: Do not run worker while suspended
If the driver is in suspended mode, the dp block may be disabled, and
chip registers may not be accessible. Yet, the worker may be triggered
in this situation by an extcon event. If that happens, the following crash
will be seen.

cdn-dp fec00000.dp: [drm:cdn_dp_pd_event_work] *ERROR* Enable dp failed -19
cdn-dp fec00000.dp: [drm:cdn_dp_pd_event_work] Connected, not enabled. Enabling cdn
Bad mode in Error handler detected, code 0xbf000002 -- SError
CPU: 1 PID: 10357 Comm: kworker/1:2 Not tainted 4.4.21-05903-ge0514ea #1
Hardware name: Google Kevin (DT)
Workqueue: events cdn_dp_pd_event_work
task: ffffffc0cda67080 ti: ffffffc0b9b80000 task.ti: ffffffc0b9b80000
PC is at cdn_dp_clock_reset+0x30/0xa8
LR is at cdn_dp_enable+0x1e0/0x69c
...
Call trace:
[<ffffffc0005a7e24>] cdn_dp_pd_event_work+0x58/0x3f4
[<ffffffc0002397f0>] process_one_work+0x240/0x424
[<ffffffc00023a28c>] worker_thread+0x2fc/0x424
[<ffffffc00023f5fc>] kthread+0x10c/0x114
[<ffffffc000203dd0>] ret_from_fork+0x10/0x40

Problem is two-fold: The worker should not run while suspended, and the
suspend function should not call cdn_dp_disable() while the worker is
running.

Signed-off-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-02-05 16:29:46 +08:00
..
analogix_dp-rockchip.c drm/rockchip: analogix_dp: Refuse to enable PSR if panel doesn't support it 2016-10-04 08:23:17 +02:00
cdn-dp-core.c drm/rockchip: cdn-dp: Do not run worker while suspended 2017-02-05 16:29:46 +08:00
cdn-dp-core.h drm/rockchip: cdn-dp: Do not run worker while suspended 2017-02-05 16:29:46 +08:00
cdn-dp-reg.c drm/rockchip: cdn-dp: add cdn DP support for rk3399 2017-02-05 16:29:29 +08:00
cdn-dp-reg.h drm/rockchip: cdn-dp: add cdn DP support for rk3399 2017-02-05 16:29:29 +08:00
dw_hdmi-rockchip.c drm: bridge: dw-hdmi: Move IRQ and IO resource allocation to common code 2017-01-18 09:29:32 +05:30
dw-mipi-dsi.c drm: Make the connector .detect() callback optional 2016-12-01 10:05:53 -05:00
inno_hdmi.c drm: rockchip: Rely on the default ->best_encoder() behavior 2016-06-10 17:24:37 +02:00
inno_hdmi.h drm/rockchip: hdmi: add Innosilicon HDMI support 2016-02-18 13:56:43 +08:00
Kconfig drm/rockchip: cdn-dp: add cdn DP support for rk3399 2017-02-05 16:29:29 +08:00
Makefile drm/rockchip: cdn-dp: add cdn DP support for rk3399 2017-02-05 16:29:29 +08:00
rockchip_drm_drv.c drm: rockchip: use crtc helper drm_crtc_from_index() 2016-12-30 12:15:11 +01:00
rockchip_drm_drv.h drm/rockchip: Replace custom wait_for_vblanks with helper 2016-09-21 06:55:51 -07:00
rockchip_drm_fb.c drm/rockchip: return ERR_PTR instead of NULL 2017-02-05 16:19:11 +08:00
rockchip_drm_fb.h drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
rockchip_drm_fbdev.c drm: Nuke fb->depth 2016-12-15 14:55:33 +02:00
rockchip_drm_fbdev.h drm/rockchip: respect CONFIG_DRM_FBDEV_EMULATION 2016-01-22 08:45:31 +08:00
rockchip_drm_gem.c dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
rockchip_drm_gem.h dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
rockchip_drm_psr.c drm/rockchip: Fix up bug in psr state machine 2016-09-21 06:55:49 -07:00
rockchip_drm_psr.h drm/rockchip: Don't key off vblank for psr 2016-09-21 06:55:47 -07:00
rockchip_drm_vop.c drm/rockchip: cdn-dp: add cdn DP support for rk3399 2017-02-05 16:29:29 +08:00
rockchip_drm_vop.h drm/rockchip: cdn-dp: add cdn DP support for rk3399 2017-02-05 16:29:29 +08:00
rockchip_vop_reg.c drm/rockchip: cdn-dp: add cdn DP support for rk3399 2017-02-05 16:29:29 +08:00
rockchip_vop_reg.h drm/rockchip: vop: add rk3399 vop support 2016-08-23 11:44:29 -04:00