From 1a9437a816a51ffbdc4b553edf2040ab30bd75ae Mon Sep 17 00:00:00 2001 From: Rajkumar Subbiah Date: Thu, 20 Aug 2020 00:14:12 -0400 Subject: [PATCH] disp: msm: dp: fix simulated hpd_irq handling for real monitors A mode switch on a real monitor can be triggered by forcing the new mode using debugfs and initiating an hpd_irq. Due to a missing check for simulator state, the current driver calls the hpd_irq callback for simulator even for a real monitor. This change adds this check. Change-Id: I13480eccd27eac2f9df3dd766d0445c0a5ea9b2c Signed-off-by: Rajkumar Subbiah --- msm/dp/dp_mst_drm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/msm/dp/dp_mst_drm.c b/msm/dp/dp_mst_drm.c index e7b9712b..190f6aa4 100644 --- a/msm/dp/dp_mst_drm.c +++ b/msm/dp/dp_mst_drm.c @@ -2221,7 +2221,8 @@ static void dp_mst_display_hpd_irq(void *dp_display, bool handled; if (info->mst_hpd_sim) { - if (info->mst_sim_add_con || info->mst_sim_remove_con) { + if (mst->simulator.mst_state && (info->mst_sim_add_con || + info->mst_sim_remove_con)) { dp_mst_sim_handle_hpd_irq(dp_display, info); /*