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

Commit d0c9ced1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mdss: mdp: Add downscale factor for rotator"

parents 5b68799e 2bd0648c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -286,6 +286,10 @@ Optional properties:
			      feature is available or not.
- qcom,mdss-has-rotator-downscale: Boolean property to indicate if rotator
				   downscale feature is available or not.
- qcom,mdss-rot-downscale-min: This integer value indicates the Minimum
				downscale factor supported by rotator.
- qcom,mdss-rot-downscale-max: This integer value indicates the Maximum
				downscale factor supported by rotator.
- qcom,mdss-ad-off:		Array of offset addresses for the available
				Assertive Display (AD) blocks. These offsets
				are calculated from the register "mdp_phys"
@@ -744,6 +748,8 @@ Example:
		qcom,mdss-no-hist-vote;
		qcom,mdss-traffic-shaper-enabled;
		qcom,mdss-has-rotator-downscale;
		qcom,mdss-rot-downscale-min = <2>;
		qcom,mdss-rot-downscale-max = <16>;

		qcom,mdss-has-pingpong-split;
		qcom,mdss-pipe-vig-xin-id = <0 4 8>;
+2 −0
Original line number Diff line number Diff line
@@ -385,6 +385,8 @@ struct mdss_data_type {
	u32 *vbif_rt_qos;
	u32 *vbif_nrt_qos;
	u32 npriority_lvl;
	u32 rot_dwnscale_min;
	u32 rot_dwnscale_max;

	struct mult_factor ab_factor;
	struct mult_factor ib_factor;
+21 −0
Original line number Diff line number Diff line
@@ -2382,6 +2382,14 @@ ssize_t mdss_mdp_show_capabilities(struct device *dev,
	if (mdata->clk_factor.numer)
		SPRINT("clk_fudge_factor=%u,%u\n", mdata->clk_factor.numer,
			mdata->clk_factor.denom);
	if (mdata->has_rot_dwnscale) {
		if (mdata->rot_dwnscale_min)
			SPRINT("rot_dwnscale_min=%u\n",
				mdata->rot_dwnscale_min);
		if (mdata->rot_dwnscale_max)
			SPRINT("rot_dwnscale_max=%u\n",
				mdata->rot_dwnscale_max);
	}
	SPRINT("features=");
	if (mdata->has_bwc)
		SPRINT(" bwc");
@@ -4146,6 +4154,19 @@ static int mdss_mdp_parse_dt_misc(struct platform_device *pdev)
		 "qcom,mdss-traffic-shaper-enabled");
	mdata->has_rot_dwnscale = of_property_read_bool(pdev->dev.of_node,
		"qcom,mdss-has-rotator-downscale");
	if (mdata->has_rot_dwnscale) {
		rc = of_property_read_u32(pdev->dev.of_node,
			"qcom,mdss-rot-downscale-min",
			&mdata->rot_dwnscale_min);
		if (rc)
			pr_err("Min rotator downscale property not specified\n");

		rc = of_property_read_u32(pdev->dev.of_node,
			"qcom,mdss-rot-downscale-max",
			&mdata->rot_dwnscale_max);
		if (rc)
			pr_err("Max rotator downscale property not specified\n");
	}

	rc = of_property_read_u32(pdev->dev.of_node,
		"qcom,mdss-dram-channels", &mdata->bus_channels);
+6 −2
Original line number Diff line number Diff line
@@ -1199,13 +1199,17 @@ static int mdss_rotator_config_dnsc_factor(struct mdss_rot_mgr *mgr,
		}
		entry->dnsc_factor_w = src_w / dst_w;
		bit = fls(entry->dnsc_factor_w);
		if ((entry->dnsc_factor_w & ~BIT(bit - 1)) || (bit > 5)) {
		/*
		 * New Chipsets supports downscale upto 1/64
		 * change the Bit check from 5 to 7 to support 1/64 down scale
		 */
		if ((entry->dnsc_factor_w & ~BIT(bit - 1)) || (bit > 7)) {
			ret = -EINVAL;
			goto dnsc_err;
		}
		entry->dnsc_factor_h = src_h / dst_h;
		bit = fls(entry->dnsc_factor_h);
		if ((entry->dnsc_factor_h & ~BIT(bit - 1)) || (bit > 5)) {
		if ((entry->dnsc_factor_h & ~BIT(bit - 1)) || (bit > 7)) {
			ret = -EINVAL;
			goto dnsc_err;
		}