disp: msm: sde: add enc_id check before decrement avail HW resources

Add changes to commit and decrement only those
hardware resources which are required for the modeset.

Timeline of Commit C1 with CWB modeset:
---> Atomic_check
	Primary encoder has allocated required HW resources.
 	CWB encoder has allocated required HW resources.
---> Atomic_commit
	On primary encoder, connector is seamless hence
	there is no virt_modeset call.
	On CWB encoder, there is virt_mode_set call
	and during commit HW blocks there is unconditional
	decrement for all the HW blocks with rsvp_nxt.

This change ensures hardware blocks are available during
dp display mode validations.

Change-Id: Ifd9439cfc96e727c3093af5f47802c8367775cd7
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
This commit is contained in:
Jayaprakash
2020-01-10 20:22:40 +05:30
committed by Gerrit - the friendly Code Review server
parent 9beffdfdc6
commit f7d08feb38
2 changed files with 10 additions and 9 deletions

View File

@@ -2166,7 +2166,8 @@ static int _sde_rm_commit_rsvp(
/* Swap next rsvp to be the active */
for (type = 0; type < SDE_HW_BLK_MAX; type++) {
list_for_each_entry(blk, &rm->hw_blks[type], list) {
if (blk->rsvp_nxt) {
if (blk->rsvp_nxt && conn_state->best_encoder->base.id
== blk->rsvp_nxt->enc_id) {
blk->rsvp = blk->rsvp_nxt;
blk->rsvp_nxt = NULL;
_sde_rm_dec_resource_info(rm,