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

Commit 53601889 authored by Ingrid Gallardo's avatar Ingrid Gallardo Committed by Matt Wagantall
Browse files

msm: mdss: adjust per pipe qos luts according to pixel format



This change adjusts the qos luts to be configured
depending on the pixel format of the pipe.

Change-Id: I5a7830cf554ddd34aee7415df694674cf1e981a3
Signed-off-by: default avatarIngrid Gallardo <ingridg@codeaurora.org>
parent 10ceab67
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -349,8 +349,6 @@ Optional properties:
				will enable this dynamic limiting for the read
				operations in the platforms that require these
				limits.
- qcom,mdss-default-pipe-qos-lut: This value is used to program the default qos lut
				  register for the rt clients and nrt rotator read clients.
- qcom,mdss-clk-levels:		This array indicates the mdp core clock level selection
				array. Core clock is calculated for each frame and
				hence depending upon calculated value, clock rate
+1 −1
Original line number Diff line number Diff line
@@ -152,6 +152,7 @@ enum mdss_qos_settings {
	MDSS_QOS_OVERHEAD_FACTOR,
	MDSS_QOS_CDP,
	MDSS_QOS_OTLIM,
	MDSS_QOS_PER_PIPE_LUT,
	MDSS_QOS_MAX,
};

@@ -254,7 +255,6 @@ struct mdss_data_type {

	u32 default_ot_rd_limit;
	u32 default_ot_wr_limit;
	u32 default_pipe_qos_lut;

	u32 mdp_irq_mask;
	u32 mdp_hist_irq_mask;
+1 −4
Original line number Diff line number Diff line
@@ -1042,6 +1042,7 @@ static void mdss_mdp_hw_rev_caps_init(struct mdss_data_type *mdata)
		set_bit(MDSS_QOS_OVERHEAD_FACTOR, mdata->mdss_qos_map);
		set_bit(MDSS_QOS_CDP, mdata->mdss_qos_map);
		set_bit(MDSS_QOS_OTLIM, mdata->mdss_qos_map);
		set_bit(MDSS_QOS_PER_PIPE_LUT, mdata->mdss_qos_map);
		set_bit(MDSS_CAPS_YUV_CONFIG, mdata->mdss_caps_map);
		break;
	case MDSS_MDP_HW_REV_105:
@@ -2733,10 +2734,6 @@ static int mdss_mdp_parse_dt_misc(struct platform_device *pdev)
		"qcom,mdss-default-ot-wr-limit", &data);
	mdata->default_ot_wr_limit = (!rc ? data : 0);

	rc = of_property_read_u32(pdev->dev.of_node,
		"qcom,mdss-default-pipe-qos-lut", &data);
	mdata->default_pipe_qos_lut = (!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,
+18 −10
Original line number Diff line number Diff line
@@ -33,6 +33,11 @@
/* following offsets are relative to status register bit offset */
#define CLK_STATUS_OFFSET	0x0

#define QOS_LUT_WFD_READ	0x0
#define QOS_LUT_UBWC		0x55AAFF
#define QOS_LUT_420_CHROMA	0x555557
#define QOS_LUT_LINEAR		0x55555B

static DEFINE_MUTEX(mdss_mdp_sspp_lock);
static DEFINE_MUTEX(mdss_mdp_smp_lock);

@@ -59,17 +64,20 @@ static inline u32 mdss_mdp_pipe_read(struct mdss_mdp_pipe *pipe, u32 reg)

int mdss_mdp_pipe_qos_lut(struct mdss_mdp_pipe *pipe)
{
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();
	struct mdss_mdp_ctl *ctl = pipe->mixer_left->ctl;
	u32 qos_lut = mdata->default_pipe_qos_lut;

	if (!qos_lut)
		goto end;
	u32 qos_lut;

	/* set lowest priority lut for non-real time wfd */
	if ((ctl->intf_num == MDSS_MDP_NO_INTF) &&
			!pipe->mixer_left->rotator_mode)
		qos_lut = 0;
		qos_lut = QOS_LUT_WFD_READ; /* low priority for nrt wfd */
	else if (mdss_mdp_is_ubwc_format(pipe->src_fmt))
		qos_lut = QOS_LUT_UBWC;
	else if ((pipe->src_fmt->chroma_sample == MDSS_MDP_CHROMA_420) ||
			(pipe->src_fmt->fetch_planes ==
			MDSS_MDP_PLANE_PSEUDO_PLANAR))
		qos_lut = QOS_LUT_420_CHROMA; /* nv12 and planar 420 */
	else
		qos_lut = QOS_LUT_LINEAR; /* rest of the linear formats */

	pr_debug("lut:0x%x wfd:%d\n", qos_lut,
		((ctl->intf_num == MDSS_MDP_NO_INTF) &&
@@ -80,7 +88,6 @@ int mdss_mdp_pipe_qos_lut(struct mdss_mdp_pipe *pipe)
		qos_lut);
	mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF);

end:
	return 0;
}

@@ -1962,6 +1969,7 @@ int mdss_mdp_pipe_queue_data(struct mdss_mdp_pipe *pipe,
			mdss_mdp_pipe_write(pipe, MDSS_MDP_REG_VIG_OP_MODE,
			opmode);

		if (test_bit(MDSS_QOS_PER_PIPE_LUT, mdata->mdss_qos_map))
			mdss_mdp_pipe_qos_lut(pipe);

		mdss_mdp_pipe_panic_signal_ctrl(pipe, true);