mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
Kernel: read panel supplier from device tree
Moto hardware revision need panel supplier info. Add code to read panel supplier from dtsi file. Change-Id: I7deb8a9b78c790f80459d3780d65a57699a35fee Reviewed-on: https://gerrit.mot.com/1540967 Reviewed-on: https://gerrit.mot.com/1697643 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Guobin Zhang <zhanggb@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
f12b293d60
commit
940f8ce404
4 changed files with 14 additions and 0 deletions
|
|
@ -7209,6 +7209,8 @@ int dsi_display_get_info(struct drm_connector *connector,
|
|||
info->panel_regDA = display->panel->panel_regDA;
|
||||
strncpy(info->panel_name, display->panel->panel_name,
|
||||
sizeof(display->panel->panel_name));
|
||||
strncpy(info->panel_supplier, display->panel->panel_supplier,
|
||||
sizeof(display->panel->panel_supplier));
|
||||
|
||||
switch (display->panel->panel_mode) {
|
||||
case DSI_OP_VIDEO_MODE:
|
||||
|
|
|
|||
|
|
@ -4036,6 +4036,7 @@ struct dsi_panel *dsi_panel_get(struct device *parent,
|
|||
const char *panel_physical_type;
|
||||
int rc = 0;
|
||||
u32 panel_idx = 0; /* Since only panel support for now */
|
||||
const char *pname;
|
||||
|
||||
panel = kzalloc(sizeof(*panel), GFP_KERNEL);
|
||||
if (!panel)
|
||||
|
|
@ -4055,6 +4056,15 @@ struct dsi_panel *dsi_panel_get(struct device *parent,
|
|||
if (!panel->name)
|
||||
panel->name = DSI_PANEL_DEFAULT_LABEL;
|
||||
|
||||
pname = utils->get_property(utils->data,
|
||||
"qcom,mdss-dsi-panel-supplier", NULL);
|
||||
if (!pname || strlen(pname) == 0) {
|
||||
DSI_WARN("Failed to get qcom,mdss-dsi-panel-supplier\n");
|
||||
strlcpy(panel->panel_supplier, DSI_PANEL_UNKNOWN_PANEL_NAME,
|
||||
sizeof(panel->panel_supplier));
|
||||
} else
|
||||
strlcpy(panel->panel_supplier, pname, sizeof(panel->panel_supplier));
|
||||
|
||||
/*
|
||||
* Set panel type to LCD as default.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -345,6 +345,7 @@ struct dsi_panel {
|
|||
u64 panel_ver;
|
||||
u32 panel_regDA;
|
||||
char panel_name[DSI_PANEL_MAX_PANEL_LEN];
|
||||
char panel_supplier[DSI_PANEL_MAX_PANEL_LEN];
|
||||
|
||||
u32 disp_on_chk_val;
|
||||
bool no_panel_on_read_support;
|
||||
|
|
|
|||
|
|
@ -788,6 +788,7 @@ struct msm_display_info {
|
|||
uint64_t panel_ver;
|
||||
uint32_t panel_regDA;
|
||||
char panel_name[MSM_DISP_NAME_LEN_MAX];
|
||||
char panel_supplier[MSM_DISP_NAME_LEN_MAX];
|
||||
|
||||
unsigned int width_mm;
|
||||
unsigned int height_mm;
|
||||
|
|
|
|||
Loading…
Reference in a new issue