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

Commit 835077e6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: Fix BWC width alignment"

parents 1b611297 2d5e6a2e
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -166,7 +166,7 @@ int mdss_mdp_smp_reserve(struct mdss_mdp_pipe *pipe)
	struct mdss_mdp_plane_sizes ps;
	int i;
	int rc = 0, rot_mode = 0;
	u32 nlines, format;
	u32 nlines, format, seg_w;
	u16 width;

	width = pipe->src.w >> pipe->horz_deci;
@@ -178,19 +178,17 @@ int mdss_mdp_smp_reserve(struct mdss_mdp_pipe *pipe)
			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
		 * planes. 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;
		seg_w = DIV_ROUND_UP(pipe->src.w, 16);
		if (pipe->src_fmt->fetch_planes == MDSS_MDP_PLANE_INTERLEAVED) {
			ps.ystride[0] = ALIGN(seg_w, 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;
			u32 bwc_width = ALIGN(seg_w, 64) * 16;
			ps.ystride[0] = bwc_width * ps.rau_h[0];
			ps.ystride[1] = bwc_width * ps.rau_h[1];
			/*