disp: msm: sde: reset mixers in crtc when ctl datapath switches
This change reinitializes the sde_crtc->mixers when CTL datapath switch occurs during mode set and RM allocation of CTL hw block is changed. This initialization is required for CTL_LAYER programming to trigger on the new CTL allocated from RM. Issue case: 1. Primary Display is using CTL_0 and it is reserved. 2. Secondary Display is using CTL_1. On suspend, RM adds CTL_1 into the free list. 3. External Display is powered on, RM allocates CTL_1 hw blk. 4. Secondary Display is powered on, RM allocated CTL_2 hw blk. 5. External Display is suspended/unplugged, RM adds CTL_1 into the free list. 6. When any mode_set(say fps switch) occurs on secondary, RM allocates new resources and CTL_1 is allocated. sde_crtc->num_mixers is non zero, so all the layer programming happens on CTL_2, but CTL_1_FLUSH bits are programmed causing hw timeout issue. Change-Id: I5f1f52b7673740c48b249ab4d36e80b7a1d3db96 Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
@@ -406,7 +407,7 @@ static void sde_encoder_phys_cmd_cont_splash_mode_set(
|
||||
static void sde_encoder_phys_cmd_mode_set(
|
||||
struct sde_encoder_phys *phys_enc,
|
||||
struct drm_display_mode *mode,
|
||||
struct drm_display_mode *adj_mode)
|
||||
struct drm_display_mode *adj_mode, bool *reinit_mixers)
|
||||
{
|
||||
struct sde_encoder_phys_cmd *cmd_enc =
|
||||
to_sde_encoder_phys_cmd(phys_enc);
|
||||
@@ -427,8 +428,14 @@ static void sde_encoder_phys_cmd_mode_set(
|
||||
/* Retrieve previously allocated HW Resources. Shouldn't fail */
|
||||
sde_rm_init_hw_iter(&iter, phys_enc->parent->base.id, SDE_HW_BLK_CTL);
|
||||
for (i = 0; i <= instance; i++) {
|
||||
if (sde_rm_get_hw(rm, &iter))
|
||||
if (sde_rm_get_hw(rm, &iter)) {
|
||||
if (phys_enc->hw_ctl && phys_enc->hw_ctl != iter.hw) {
|
||||
*reinit_mixers = true;
|
||||
SDE_EVT32(phys_enc->hw_ctl->idx,
|
||||
((struct sde_hw_ctl *)iter.hw)->idx);
|
||||
}
|
||||
phys_enc->hw_ctl = (struct sde_hw_ctl *)iter.hw;
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_ERR_OR_NULL(phys_enc->hw_ctl)) {
|
||||
|
Reference in New Issue
Block a user