From 353a91d0dadb24e908eaa0032147697697aca62e Mon Sep 17 00:00:00 2001 From: Padmanabhan Komanduru Date: Wed, 5 Apr 2017 18:49:17 +0530 Subject: [PATCH] msm: mdss: fix display port crash caused by hpd_irq attention event When adb shell stop operation is performed with display port sink connected, after the framebuffer is closed on display port device, there are cases where an attention event is sent by the display port adapter with hpd = 1 and hpd_irq = 1. This causes unclocked register access while handling hpd_irq event since the DP link is shutdown. Add a check to handle hpq_irq event only if DP host is initialized. Change-Id: Icdb06f23b6d124d8bfdad2b1dd5e296df491be15 Signed-off-by: Padmanabhan Komanduru --- drivers/video/fbdev/msm/mdss_dp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/video/fbdev/msm/mdss_dp.c b/drivers/video/fbdev/msm/mdss_dp.c index 67adc46d1e39..cb2cf98d2db9 100644 --- a/drivers/video/fbdev/msm/mdss_dp.c +++ b/drivers/video/fbdev/msm/mdss_dp.c @@ -3677,6 +3677,12 @@ 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;