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

Commit be91a983 authored by Sean Paul's avatar Sean Paul
Browse files

drm/rockchip: Fix up bug in psr state machine



The ->set() callback would always be called when transitioning
from FLUSH->DISABLE since we assign state to psr->state right
above the skip condition.

Reported-by: default avatarDaniel Kurtz <djkurtz@chromium.org>
Reviewed-by: default avatarDaniel Kurtz <djkurtz@chromium.org>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
parent d2f12adc
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -71,11 +71,13 @@ static void psr_set_state_locked(struct psr_drv *psr, enum psr_state state)
	if (state == psr->state || !psr->active)
		return;

	psr->state = state;

	/* Already disabled in flush, change the state, but not the hardware */
	if (state == PSR_DISABLE && psr->state == PSR_FLUSH)
	if (state == PSR_DISABLE && psr->state == PSR_FLUSH) {
		psr->state = state;
		return;
	}

	psr->state = state;

	/* Actually commit the state change to hardware */
	switch (psr->state) {