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

Commit 3bef26f2 authored by Alan Kwong's avatar Alan Kwong
Browse files

msm: sde: add solid color support for writeback verification



Add solid color support to facilitate testing of writeback path
with injected constant color pattern.

CRs-Fixed: 2009714
Change-Id: I45037cd7d0c56086b52b0327079896a315288b88
Signed-off-by: default avatarAlan Kwong <akwong@codeaurora.org>
parent 5b4d71b9
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -831,6 +831,9 @@ static void sde_hw_rotator_setup_fetchengine(struct sde_hw_rotator_context *ctx,
	if (fmt->pixel_mode == SDE_MDP_PIXEL_10BIT)
		src_format |= BIT(14); /* UNPACK_DX_FORMAT */

	if (rot->solid_fill)
		src_format |= BIT(22); /* SOLID_FILL */

	/* SRC_FORMAT */
	SDE_REGDMA_BLKWRITE_DATA(wrptr, src_format);

@@ -865,6 +868,10 @@ static void sde_hw_rotator_setup_fetchengine(struct sde_hw_rotator_context *ctx,
			fetch_blocksize = SDE_ROT_SSPP_FETCH_BLOCKSIZE_128;
	}

	if (rot->solid_fill)
		SDE_REGDMA_WRITE(wrptr, ROT_SSPP_SRC_CONSTANT_COLOR,
				rot->constant_color);

	SDE_REGDMA_WRITE(wrptr, ROT_SSPP_FETCH_CONFIG,
			fetch_blocksize |
			SDE_ROT_SSPP_FETCH_CONFIG_RESET_VALUE |
+12 −0
Original line number Diff line number Diff line
@@ -68,5 +68,17 @@ int sde_rotator_r3_create_debugfs(struct sde_rot_mgr *mgr,
		return -EINVAL;
	}

	if (!debugfs_create_u32("solid_fill", 0644,
			debugfs_root, &hw_data->solid_fill)) {
		SDEROT_ERR("fail create solid_fill\n");
		return -EINVAL;
	}

	if (!debugfs_create_u32("constant_color", 0644,
			debugfs_root, &hw_data->constant_color)) {
		SDEROT_ERR("fail create constant_color\n");
		return -EINVAL;
	}

	return 0;
}
+4 −0
Original line number Diff line number Diff line
@@ -249,6 +249,8 @@ struct sde_hw_rotator_resource_info {
 * @hw:           mdp register mapped offset
 * @ops:          pointer to operations possible for the rotator HW
 * @sbuf_headroom: stream buffer headroom in lines
 * @solid_fill: true if solid fill is requested
 * @constant_color: solid fill constant color
 * @sbuf_ctx: list of active sbuf context in FIFO order
 * @vid_trigger: video mode trigger select
 * @cmd_trigger: command mode trigger select
@@ -295,6 +297,8 @@ struct sde_hw_rotator {

	u32    highest_bank;
	u32    sbuf_headroom;
	u32    solid_fill;
	u32    constant_color;

	spinlock_t rotctx_lock;
	spinlock_t rotisr_lock;