disp: msm: Parsing and store panel's 0xDA register info

Since ALS sensor's Firmware needs to keep track the PWM duty cycle of
each panels' version, therefore the panels' register 0xDA will be used
to identify the PWM duty cycle programmed in each panels' version.
The new /sys/class/drm/card0-DSI1/panelRegDA sysfs will be created,
and it will show the panel's 0XDA reg information.

Change-Id: I997fb15040102b784eeb0a7318239bda4f59ac4b
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1697630
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:
Bang Nguyen 2020-01-10 08:25:41 -06:00 • committed by tongkun1
commit 1060f5f6e5
4 changed files with 5 additions and 0 deletions

View file

@ -7206,6 +7206,7 @@ int dsi_display_get_info(struct drm_connector *connector,
info->panel_id = display->panel->panel_id;
info->panel_ver = display->panel->panel_ver;
info->panel_regDA = display->panel->panel_regDA;
strncpy(info->panel_name, display->panel->panel_name,
sizeof(display->panel->panel_name));

View file

@ -1656,6 +1656,7 @@ int dsi_panel_parse_panel_cfg(struct dsi_panel *panel, bool is_primary)
DSI_DEBUG("esd_utage_enable=%d\n", panel->esd_utag_enable);
panel_ver = (u32)panel->panel_ver;
panel->panel_regDA = (u32)panel->panel_ver & 0xff;
DSI_INFO("BL: panel(%s) =%s, panel_id =0x%016llx panel_ver=0x%016llx\n",
is_primary? "primary": "secondary",
panel->panel_name, panel->panel_id, panel->panel_ver);

View file

@ -309,6 +309,7 @@ struct dsi_panel {
bool esd_utag_enable;
u64 panel_id;
u64 panel_ver;
u32 panel_regDA;
char panel_name[DSI_PANEL_MAX_PANEL_LEN];
u32 disp_on_chk_val;

View file

@ -753,6 +753,7 @@ struct msm_resource_caps_info {
* @is_connected: Set to true if display is connected
* @panel_id
* @panel_ver
* @panel_regDA
* @panel_name[MSM_DISP_NAME_LEN_MAX];
* @width_mm: Physical width
* @height_mm: Physical height
@ -785,6 +786,7 @@ struct msm_display_info {
uint64_t panel_id;
uint64_t panel_ver;
uint32_t panel_regDA;
char panel_name[MSM_DISP_NAME_LEN_MAX];
unsigned int width_mm;