mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
drm/rockchip: disable output poll when shutdown
we find sometimes hdmi will trigger a plugout irq when system shutdown, but actually it is connected, so when drm core run a connect->detect callback it will find the hdmi is on connected state, than run drm_fb_helper_hotplug_event, this drive all the drm system run again. But we are on the system shutdwon process, the running drm core may cause many problem. So we disable output poll to prevent drm_fb_helper_hotplug_event when system shutdown. And also the we should figure out why hdmi driver trigger the wrong plugout irq at shutdown process. Requesting system reboot [ 26.466261] cpu cpu0: min=816000, max=816000 [ 26.476177] dwhdmi-rockchip fe0a0000.hdmi: dw hdmi plug out [ 26.492452] rockchip_drm_platform_shutdown [ 26.579331] dw-mipi-dsi fe060000.dsi: [drm:dw_mipi_dsi_transfer] *ERROR* generic write fifo is full [ 26.580141] panel-simple-dsi fe060000.dsi.0: failed to write dcs cmd: -110 [ 26.581771] dw-mipi-dsi fe060000.dsi: [drm:dw_mipi_dsi_transfer] *ERROR* generic write fifo is full [ 26.582577] panel-simple-dsi fe060000.dsi.0: failed to write dcs cmd: -110 [ 26.667890] rkisp_hw fdff0000.rkisp: rkisp_hw_shutdown [ 26.675465] fan53555-regulator 0-001c: fan53555..... reset [ 26.676891] fan53555-regulator 0-001c: reset: force fan53555_reset ok! [ 26.677867] mpp_rkvdec2 fdf80200.rkvdec: shutdown device [ 26.678381] mpp_jpgdec fded0000.jpegd: shutdown device [ 26.678853] mpp-iep2 fdef0000.iep: shutdown device [ 26.679288] mpp_vepu2 fdee0000.vepu: shutdown device [ 26.679745] mpp_vdpu2 fdea0400.vdpu: shutdown device [ 26.680201] mpp_rkvenc fdf40000.rkvenc: shutdown device [ 26.680664] mpp_rkvenc fdf40000.rkvenc: shutdown success [ 26.777723] rockchip_drm_output_poll_changed [ 26.890773] rockchip-vop2 fe040000.vop: [drm:vop2_crtc_atomic_enable] Update mode to 1080x1920p60, type: 16 for vp1 [ 27.392083] rockchip-vop2 fe040000.vop: [drm:vop2_disable_all_planes_for_crtc] *ERROR* wait win close timeout [ 27.393012] dw-mipi-dsi fe060000.dsi: [drm:dw_mipi_dsi_encoder_enable] final DSI-Link bandwidth: 880 x 4 Mbps Change-Id: Ib1454636b1b35bf310252ab9469a107fcbf7e37c Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This commit is contained in:
@@ -2230,8 +2230,10 @@ static void rockchip_drm_platform_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
struct drm_device *drm = platform_get_drvdata(pdev);
|
||||
|
||||
if (drm)
|
||||
if (drm) {
|
||||
drm_kms_helper_poll_fini(drm);
|
||||
drm_atomic_helper_shutdown(drm);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct of_device_id rockchip_drm_dt_ids[] = {
|
||||
|
||||
@@ -226,7 +226,7 @@ static void rockchip_drm_output_poll_changed(struct drm_device *dev)
|
||||
struct rockchip_drm_private *private = dev->dev_private;
|
||||
struct drm_fb_helper *fb_helper = private->fbdev_helper;
|
||||
|
||||
if (fb_helper && !private->loader_protect)
|
||||
if (fb_helper && dev->mode_config.poll_enabled && !private->loader_protect)
|
||||
drm_fb_helper_hotplug_event(fb_helper);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user