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

Commit 8b428977 authored by Manoj Rao's avatar Manoj Rao
Browse files

mdss: pp: fix incorrect base addr len in csc setup



As a part of VG pipe setup the post-proc driver
constructs the color space conversion table. This involves
programming the hardware using values from a static CSC
conversion table in the driver. Since MMSS blocks remain 32-bit
addressable the iterator for hardware registers used in
post-proc driver should move ahead in
increments of 32-bit to program these values into mdss-pp
registers and not the width of a pointer in memory.
Use 32-bit to fix incorrect CSC programming of the hardware.

CRs-Fixed: 642481
Change-Id: I49b4b008c1ebb1a8032603fe2f16b1fe893d91ff
Signed-off-by: default avatarManoj Rao <manojraj@codeaurora.org>
parent 4d10f813
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -495,7 +495,7 @@ int mdss_mdp_csc_setup_data(u32 block, u32 blk_idx, u32 tbl_idx,
		if (i & 0x1) {
			val |= data->csc_mv[i] << 16;
			writel_relaxed(val, addr);
			addr += sizeof(u32 *);
			addr += sizeof(u32);
		} else {
			val = data->csc_mv[i];
		}
@@ -506,7 +506,7 @@ int mdss_mdp_csc_setup_data(u32 block, u32 blk_idx, u32 tbl_idx,
	for (i = 0; i < 3; i++) {
		writel_relaxed(data->csc_pre_bv[i], addr);
		writel_relaxed(data->csc_post_bv[i], addr + CSC_POST_OFF);
		addr += sizeof(u32 *);
		addr += sizeof(u32);
	}

	addr = base + CSC_LV_OFF;
@@ -516,7 +516,7 @@ int mdss_mdp_csc_setup_data(u32 block, u32 blk_idx, u32 tbl_idx,

		val = (data->csc_post_lv[i] << 8) | data->csc_post_lv[i+1];
		writel_relaxed(val, addr + CSC_POST_OFF);
		addr += sizeof(u32 *);
		addr += sizeof(u32);
	}

	return ret;