mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
Merge "disp: msm: dp: add eDP panel notifier support" into display-kernel.lnx.5.4.4
This commit is contained in:
commit
7549f1dbd3
5 changed files with 38 additions and 0 deletions
|
|
@ -2095,6 +2095,8 @@ static int dp_init_sub_modules(struct dp_display_private *dp)
|
|||
panel_in.connector = dp->dp_display.base_connector;
|
||||
panel_in.base_panel = NULL;
|
||||
panel_in.parser = dp->parser;
|
||||
panel_in.is_edp = dp->dp_display.is_edp;
|
||||
panel_in.panel_notifier_support = dp->parser->panel_notifier_support;
|
||||
|
||||
dp->panel = dp_panel_get(&panel_in);
|
||||
if (IS_ERR(dp->panel)) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
|
|
@ -3015,6 +3016,8 @@ struct dp_panel *dp_panel_get(struct dp_panel_in *in)
|
|||
struct dp_panel_private *panel;
|
||||
struct dp_panel *dp_panel;
|
||||
struct sde_connector *sde_conn;
|
||||
struct device *dev;
|
||||
struct device_node *of_node = NULL;
|
||||
|
||||
if (!in->dev || !in->catalog || !in->aux ||
|
||||
!in->link || !in->connector) {
|
||||
|
|
@ -3029,6 +3032,13 @@ struct dp_panel *dp_panel_get(struct dp_panel_in *in)
|
|||
goto error;
|
||||
}
|
||||
|
||||
dev = devm_kzalloc(in->dev, sizeof(*dev), GFP_KERNEL);
|
||||
if (!dev) {
|
||||
DP_ERR("failed to allocate dev\n");
|
||||
rc = -ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
|
||||
panel->dev = in->dev;
|
||||
panel->aux = in->aux;
|
||||
panel->catalog = in->catalog;
|
||||
|
|
@ -3088,6 +3098,23 @@ struct dp_panel *dp_panel_get(struct dp_panel_in *in)
|
|||
|
||||
dp_panel_edid_register(panel);
|
||||
|
||||
if (in->is_edp && in->panel_notifier_support) {
|
||||
of_node = of_parse_phandle(in->dev->of_node, "qcom,edp-default-panel", 0);
|
||||
if (!of_node) {
|
||||
DP_ERR("phandle for default panel not found\n");
|
||||
} else {
|
||||
drm_panel_init(&dp_panel->drm_panel);
|
||||
dp_panel->drm_panel.dev = dev;
|
||||
dev->of_node = of_node;
|
||||
|
||||
rc = drm_panel_add(&dp_panel->drm_panel);
|
||||
if (rc)
|
||||
DP_ERR("Failed to add drm_panel\n");
|
||||
|
||||
dp_panel->connector->panel = &dp_panel->drm_panel;
|
||||
}
|
||||
}
|
||||
|
||||
return dp_panel;
|
||||
error:
|
||||
return ERR_PTR(rc);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
|
|
@ -74,6 +75,8 @@ struct dp_panel_in {
|
|||
struct drm_connector *connector;
|
||||
struct dp_panel *base_panel;
|
||||
struct dp_parser *parser;
|
||||
bool is_edp;
|
||||
bool panel_notifier_support;
|
||||
};
|
||||
|
||||
struct dp_dsc_caps {
|
||||
|
|
@ -95,6 +98,7 @@ struct dp_panel {
|
|||
u8 fec_dpcd;
|
||||
u8 fec_sts_dpcd[DP_RECEIVER_FEC_STATUS_SIZE + 1];
|
||||
|
||||
struct drm_panel drm_panel;
|
||||
struct drm_dp_link link_info;
|
||||
struct sde_edid_ctrl *edid_ctrl;
|
||||
struct dp_panel_info pinfo;
|
||||
|
|
|
|||
|
|
@ -177,6 +177,10 @@ static int dp_parser_misc(struct dp_parser *parser)
|
|||
if (!parser->display_type)
|
||||
parser->display_type = "unknown";
|
||||
|
||||
parser->panel_notifier_support = of_property_read_bool(of_node,
|
||||
"qcom,panel-notifier-support");
|
||||
DP_DEBUG("panel-notifier-support = %d\n", parser->panel_notifier_support);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -266,6 +266,7 @@ struct dp_parser {
|
|||
bool has_widebus;
|
||||
bool gpio_aux_switch;
|
||||
bool lphw_hpd;
|
||||
bool panel_notifier_support;
|
||||
u32 mst_fixed_port[MAX_DP_MST_STREAMS];
|
||||
u32 pixel_base_off[MAX_DP_MST_STREAMS];
|
||||
const char *mst_fixed_display_type[MAX_DP_MST_STREAMS];
|
||||
|
|
|
|||
Loading…
Reference in a new issue