From c76df5605c56b9cd998f5f93cb896308730fd4da Mon Sep 17 00:00:00 2001 From: Sandeep Gangadharaiah Date: Thu, 13 Oct 2022 11:30:58 -0700 Subject: [PATCH] disp: msm: dp: enable aux switch from display HPD handler Currently, aux switch is enabled by usbpd handler before handing over the control to dispaly HPD handler. However, in some scenarios there is a chance that altmode would directly call into display HPD handler bypassing the usbpd handler. This would lead to aux errors since aux switch is not enabled. This change will enable aux switch in display HPD handler which would avoid the resulting aux errors. This issue is a regression caused by this change b6466ca7f597396cd2ecb3623d059435dfb0e4c6. Change-Id: I425991ba95b22411740f88cba5ca2083d13969e1 Signed-off-by: Sandeep Gangadharaiah --- msm/dp/dp_display.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/msm/dp/dp_display.c b/msm/dp/dp_display.c index 6b61ea3028..f5d05f09bc 100644 --- a/msm/dp/dp_display.c +++ b/msm/dp/dp_display.c @@ -1220,6 +1220,15 @@ static int dp_display_process_hpd_high(struct dp_display_private *dp) dp->dp_display.max_pclk_khz = min(dp->parser->max_pclk_khz, dp->debug->max_pclk_khz); + if (!dp->debug->sim_mode && !dp->no_aux_switch && !dp->parser->gpio_aux_switch + && dp->aux_switch_node) { + rc = dp->aux->aux_switch(dp->aux, true, dp->hpd->orientation); + if (rc) { + mutex_unlock(&dp->session_lock); + return rc; + } + } + /* * If dp video session is not restored from a previous session teardown * by userspace, ensure the host_init is executed, in such a scenario,