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

Commit 2d3168d4 authored by Abhijit Kulkarni's avatar Abhijit Kulkarni Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: Skip setting up Qseed3 for non-vig pipes



Qseed3 is supported on VIG pipes only, driver should skip
enabling it on non-VIG pipes. Changes adds support to skip
programming Qseed3 on non-vig pipes.

Change-Id: Ie3d3889cc6c35011f239468ddf465c553a6b1c97
Signed-off-by: default avatarSushil Chauhan <sushilchauhan@codeaurora.org>
Signed-off-by: default avatarAbhijit Kulkarni <kabhijit@codeaurora.org>
parent 7524732a
Loading
Loading
Loading
Loading
+17 −9
Original line number Diff line number Diff line
@@ -1732,6 +1732,11 @@ int mdss_mdp_qseed3_setup(struct mdss_mdp_pipe *pipe,
		return -EINVAL;
	}

	if (!scaler) {
		pr_debug("scaler pointer is NULL\n");
		return 0;
	}

	pr_debug("scaler->enable=%d", scaler->enable);
	op_mode = readl_relaxed(MDSS_MDP_REG_SCALER_OP_MODE +
			offset);
@@ -1849,17 +1854,21 @@ int mdss_mdp_qseed3_setup(struct mdss_mdp_pipe *pipe,
	return rc;
}

static int mdss_mdp_scale_setup(struct mdss_mdp_pipe *pipe)
static int mdss_mdp_scale_setup(struct mdss_mdp_pipe *pipe,
		enum pp_config_block pp_blk)
{
	struct mdss_data_type *mdata;
	int rc = 0;

	mdata = mdss_mdp_get_mdata();
	if (test_bit(MDSS_CAPS_QSEED3, mdata->mdss_caps_map))
		rc = mdss_mdp_qseed3_setup(pipe, SSPP_VIG, 0);
		rc = mdss_mdp_qseed3_setup(pipe, pp_blk, 0);
	else
		rc = mdss_mdp_qseed2_setup(pipe);

	if (rc)
		pr_err("scale setup on pipe %d type %d failed ret %d\n",
			pipe->num, pipe->type, rc);
	return rc;
}

@@ -1870,18 +1879,17 @@ int mdss_mdp_pipe_pp_setup(struct mdss_mdp_pipe *pipe, u32 *op)
	if (!pipe)
		return -ENODEV;

	ret = mdss_mdp_scale_setup(pipe);
	if (ret) {
		pr_err("scale setup on pipe %d type %d failed ret %d\n",
			pipe->num, pipe->type, ret);
		return -EINVAL;
	}

	switch (pipe->type) {
	case MDSS_MDP_PIPE_TYPE_VIG:
		ret = mdss_mdp_scale_setup(pipe, SSPP_VIG);
		if (ret)
			return -EINVAL;
		ret = pp_vig_pipe_setup(pipe, op);
		break;
	case MDSS_MDP_PIPE_TYPE_RGB:
		ret = mdss_mdp_scale_setup(pipe, SSPP_RGB);
		if (ret)
			return -EINVAL;
		ret = pp_rgb_pipe_setup(pipe, op);
		break;
	case MDSS_MDP_PIPE_TYPE_DMA: