Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15b1a07f authored by Danny Lin's avatar Danny Lin Committed by Akshay Kakatkar
Browse files

disp: msm: sde: Only clear dim layers when necessary



We don't use dim layers, so clearing them every time is redundant. Only
do so when there are actually layers to clear to eliminate the
measurably significant overhead this adds to the frame commit path.

Signed-off-by: default avatarDanny Lin <danny@kdrag0n.dev>
parent 4d638086
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1595,10 +1595,12 @@ static void _sde_crtc_blend_setup(struct drm_crtc *crtc,
					mixer[i].hw_ctl);

		/* clear dim_layer settings */
		if (sde_crtc_state->num_dim_layers > 0) {
			lm = mixer[i].hw_lm;
			if (lm->ops.clear_dim_layer)
				lm->ops.clear_dim_layer(lm);
		}
	}

	_sde_crtc_swap_mixers_for_right_partial_update(crtc);