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

Commit 04e3078c authored by Yashwanth's avatar Yashwanth
Browse files

disp: msm: sde: reset crtc core perf while entering idle state



After coming out of idle state, bus vote is governed only
if there any change in perf compared to before entering idle
state. If the perf is same before and after the idle state,
bus update request is not considered and min bus votes are
voted. This change resets crtc core perf while entering
idle state always in command mode.

Change-Id: If172207422adc25fcee497aebe23aad1ac6ce7cc
Signed-off-by: default avatarYashwanth <yvulapu@codeaurora.org>
parent e2c6903e
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -2616,6 +2616,14 @@ static int _sde_encoder_rc_post_modeset(struct drm_encoder *drm_enc,
static int _sde_encoder_rc_idle(struct drm_encoder *drm_enc,
	u32 sw_event, struct sde_encoder_virt *sde_enc, bool is_vid_mode)
{
	struct msm_drm_private *priv;
	struct sde_kms *sde_kms;
	struct drm_crtc *crtc = drm_enc->crtc;
	struct sde_crtc *sde_crtc = to_sde_crtc(crtc);

	priv = drm_enc->dev->dev_private;
	sde_kms = to_sde_kms(priv->kms);

	mutex_lock(&sde_enc->rc_lock);

	if (sde_enc->rc_state != SDE_ENC_RC_STATE_ON) {
@@ -2638,6 +2646,10 @@ static int _sde_encoder_rc_idle(struct drm_encoder *drm_enc,
		/* disable all the clks and resources */
		_sde_encoder_update_rsc_client(drm_enc, false);
		_sde_encoder_resource_control_helper(drm_enc, false);

		if (!sde_kms->perf.bw_vote_mode)
			memset(&sde_crtc->cur_perf, 0,
				sizeof(struct sde_core_perf_params));
	}

	SDE_EVT32(DRMID(drm_enc), sw_event, sde_enc->rc_state,