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

Commit b45d0f25 authored by Lloyd Atkinson's avatar Lloyd Atkinson Committed by Steve Cohen
Browse files

drm/msm/sde: disable power only after reading the line count



Disable power after the VSYNC event worker has read the current
line count register and calculated the new wakeup time.

Change-Id: I9e5583b1ac189f683d90ee2e906e0cd36ecbab68
Signed-off-by: default avatarLloyd Atkinson <latkinso@codeaurora.org>
parent c6a6fa72
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -3247,18 +3247,20 @@ static void sde_encoder_vsync_event_work_handler(struct kthread_work *work)
			sde_enc->cur_master->ops.is_autorefresh_enabled(
						sde_enc->cur_master);

	_sde_encoder_power_enable(sde_enc, false);

	/* Update timer if autorefresh is enabled else return */
	if (!autorefresh_enabled)
		return;
		goto exit;

	if (_sde_encoder_wakeup_time(&sde_enc->base, &wakeup_time))
		return;
	rc = _sde_encoder_wakeup_time(&sde_enc->base, &wakeup_time);
	if (rc)
		goto exit;

	SDE_EVT32_VERBOSE(ktime_to_ms(wakeup_time));
	mod_timer(&sde_enc->vsync_event_timer,
			nsecs_to_jiffies(ktime_to_ns(wakeup_time)));

exit:
	_sde_encoder_power_enable(sde_enc, false);
}

int sde_encoder_prepare_for_kickoff(struct drm_encoder *drm_enc,