disp: msm: Set the dsi panel type

Parse the DTS panel type settings. Consider the default
panel physical type as LCD. We need to set OLED in DTS if
the panel is an OLED type.

Change-Id: Ib53651ab3861e75bf061f38d60a2f6135c1f537d
Signed-off-by: Wenjun Zhang <wjzhan@codeaurora.org>
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
This commit is contained in:
Yuan Zhao
2019-05-15 18:02:24 +08:00
committed by Gerrit - the friendly Code Review server
parent f2873cd69f
commit bb2f60b35c
2 changed files with 21 additions and 0 deletions

View File

@@ -3212,6 +3212,7 @@ struct dsi_panel *dsi_panel_get(struct device *parent,
{
struct dsi_panel *panel;
struct dsi_parser_utils *utils;
const char *panel_physical_type;
int rc = 0;
panel = kzalloc(sizeof(*panel), GFP_KERNEL);
@@ -3230,6 +3231,14 @@ struct dsi_panel *dsi_panel_get(struct device *parent,
if (!panel->name)
panel->name = DSI_PANEL_DEFAULT_LABEL;
/*
* Set panel type to LCD as default.
*/
panel->panel_type = DSI_DISPLAY_PANEL_TYPE_LCD;
panel_physical_type = utils->get_property(utils->data,
"qcom,mdss-dsi-panel-physical-type", NULL);
if (panel_physical_type && !strcmp(panel_physical_type, "oled"))
panel->panel_type = DSI_DISPLAY_PANEL_TYPE_OLED;
rc = dsi_panel_parse_host_config(panel);
if (rc) {
DSI_ERR("failed to parse host configuration, rc=%d\n",