diff --git a/msm/sde/sde_rm.c b/msm/sde/sde_rm.c index 751ccedf..48206dc7 100644 --- a/msm/sde/sde_rm.c +++ b/msm/sde/sde_rm.c @@ -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++; }