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

Commit e5ec30d6 authored by Lloyd Atkinson's avatar Lloyd Atkinson Committed by Narendra Muppalla
Browse files

drm/msm/sde: reset ctl mixer config at end of use case



Need to take the control path out of any source split or other
configuration at the end of a use case to prepare for the next
client.

Change-Id: I9a2fb57dcafc576a23a13da1906a44e9992aeb74
Signed-off-by: default avatarLloyd Atkinson <latkinso@codeaurora.org>
parent 703eb906
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -269,6 +269,9 @@ static void _sde_crtc_blend_setup(struct drm_crtc *crtc)
		}
		mixer[i].mixer_op_mode = 0;
		mixer[i].flush_mask = 0;
		if (mixer[i].hw_ctl->ops.clear_all_blendstages)
			mixer[i].hw_ctl->ops.clear_all_blendstages(
					mixer[i].hw_ctl);
	}

	/* initialize stage cfg */
+12 −0
Original line number Diff line number Diff line
@@ -258,6 +258,17 @@ static int sde_hw_ctl_reset_control(struct sde_hw_ctl *ctx)
	return -EINVAL;
}

static void sde_hw_ctl_clear_all_blendstages(struct sde_hw_ctl *ctx)
{
	struct sde_hw_blk_reg_map *c = &ctx->hw;
	int i;

	for (i = 0; i < ctx->mixer_count; i++) {
		SDE_REG_WRITE(c, CTL_LAYER(LM_0 + i), 0);
		SDE_REG_WRITE(c, CTL_LAYER_EXT(LM_0 + i), 0);
	}
}

static void sde_hw_ctl_setup_blendstage(struct sde_hw_ctl *ctx,
	enum sde_lm lm, struct sde_hw_stage_cfg *stage_cfg, u32 index)
{
@@ -389,6 +400,7 @@ static void _setup_ctl_ops(struct sde_hw_ctl_ops *ops,
	ops->trigger_start = sde_hw_ctl_trigger_start;
	ops->setup_intf_cfg = sde_hw_ctl_intf_cfg;
	ops->reset = sde_hw_ctl_reset_control;
	ops->clear_all_blendstages = sde_hw_ctl_clear_all_blendstages;
	ops->setup_blendstage = sde_hw_ctl_setup_blendstage;
	ops->get_bitmask_sspp = sde_hw_ctl_get_bitmask_sspp;
	ops->get_bitmask_mixer = sde_hw_ctl_get_bitmask_mixer;
+12 −0
Original line number Diff line number Diff line
@@ -125,6 +125,18 @@ struct sde_hw_ctl_ops {
		u32 *flushbits,
		enum sde_wb blk);

	/**
	 * Set all blend stages to disabled
	 * @ctx       : ctl path ctx pointer
	 */
	void (*clear_all_blendstages)(struct sde_hw_ctl *ctx);

	/**
	 * Configure layer mixer to pipe configuration
	 * @ctx       : ctl path ctx pointer
	 * @lm        : layer mixer enumeration
	 * @cfg       : blend stage configuration
	 */
	void (*setup_blendstage)(struct sde_hw_ctl *ctx,
		enum sde_lm lm, struct sde_hw_stage_cfg *cfg, u32 index);
};