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

Commit d04fc76f authored by Sree Sesha Aravind Vadrevu's avatar Sree Sesha Aravind Vadrevu
Browse files

msm: mdss: Modify SMP requirement for BWC decompression



BWC SMP buffer allocations are different from BWC fetch strides.
The Detile write of BWC is segmented into 16 algined segments for
every line buffer. This has to be taken into account and based on the
format the buffers need to be channeled.

Change-Id: I168014709bd81bfb189ce8cb3d1224f911838ba7
Signed-off-by: default avatarSree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
parent 001053d2
Loading
Loading
Loading
Loading
+25 −0
Original line number Original line Diff line number Diff line
@@ -176,6 +176,31 @@ int mdss_mdp_smp_reserve(struct mdss_mdp_pipe *pipe)
			pipe->src_fmt, &ps);
			pipe->src_fmt, &ps);
		if (rc)
		if (rc)
			return rc;
			return rc;
		/*
		 * Override fetch strides with SMP buffer size for both the
		 * planes
		 */
		if (pipe->src_fmt->fetch_planes == MDSS_MDP_PLANE_INTERLEAVED) {
			/*
			 * BWC line buffer needs to be divided into 16
			 * segments and every segment is aligned to format
			 * specific RAU size
			 */
			ps.ystride[0] = ALIGN(pipe->src.w / 16 , 32) * 16 *
				ps.rau_h[0] * pipe->src_fmt->bpp;
			ps.ystride[1] = 0;
		} else {
			u32 bwc_width = ALIGN(pipe->src.w / 16, 64) * 16;
			ps.ystride[0] = bwc_width * ps.rau_h[0];
			ps.ystride[1] = bwc_width * ps.rau_h[1];
			/*
			 * Since chroma for H1V2 is not subsampled it needs
			 * to be accounted for with bpp factor
			 */
			if (pipe->src_fmt->chroma_sample ==
				MDSS_MDP_CHROMA_H1V2)
				ps.ystride[1] *= 2;
		}
		pr_debug("BWC SMP strides ystride0=%x ystride1=%x\n",
		pr_debug("BWC SMP strides ystride0=%x ystride1=%x\n",
			ps.ystride[0], ps.ystride[1]);
			ps.ystride[0], ps.ystride[1]);
	} else {
	} else {