disp: msm: dp: add pixel base offset support in device tree

Parse pixel base offset from "qcom,pixel-base-off" node in device
tree to differentiate pixel base offset in different hardwares.

Change-Id: Ia8eac1a7c3dba3eaff6b88cd7f6a467f288cdf4b
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
Signed-off-by: Nilesh Laad <quic_nlaad@quicinc.com>
This commit is contained in:
Nilesh Laad 2023-03-31 17:44:47 +05:30 committed by Gerrit - the friendly Code Review server
parent 6c72a97981
commit dfce8892e1
4 changed files with 9 additions and 0 deletions

View File

@ -2886,6 +2886,7 @@ struct dp_catalog *dp_catalog_get(struct device *dev, struct dp_parser *parser)
strlcpy(catalog->exe_mode, "hw", sizeof(catalog->exe_mode));
dp_catalog = &catalog->dp_catalog;
dp_catalog->parser = parser;
dp_catalog->aux = aux;
dp_catalog->ctrl = ctrl;

View File

@ -257,6 +257,7 @@ struct dp_catalog {
struct dp_catalog_hpd hpd;
struct dp_catalog_sub *sub;
struct dp_parser *parser;
void (*set_exe_mode)(struct dp_catalog *dp_catalog, char *mode);
int (*get_reg_dump)(struct dp_catalog *dp_catalog,

View File

@ -167,6 +167,12 @@ static int dp_parser_misc(struct dp_parser *parser)
if (rc)
parser->max_lclk_khz = DP_MAX_LINK_CLK_KHZ;
for (i = 0; i < MAX_DP_MST_STREAMS; i++) {
of_property_read_u32_index(of_node,
"qcom,pixel-base-off", i,
&parser->pixel_base_off[i]);
}
return 0;
}

View File

@ -249,6 +249,7 @@ struct dp_parser {
bool gpio_aux_switch;
bool lphw_hpd;
u32 mst_fixed_port[MAX_DP_MST_STREAMS];
u32 pixel_base_off[MAX_DP_MST_STREAMS];
int (*parse)(struct dp_parser *parser);
struct dp_io_data *(*get_io)(struct dp_parser *parser, char *name);