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

Commit 0f9abb75 authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/dsi: add DSC slice-per-pkt restriction



Add validation check while parsing the device tree
to avoid DSC slice-per-pkt beyond 2 as it is not
supported.

Change-Id: I139cc79a8bd10a06c6913159e8ca583607917ab1
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent 3f3286e8
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2345,11 +2345,13 @@ static int dsi_panel_parse_dsc_params(struct dsi_display_mode *mode,
	priv_info->dsc.pic_width = mode->timing.h_active;
	priv_info->dsc.pic_height = mode->timing.v_active;

	rc = utils->read_u32(utils->data, "qcom,mdss-dsc-slice-per-pkt",
			&data);
	rc = utils->read_u32(utils->data, "qcom,mdss-dsc-slice-per-pkt", &data);
	if (rc) {
		pr_err("failed to parse qcom,mdss-dsc-slice-per-pkt\n");
		goto error;
	} else if (!data || (data > 2)) {
		pr_err("invalid dsc slice-per-pkt:%d\n", data);
		goto error;
	}
	priv_info->dsc.slice_per_pkt = data;