disp: msm: sde: avoid ctl switch allocation in RM

This change detects if a encoder has a CTL datapath allocated
and Resource manager is allocating a different CTL block and
avoids this switch. If the CTL datapath switch is allowed, pp_done
timeouts are seen in HW. The reason is due to crossbar is confused
due to the "XSEL" values that are present in previous CTL_*_LAYER_* are
not cleared and SW needs to issue a NULL db update to reset these
"XSEL" values when switching the CTL path.

Change-Id: Iee70c7ddb06feb5cea6dc9f147a942f80c48a7da
Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
This commit is contained in:
Jayaprakash Madisetty
2022-02-04 12:21:50 +05:30
zatwierdzone przez Gerrit - the friendly Code Review server
rodzic 3f859c78b5
commit e807595bec

Wyświetl plik

@@ -1388,7 +1388,7 @@ static int _sde_rm_reserve_ctls(
u8 *_ctl_ids)
{
struct sde_rm_hw_blk *ctls[MAX_BLOCKS];
struct sde_rm_hw_iter iter;
struct sde_rm_hw_iter iter, curr;
int i = 0;
if (!top->num_ctl) {
@@ -1398,6 +1398,7 @@ static int _sde_rm_reserve_ctls(
memset(&ctls, 0, sizeof(ctls));
sde_rm_init_hw_iter(&curr, rsvp->enc_id, SDE_HW_BLK_CTL);
sde_rm_init_hw_iter(&iter, 0, SDE_HW_BLK_CTL);
while (_sde_rm_get_hw_locked(rm, &iter)) {
const struct sde_hw_ctl *ctl = to_sde_hw_ctl(iter.blk->hw);
@@ -1432,6 +1433,12 @@ static int _sde_rm_reserve_ctls(
continue;
}
if (_sde_rm_get_hw_locked(rm, &curr) && (curr.blk->id != iter.blk->id)) {
SDE_EVT32(curr.blk->id, iter.blk->id, SDE_EVTLOG_FUNC_CASE1);
SDE_DEBUG("ctl in use:%d avoiding new:%d\n", curr.blk->id, iter.blk->id);
continue;
}
ctls[i] = iter.blk;
SDE_DEBUG("blk id = %d, _ctl_ids[%d] = %d\n",