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

Commit 4ef53f96 authored by Xipeng Gu's avatar Xipeng Gu Committed by xiaolin
Browse files

fbdev: msm: add property of panel addr offset



Since some panel addr does not start from zero, add
property for the offset.

Change-Id: I7f22138f969418e87a1d7ed8b116b4fdc45a84d6
Signed-off-by: default avatarXipeng Gu <guxipeng@codeaurora.org>
parent 3fca24c8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -384,6 +384,9 @@ the fps window.
					--> Sleep value (in ms)
- qcom,partial-update-enabled:		Boolean used to enable partial
					panel update for command mode panels.
- qcom,partial-update-addr-offset:	An array of two values indicate the panel
					column, row address offset value.
					Two default values are 0.
- qcom,mdss-dsi-horizontal-line-idle:	List of width ranges (EC - SC) in pixels indicating
					additional idle time in dsi clock cycles that is needed
					to compensate for smaller line width.
+16 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -662,6 +662,12 @@ static int mdss_dsi_set_col_page_addr(struct mdss_panel_data *pdata,
			return 0;
		}

		if (pinfo->partial_update_col_addr_offset)
			roi.x += pinfo->partial_update_col_addr_offset;

		if (pinfo->partial_update_row_addr_offset)
			roi.y += pinfo->partial_update_row_addr_offset;

		if (pinfo->dcs_cmd_by_left) {
			if (left_or_both && ctrl->ndx == DSI_CTRL_RIGHT) {
				/* 2A/2B sent by left already */
@@ -2099,6 +2105,7 @@ static void mdss_dsi_parse_esd_params(struct device_node *np,
static int mdss_dsi_parse_panel_features(struct device_node *np,
	struct mdss_dsi_ctrl_pdata *ctrl)
{
	u32 value[2];
	struct mdss_panel_info *pinfo;

	if (!np || !ctrl) {
@@ -2116,6 +2123,14 @@ static int mdss_dsi_parse_panel_features(struct device_node *np,
					pinfo->partial_update_enabled);
		ctrl->set_col_page_addr = mdss_dsi_set_col_page_addr;
		if (pinfo->partial_update_enabled) {
			int rc = of_property_read_u32_array(np,
				"qcom,partial-update-addr-offset",
				value, 2);
			pinfo->partial_update_col_addr_offset =
				(!rc ? value[0] : 0);
			pinfo->partial_update_row_addr_offset =
				(!rc ? value[1] : 0);

			pinfo->partial_update_roi_merge =
					of_property_read_bool(np,
					"qcom,partial-update-roi-merge");
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2008-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2008-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -690,6 +690,8 @@ struct mdss_panel_info {
	bool esd_rdy;
	bool partial_update_supported; /* value from dts if pu is supported */
	bool partial_update_enabled; /* is pu currently allowed */
	u32 partial_update_col_addr_offset; /* panel column addr offset */
	u32 partial_update_row_addr_offset; /* panel row addr offset */
	u32 dcs_cmd_by_left;
	u32 partial_update_roi_merge;
	struct ion_handle *splash_ihdl;