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

Commit 8413f9ae authored by Lloyd Atkinson's avatar Lloyd Atkinson
Browse files

drm/msm/sde: use enumerated base for PINGPONG_0 instead of -1



Use the proper enumeration for PINGPONG_0 instead of the magic
number -1 to subtract the correct pingpong index.

Change-Id: Ia14bf00efa41c755f76c7ae35703dbba814bdfa4
Signed-off-by: default avatarLloyd Atkinson <latkinso@codeaurora.org>
parent 5d1c951e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -216,10 +216,12 @@ static void sde_hw_setup_vsync_sel(struct sde_hw_mdp *mdp,

	reg = SDE_REG_READ(c, MDP_VSYNC_SEL);
	for (i = 0; i < cfg->pp_count; i++) {
		int pp_idx = cfg->ppnumber[i] - PINGPONG_0;

		if (watchdog_te)
			reg |= 0xF << pp_offset[cfg->ppnumber[i] - 1];
			reg |= 0xF << pp_offset[pp_idx];
		else
			reg &= ~(0xF << pp_offset[cfg->ppnumber[i] - 1]);
			reg &= ~(0xF << pp_offset[pp_idx]);
	}

	SDE_REG_WRITE(c, MDP_VSYNC_SEL, reg);