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

Commit 01ff0400 authored by Terence Hampson's avatar Terence Hampson
Browse files

mdss: ppp: Reset parameters passed into mdp3_start_ppp



mdp3_start_ppp is manipulating some of the parameters passed in.
Within a sw workaround to a hw issue, a blit request can be broken
down and create a need for multiple calls to mdp3_start_ppp. When
this happens, the parameters passed in will be modified and a
snowball effect takes place. To fix this issue we simply reset
parameters before next call to mdp3_start_ppp.

Change-Id: I29888b5f2f07391d3502ae1478068d7bf12805c3
Signed-off-by: default avatarTerence Hampson <thampson@codeaurora.org>
parent b16fa45c
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -495,6 +495,9 @@ static void mdp3_ppp_tile_workaround(struct ppp_blit_op *blit_op,
{
	int dst_h, src_w, i;
	uint32_t mdp_op = blit_op->mdp_op;
	void *src_p0 = blit_op->src.p0;
	void *src_p1 = blit_op->src.p1;
	void *dst_p0 = blit_op->dst.p0;

	src_w = req->src_rect.w;
	dst_h = blit_op->dst.roi.height;
@@ -526,8 +529,11 @@ static void mdp3_ppp_tile_workaround(struct ppp_blit_op *blit_op,
		/* this is for a remainder update */
		dst_h -= 16;
		src_w -= blit_op->src.roi.width;
		/* restore mdp_op since MDPOP_ASCALE have been cleared */
		/* restore parameters that may have been overwritten */
		blit_op->mdp_op = mdp_op;
		blit_op->src.p0 = src_p0;
		blit_op->src.p1 = src_p1;
		blit_op->dst.p0 = dst_p0;
	}

	if ((dst_h < 0) || (src_w < 0))