From 7c5760d4953e2e283b7f546558e1ce7b5f7d5c44 Mon Sep 17 00:00:00 2001 From: Narender Ankam Date: Wed, 28 Jun 2017 17:16:58 +0530 Subject: [PATCH] msm: mdss: dp: fix watchdog reset with DP connected in AOD mode With DP connected and device in AOD mode, DP is powered off during suspend operation. But at the same time, if device receives HPD_IRQ attention event, DP driver is trying to access unclocked registers. Handle HPD_IRQ attention event only if DP is fully powered ON. Change-Id: I425e34e8456fb828c1bddd6e0b4bf92772092a61 Signed-off-by: Narender Ankam --- drivers/video/fbdev/msm/mdss_dp.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/msm/mdss_dp.c b/drivers/video/fbdev/msm/mdss_dp.c index c8afb3a244c3..9eb28ceeb89d 100644 --- a/drivers/video/fbdev/msm/mdss_dp.c +++ b/drivers/video/fbdev/msm/mdss_dp.c @@ -3978,12 +3978,6 @@ static int mdss_dp_process_hpd_irq_high(struct mdss_dp_drv_pdata *dp) { int ret = 0; - /* In case of HPD_IRQ events without DP link being turned on such as - * adb shell stop, skip handling hpd_irq event. - */ - if (!dp->dp_initialized) - goto exit; - pr_debug("start\n"); dp->hpd_irq_on = true; @@ -4099,6 +4093,15 @@ static void mdss_dp_process_attention(struct mdss_dp_drv_pdata *dp_drv) if (dp_drv->alt_mode.dp_status.hpd_irq) { pr_debug("Attention: hpd_irq high\n"); + /* In case of HPD_IRQ events without DP link being + * turned on such as adb shell stop, skip handling + * hpd_irq event. + */ + if (!dp_drv->dp_initialized) { + pr_err("DP not initialized yet\n"); + return; + } + if (dp_is_hdcp_enabled(dp_drv) && dp_drv->hdcp.ops->cp_irq) { if (!dp_drv->hdcp.ops->cp_irq(dp_drv->hdcp.data)) return;