From 231eb36b84d8f1576c80ae72633112d364833893 Mon Sep 17 00:00:00 2001 From: Veera Sundaram Sankaran Date: Mon, 7 Mar 2022 15:09:01 -0800 Subject: [PATCH] disp: msm: sde: avoid slave encoder wait with ctl-done With MDSS 9.0.0, s/w relies on the ctl-done-irq which signifies the frame done for the ctl path. Avoid unnecessary waits during tx-done/commit-done on the individual physical encoders when ctl-done feature is enabled. Change-Id: Ie5e8b08c47a4778dfa03a87dbbae8daf6a738e6a Signed-off-by: Veera Sundaram Sankaran --- msm/sde/sde_encoder_phys_cmd.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/msm/sde/sde_encoder_phys_cmd.c b/msm/sde/sde_encoder_phys_cmd.c index 34f75020b5..69f08ec35b 100644 --- a/msm/sde/sde_encoder_phys_cmd.c +++ b/msm/sde/sde_encoder_phys_cmd.c @@ -740,6 +740,10 @@ static int _sde_encoder_phys_cmd_wait_for_idle( return -EINVAL; } + if (sde_encoder_check_ctl_done_support(phys_enc->parent) + && !sde_encoder_phys_cmd_is_master(phys_enc)) + return 0; + if (atomic_read(&phys_enc->pending_kickoff_cnt) > 1) wait_info.count_check = 1; @@ -1538,6 +1542,10 @@ static int sde_encoder_phys_cmd_wait_for_tx_complete( cmd_enc = to_sde_encoder_phys_cmd(phys_enc); + if (sde_encoder_check_ctl_done_support(phys_enc->parent) + && !sde_encoder_phys_cmd_is_master(phys_enc)) + return 0; + if (!atomic_read(&phys_enc->pending_kickoff_cnt)) { SDE_EVT32(DRMID(phys_enc->parent), phys_enc->intf_idx - INTF_0, @@ -1625,6 +1633,10 @@ static int sde_encoder_phys_cmd_wait_for_commit_done( cmd_enc = to_sde_encoder_phys_cmd(phys_enc); + if (sde_encoder_check_ctl_done_support(phys_enc->parent) + && !sde_encoder_phys_cmd_is_master(phys_enc)) + return 0; + /* only required for master controller */ if (sde_encoder_phys_cmd_is_master(phys_enc)) { rc = _sde_encoder_phys_cmd_wait_for_wr_ptr(phys_enc);