disp: msm: sde: traverse the entire CTL list during splash_resource init

This change fixes an issue, where in CTL_2 was programmed for
secondary display and handoff was not done as the list traversal
logic was restricting it.

Change-Id: Icd945cfb3401ecc9c9c33059f5208a87979ada77
Signed-off-by: Yojana <quic_yjuadi@quicinc.com>
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
This commit is contained in:
Mahadevan
2023-08-01 10:14:59 +05:30
parent f119b3e97f
commit 2abcfa0acd

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
*/
@@ -2252,7 +2252,7 @@ int sde_rm_cont_splash_res_init(struct msm_drm_private *priv,
struct sde_mdss_cfg *cat)
{
struct sde_rm_hw_iter iter_c;
int index = 0, ctl_top_cnt;
int index = 0, ctl_top_cnt, splash_disp_count = 0;
struct sde_kms *sde_kms = NULL;
struct sde_hw_mdp *hw_mdp;
struct sde_splash_display *splash_display;
@@ -2280,7 +2280,7 @@ int sde_rm_cont_splash_res_init(struct msm_drm_private *priv,
sde_rm_init_hw_iter(&iter_c, 0, SDE_HW_BLK_CTL);
while (_sde_rm_get_hw_locked(rm, &iter_c)
&& (index < splash_data->num_splash_displays)) {
&& (splash_disp_count < splash_data->num_splash_displays)) {
struct sde_hw_ctl *ctl = to_sde_hw_ctl(iter_c.blk->hw);
if (!ctl->ops.get_ctl_intf) {
@@ -2290,7 +2290,8 @@ int sde_rm_cont_splash_res_init(struct msm_drm_private *priv,
intf_sel = ctl->ops.get_ctl_intf(ctl);
if (intf_sel) {
splash_display = &splash_data->splash_display[index];
splash_display =
&splash_data->splash_display[index ? 1 : 0];
SDE_DEBUG("finding resources for display=%d ctl=%d\n",
index, iter_c.blk->id - CTL_0);
@@ -2299,6 +2300,7 @@ int sde_rm_cont_splash_res_init(struct msm_drm_private *priv,
splash_display->cont_splash_enabled = true;
splash_display->ctl_ids[splash_display->ctl_cnt++] =
iter_c.blk->id;
splash_disp_count++;
}
index++;
}