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

Commit ac4bd1fd 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: add support for RGB pipes without scalar blocks"

parents 678adbd0 a0b35e25
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -230,6 +230,8 @@ Optional properties:
				then a default value of 128 pixels would be used.
- qcom,mdss-has-bwc: Boolean property to indicate the presence of bandwidth
		      compression feature in the rotator.
- qcom,mdss-has-non-scalar-rgb: Boolean property to indicate the presence of RGB
				pipes which have no scaling support.
- qcom,mdss-has-decimation: Boolean property to indicate the presence of
			    decimation feature in fetch.
- qcom,mdss-ad-off:		Array of offset addresses for the available
@@ -409,6 +411,7 @@ Example:
		qcom,mdss-rotator-ot-limit = <2>;
		qcom,mdss-smp-mb-per-pipe = <2>;
		qcom,mdss-pref-prim-intf = "dsi";
		qcom,mdss-has-non-scalar-rgb;
		qcom,mdss-has-bwc;
		qcom,mdss-has-decimation;
		qcom,mdss-wfd-mode = "intf";
+1 −0
Original line number Diff line number Diff line
@@ -116,6 +116,7 @@ struct mdss_data_type {
	u32 has_decimation;
	u32 wfd_mode;
	u8 has_wb_ad;
	u8 has_non_scalar_rgb;

	u32 rotator_ot_limit;
	u32 mdp_irq_mask;
+4 −0
Original line number Diff line number Diff line
@@ -1305,6 +1305,8 @@ static ssize_t mdss_mdp_show_capabilities(struct device *dev,
		SPRINT(" decimation");
	if (mdata->highest_bank_bit)
		SPRINT(" tile_format");
	if (mdata->has_non_scalar_rgb)
		SPRINT(" non_scalar_rgb");
	SPRINT("\n");

	return cnt;
@@ -2273,6 +2275,8 @@ static int mdss_mdp_parse_dt_misc(struct platform_device *pdev)
		"qcom,mdss-rotator-ot-limit", &data);
	mdata->rotator_ot_limit = (!rc ? data : 0);

	mdata->has_non_scalar_rgb = of_property_read_bool(pdev->dev.of_node,
		"qcom,mdss-has-non-scalar-rgb");
	mdata->has_bwc = of_property_read_bool(pdev->dev.of_node,
					       "qcom,mdss-has-bwc");
	mdata->has_decimation = of_property_read_bool(pdev->dev.of_node,
+14 −1
Original line number Diff line number Diff line
@@ -360,6 +360,7 @@ static int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd,
	struct mdp_histogram_start_req hist;
	int ret;
	u32 bwc_enabled;
	bool is_vig_needed = false;

	if (mdp5_data->ctl == NULL)
		return -ENODEV;
@@ -420,10 +421,16 @@ static int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd,
		return -ENODEV;
	}

	if ((mdata->has_non_scalar_rgb) &&
		((req->src_rect.w != req->dst_rect.w) ||
			(req->src_rect.h != req->dst_rect.h)))
		is_vig_needed = true;

	if (req->id == MSMFB_NEW_REQUEST) {
		if (req->flags & MDP_OV_PIPE_FORCE_DMA)
			pipe_type = MDSS_MDP_PIPE_TYPE_DMA;
		else if (fmt->is_yuv || (req->flags & MDP_OV_PIPE_SHARE))
		else if (fmt->is_yuv || (req->flags & MDP_OV_PIPE_SHARE) ||
				is_vig_needed)
			pipe_type = MDSS_MDP_PIPE_TYPE_VIG;
		else
			pipe_type = MDSS_MDP_PIPE_TYPE_RGB;
@@ -461,6 +468,12 @@ static int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd,
			return pipe ? PTR_ERR(pipe) : -ENODEV;
		}

		if (is_vig_needed && (pipe->type != MDSS_MDP_PIPE_TYPE_VIG)) {
			pr_err("pipe is non-scalar ndx=%x\n", req->id);
			ret = -EINVAL;
			goto exit_fail;
		}

		if (pipe->mixer != mixer) {
			if (!mixer->ctl || (mixer->ctl->mfd != mfd)) {
				pr_err("Can't switch mixer %d->%d pnum %d!\n",