Commit Graph
1226 Commits
Author SHA1 Message Date
hujing3 aa36d72819 msm/dsi: add panel tp rst configs
dsi:
add panel tp rst configs
to support tp rst & lcd rst power sequences per panel

Change-Id: I7bf17361fa18abb9de9fcb601e9ac39b75dd844c
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1648198
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:43:20 -03:00
wangyq13 a1ef06c987 kernel: dsi: pull down reset pin when shutdown
kernel/dsi:
Pull down reset pin when system shutdown.

Change-Id: Ibad88c056f683aa7f45746a0fa09d72c9826a22a
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1648436
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jing Hu <hujing3@lenovo.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:43:20 -03:00
wangyq13 ed6ef5cfb4 dsi: add new backlight control type I2C
dsi:
Add new backlight I2C.
Can't use WLED type, because WLED type don't consider if backlight
device is inited later then panel.

Change-Id: I1dcb4e10eaaecca8da4d44e384b1e49fb351693c
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1621694
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hua Tan <tanhua1@motorola.com>
Reviewed-by: Jing Hu <hujing3@lenovo.com>
Reviewed-by: Dezhen Hou <houdz1@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:43:20 -03:00
tanhua1 8a85c98dcf drm/msm/sde: limit the backlight min brightness as bl_min_level
High-precision brightness will set the brightness level from bl_min_level to
bl_max_level. If we enable 12bit brightness, in fact, the hardware will not
tolerate very low brightness such as level '1 - 9' in liberty, these levels
cause the backlight unstable.
So we have to define the minimum brightness by 'qcom,mdss-dsi-bl-min-level'
that the driver does not set the backlight level below that.

Change-Id: I0c1c76b959e33c2eaa551cd30875e05e983e5ecb
Signed-off-by: tanhua1 <tanhua1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1583985
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-by: Hua Tan <tanhua1@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:43:20 -03:00
zhanggb 75a2ceffd5 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: I460c9a93b582394ef0e4c0e613943ff44a6774b8
Reviewed-on: https://gerrit.mot.com/1540967
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1582087
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen 12558560de 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: Idfc4d7201351233c30e6a6f81776dcbc87f245ee
Signed-off-by: daiss1 <daiss1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1514791
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1582086
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
houdz1 f724804d47 dsi_panel: fix out-of-bounds issue
Before make the read operation, malloc the space of rx_buf.
To avoid the out-of-bounds  issue.

Change-Id: I6841d230af04b9a57b7281d8edc2e367e7f0ceab
Signed-off-by: houdz1 <houdz1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1583906
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Dezhen Hou <houdz1@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:43:20 -03:00
tanhua1 174d801415 backlight: support device hbm use 51 cmd
Guam/Guamp hbm use dcs cmd only, which combined with brightness
cmd, hbm send the 51 cmd, and no need to set brightness again.

Change-Id: Iee8f850bd5856210ec171f203ef7de2685fc3f5c
Signed-off-by: tanhua1 <tanhua1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1553084
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-by: Hua Tan <tanhua1@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:43:20 -03:00
tanhua1 313376a3ab backlight: add hbm gpio control driver
add hbm gpio control driver

Change-Id: I5f77916e54b8985a352f963ae7ae20b51d73d7e8
Reviewed-on: https://gerrit.mot.com/1546190
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-by: Hua Tan <tanhua1@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:43:20 -03:00
daiss1 7b6a915c99 msm/dsi: add backlight and hbm debug log
Modify:
add backlight and hbm debug log

Change-Id: I900457c2f233a1e2d6d2b6077427171e05b3787c
Signed-off-by: daiss1 <daiss1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1508369
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Dezhen Hou <houdz1@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1510693
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
houdz1 9ec15a8bea msm/dsi: set brightness at maximum if enabling LCD HBM
For LCD panel, set brightness at maximum while entering HBM and keep it
same afterwards whatever user space brightness. Previous user space
brightness is restored while exiting HBM. This change ensures LCD and
OLED HBM behavior consistent.

Change-Id: I90548156ce276df1d89058eb9625900682253fc2
Signed-off-by: houdz1 <houdz1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1486238
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1510692
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
houdz1 fc95d6e7a9 dsi_panel: Check the return status of the touch screen
Touch have a feature named "single tap".
1. When the feature enbled, we can not power down panel,
    and keep rest signal high.
2. When the feature disabled, the retrun value is s 0,
    Instead, the retrun value is 1.

Change-Id: Ib4530ebcd3132d60588dbe92ab23d0737983b6b4
Signed-off-by: houdz1 <houdz1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1499390
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509833
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
houdz1 56f1586746 drm/panel_param: optimize the code
1.Different projects have different features.
For example: there are not "ACL" feature for lcd panel.
So some feature cmd parse is failed.
We only release the struct dsi_panel_cmd_set when parse failed.
2.Must get "panel_hbm_fod" first, then parse param property.

Change-Id: If7f4395af70fcc5a775a1178f742773b32ffeaaa
Signed-off-by: houdz1 <houdz1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1485550
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509832
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
houdz1 2f1e274764 Display PanelMode: Add CABC control
Add CABC control interface for video mode panel. This interface is
also used by sde connector property.

Change-Id: I0b3e57c3c9491a02df427b8e84869029cb2ebf53
Signed-off-by: houdz1 <houdz1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1485623
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Chuwei Xu <xucw@motorola.com>
Reviewed-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-by: Shi-Yong Li <a22381@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509831
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
haojl2 7cf7caf775 msm: dsi_panel: refresh rate config option
TP:
Need to enforce CONFIG_DRM_DYNAMIC_REFRESH_RATE option within techpak
for racer.

Change-Id: I05b9749a138407d9eb627040f65d7e29588b226f
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1475865
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509830
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Konstantin Makariev 1f00fc0fe3 msm: dsi_panel: refresh rate config option
Make refresh rate change notification configurable through
CONFIG_DRM_DYNANMIC_REFRESH_RATE defconfig option.

Change-Id: I8214d97af698c0d0fdc0bfabbdcc5e1184da2291
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1474842
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509829
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen a493107108 disp: msm: Correct DSC 1.1 Rate control for Max val
Correct the DSC 1.1 Rate control for Max QP values for each ratio type
in dsi_dsc_ratio_type

Change-Id: I7888448618bfb180093a55afde142d2c8afdb72b
Signed-off-by: daiss1 <daiss1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1470114
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Bang Nguyen <bangnguyen@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509828
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Konstantin Makariev 82b89e1318 dsi: pushing display notifications
Pushing display notifications when it is turning on and off, so
registered listener can become aware of it state.

Change-Id: I94d83f640435fe73225befec09dc0d728e9dacd7
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1469860
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Eduardo Ferreira Barbosa <edufb@motorola.com>
Reviewed-by: Bang Nguyen <bangnguyen@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1471057
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Reviewed-on: https://gerrit.mot.com/1509827
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Nilaan Gunabalachandran a7578d4a8e Revert"disp:msm:sde: update splash resource allocation for dual display"
This reverts commit dbb1a3eee9.
This change causes regression in populating cont splash data for RM.

Mot-CRs-fixed: (CR)

Change-Id: If239eb921e022fcad54033ae3c7e9e4c3dc54736
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
Reviewed-on: https://gerrit.mot.com/1468943
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Shuo Yan <shuoyan@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Reviewed-by: Bang Nguyen <bangnguyen@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509826
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen b314019fb0 disp: msm: Restore old backlight setting after exitting HBM
The backlight and HBM are using the same command 0x51. The backlight
ranger will be from 0x000 to 0x640 while HBM on will be at 0xfff and
HBM off will be at 0x640. This is why the display driver should
restore the last backlight setting after exiting the HBM mode.

Change-Id: I23b9e190924d13c9cdf50a6543033647395a8cf6
Signed-off-by: daiss1 <daiss1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1469387
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1509825
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
houdz1 d99fbf3569 disp: msm:: reset the param value to the default value
During the panel is enable, we reset the value of the panel register
with default setting.

Change-Id: I88cbfc24b825ed24c32f1922c12a9d7da4b014d0
Signed-off-by: daiss1 <daiss1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1465699
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509824
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
houdz1 ae9b5e976e disp: msm: support for HBM_FOD mode
FOD: Fingerprint of display.

For tianma panel, there are two hbm mode.
1. hbm
2. hbm for FOD(hbm_fod);
But for SMD panel ,there is only one HBM mode.

Port from 9701d728f

Change-Id: I1faceb257462c293068f44a17ffff3821af6f841
Signed-off-by: daiss1 <daiss1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1465690
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dezhen Hou <houdz1@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509823
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Konstantin Makariev ec79d98bce disp: msm: add display frequency change notification
Added notifier to inform registered consumers about display changing
frequency.

Change-Id: Ic619b233a03f002862d059bfea671d7b2c5807af
Signed-off-by: daiss1 <daiss1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1465621
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit c69b88c83b5780c3ce858dbf362e0aa4a92b8c67)
Reviewed-on: https://gerrit.mot.com/1467534
Submit-Approved: Qiang Nie <nieqiang@motorola.com>
Tested-by: Qiang Nie <nieqiang@motorola.com>
Reviewed-on: https://gerrit.mot.com/1509822
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
a7301c 873665656a Revert "Revert "disp: msm: sde: update splash resource allocation for dual display""
Which causes dsi errors and white display:
+++Backtrace as below++++
01-01 00:48:06.812     0     0 I         : clk_branch_toggle+0x138/0x180
01-01 00:48:06.812     0     0 I         : clk_branch2_enable+0x28/0x38
01-01 00:48:06.812     0     0 I         : clk_core_enable+0x154/0x378
01-01 00:48:06.812     0     0 I         : clk_enable+0x2c/0x98
01-01 00:48:06.812     0     0 I         :
dsi_link_hs_clk_start+0x190/0x2b0
01-01 00:48:06.812     0     0 I         :
dsi_display_link_clk_enable+0x80/0x1f8
01-01 00:48:06.812     0     0 I         :
dsi_clk_update_link_clk_state+0x108/0x2c0
01-01 00:48:06.812     0     0 I         :
dsi_recheck_clk_state+0x238/0x4b8
01-01 00:48:06.812     0     0 I         : dsi_clk_req_state+0x1e8/0x260
01-01 00:48:06.812     0     0 I         :
dsi_display_clk_ctrl+0x44/0xa8
01-01 00:48:06.812     0     0 I         :
dsi_display_prepare+0x86c/0xba0
01-01 00:48:06.812     0     0 I         :
dsi_bridge_pre_enable+0x234/0x818
01-01 00:48:06.812     0     0 I         :
drm_bridge_pre_enable+0x34/0x40
01-01 00:48:06.812     0     0 I         : complete_commit+0x468/0xc18
01-01 00:48:06.812     0     0 I         :
_msm_drm_commit_work_cb+0x17c/0x308
01-01 00:48:06.812     0     0 I         : kthread_worker_fn+0x114/0x1f8
01-01 00:48:06.812     0     0 I         : kthread+0x128/0x138
01-01 00:48:06.812     0     0 I         : ret_from_fork+0x10/0x1c
01-01 00:48:06.812     0     0 I         : irq event stamp: 0
01-01 00:48:06.812     0     0 I         : hardirqs last  enabled at
(0): [<0000000000000000>]           (null)
01-01 00:48:06.812     0     0 I         : hardirqs last disabled at
(0): [<ffffff98feab7234>] copy_process+0x5f4/0x1bf8
01-01 00:48:06.812     0     0 I         : softirqs last  enabled at
(0): [<ffffff98feab724c>] copy_process+0x60c/0x1bf8
01-01 00:48:06.812     0     0 I         : softirqs last disabled at
(0): [<0000000000000000>]           (null)
01-01 00:48:06.812     0     0 W         : ---[ end trace
c6c359a711660861 ]---
01-01 00:48:06.817     0     0 E         : [drm:dsi_link_hs_clk_start]
*ERROR* [msm-dsi-error]: Failed to enable dsi byte clk, rc=-16
01-01 00:48:06.826     0     0 E         : [drm:dsi_link_hs_clk_start]
*ERROR* [msm-dsi-error]: failed to enable link HS clks, rc = -16
01-01 00:48:06.836     0     0 E         :
[drm:dsi_display_link_clk_enable] *ERROR* [msm-dsi-error]: failed to
turn on master hs link clocks, rc=-16
01-01 00:48:06.847     0     0 E         :
[drm:dsi_clk_update_link_clk_state] *ERROR* [msm-dsi-error]: failed to
start link clk type 2 rc=-16
01-01 00:48:06.857     0     0 E         : [drm:dsi_recheck_clk_state]
*ERROR* [msm-dsi-error]: failed to update clock state, rc = -16
01-01 00:48:06.867     0     0 E         : [drm:dsi_clk_req_state]
*ERROR* [msm-dsi-error]: Failed to adjust clock state rc = -16
01-01 00:48:06.876     0     0 E         : [drm:dsi_display_clk_ctrl]
*ERROR* [msm-dsi-error]: failed set clk state, rc = -16
01-01 00:48:06.885     0     0 E         : [drm:dsi_display_prepare]
*ERROR* [msm-dsi-error]: [qcom,mdss_dsi_mot_boe_269_800x600_cmd_v2]
failed to enable DSI link clocks, rc=-16
01-01 00:48:06.904     0     0 E dsi_pll_7nm_lock_status: DSI PLL(1)
lock failed, status=0x00000000
01-01 00:48:06.911     0     0 E dsi_pll_enable: PLL(1) lock failed
01-01 00:48:06.916     0     0 E vco_7nm_prepare: pll(1) enable failed,
rc=-110
01-01 00:48:06.921     0     0 E         : [drm:dsi_link_hs_clk_start]
*ERROR* [msm-dsi-error]: Failed to prepare dsi byte clk, rc=-110
01-01 00:48:06.931     0     0 E         : [drm:dsi_link_hs_clk_start]
*ERROR* [msm-dsi-error]: failed to prepare link HS clks, rc = -110
01-01 00:48:06.941     0     0 E         :
[drm:dsi_display_link_clk_enable] *ERROR* [msm-dsi-error]: failed to
turn on master hs link clocks, rc=-110
01-01 00:48:06.952     0     0 E         :
[drm:dsi_clk_update_link_clk_state] *ERROR* [msm-dsi-error]: failed to
start link clk type 2 rc=-110
01-01 00:48:06.963     0     0 E         : [drm:dsi_recheck_clk_state]
*ERROR* [msm-dsi-error]: failed to update clock state, rc = -110
01-01 00:48:06.972     0     0 E         : [drm:dsi_clk_req_state]
*ERROR* [msm-dsi-error]: Failed to adjust clock state rc = -110
01-01 00:48:06.982     0     0 E         : [drm:dsi_display_clk_ctrl]
*ERROR* [msm-dsi-error]: failed set clk state, rc = -110
01-01 00:48:06.991     0     0 I [drm:dsi_panel_post_unprepare]
[msm-dsi-info]: (mipi_mot_cmd_boe_800x600_269)+
+++
This reverts commit 1195a394b1.

Change-Id: I836e6496181c517c5995f53c68fd4856b00425b3
Signed-off-by: a7301c <a7301c@motorola.com>
Reviewed-on: https://gerrit.mot.com/1509821
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hua Tan <tanhua1@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:43:20 -03:00
zhanggb e2487cf114 Kernel/Display: mot extend code: get lcd para
Use below command to get current dsi panel command:
adb shell "cat /sys/devices/platform/soc/soc:qcom,dsi-display-primary/
dsi_display_parse_para"

Change-Id: I7d3624da8cffc4ae4b42054c323d9ecfa6caa5c3
Reviewed-on: https://gerrit.mot.com/1464821
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509820
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
zhanggb d0ce7b4621 Kernel/display: mot extend - early power
Control early power feature useing another dts property as this
feature currently has affect on 60/90hz FPS switch.

Change-Id: Iddc603707e92e788ee2a21c741c8d920101a23ed
Reviewed-on: https://gerrit.mot.com/1463780
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509819
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
zhanggb 525a1ae97a Kernel: Add Moto extern display code
[1]Add dsi early power feature
Add a interface to power on display panel before powermanager resume to
accelerate the display resume speed in some circumstance such as fringer
print wakeup.

[2]Debug tool - parse lcd para from debug file
Add a parse function to get lcd bringup parameters from file in
/vendor/firmware/. This help vendor engineer to debug lcd issue without
requiring moto engineer to bulid new dtbo or boot image.

1.Please push lcd para file lcd-paras.txt to /vendor/firmware/
2.Below command can update lcd paras:
  adb shell "echo 0 > /sys/devices/platform/soc/soc:qcom,dsi-display/
  dsi_display_parse_para"
3.Below command can check new command from kernel log:
  adb shell cat /sys/devices/platform/soc/soc:qcom,dsi-display/
  dsi_display_parse_para

Change-Id: Icdadde6f0405eea05f597a370d9f29dceb59ccb3
Reviewed-on: https://gerrit.mot.com/1459091
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509818
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen 08cb2e7e51 disp: msm: implement xxx-hbm-is-51cmd dts entry
Add qcom,mdss-dsi-panel-hbm-is-51cmd to panel's dts to indicate
that the HBM command is using the same backlight command 0x51 command.
Therefore when the HBM is on, then the backlight level will be saved
and backlight command will be ignored. When the HBM is off then stored
backlight level will be set

Port from 9bafa67

Change-Id: I856b0b27c282eae504b924753c267084488d71ab
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1445363
Tested-by: Jira Key
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509817
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen df88a52787 disp: msm: fix checking returned value of xx_cmd_transfer
Change the checking returned value of dsi_ctrl_cmd_transfer(), because
if this is a read command then it will return the number byte of
reading when reading succeed. If this is a write command, then it
will return "none-zero" for failure.

Port from: 01f1152

Change-Id: I961102933e4aad3d2ec99ffaa8cf6d81adac501f
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444415
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509816
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen b0652e4563 disp: msm: Register for reboot_notifier
Since implementing the factory_kill feature, then the msm_drv needs
to register for reboot_notifier to shut down the display accordingly.

Port from: 0d7643c

Change-Id: I08a121c87e042d4ea1fcb0f1d730e0519801a8f9
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444412
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509815
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
shuoyan f849421b27 disp: msm: Support ACL when setting panel param
Support ACL when setting panel param, so user-mode can control
the enable/disable of ACL property.

Port from: e8ab06e

Change-Id: I729226e93cbc91d5f148448bcb834662543d792b
Signed-off-by: shuoyan <shuoyan@motorola.com>
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444411
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509814
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
shuoyan cd78236f57 disp: msm: Enable "val" to control HBM property
Enable "val" to update HBM property, so user-mode can control
the enable/disable of HBM property through connector property.

Port from: 236c1a8

Change-Id: I2c3c892c515f299067987d8054340b6fd0449af1
Signed-off-by: shuoyan <shuoyan@motorola.com>
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444410
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509813
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen 157c665285 disp: msm: dsi: Reducing logging in dsi_panel.c
Reducing unnecessary logging in dsi_panel.c file.

Port from: 772dd12

Change-Id: I32032bf1318874f87d8c71d98d7de8529c7620ff
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444409
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509812
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen bbaae6dfcc disp: msm: dsi: Add print info for DSI_CTRL
Add the DSI_CTRL index to indicate which DSI_CTRL is enable.

Port from: 559a1c5

Change-Id: Id9a60c5cfcb5c4f7959c10987d85eb17062fa15e
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444408
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509811
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen 4dc0d44e9c disp: msm : Add the ACL panel param feature
Add the ACL panel param feature which will be controlled
from the user-space

Port from: 8f42287

Change-Id: I51a2685728810ddd702af287b8b92fa2c63466cb
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444407
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509810
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen 28d09dd727 disp: msm: Populate the passing panel's info from BL.
BL (bootloader/EUFI) will read the panel information such as panel's
ID and it will pass this information and panel's name in the devtree.
The display driver will populate these information and store in the
sysFS

Port from: 13ff4ce

Change-Id: I389d32ffad1097bf5a2d10517f2ad6f980923958
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444406
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509809
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen a6746e2c53 disp: msm: Set panel enable_status during probing
Set the panel's enable_status when the panel's cont_splash_enable
feature is set.

This dsi_display_enable_status() API will provide the panels
information such as the panel_name, probe information
and panels's enable/disable information to the touch driver.

Port from: e85045f

Change-Id: I3833ef7e9fbb9521060b1b84b87c9d3ce191e9a7
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444405
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509808
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Konstantin Makariev 7dfd13f4f6 disp: msm: Add panel name to enable status API
Adding a name to DSI panel enable status API

Port from: 19802f4

Change-Id: I250687024140431a2b408f869d09f56140503de5
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444404
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509807
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen 77367de2e1 disp: msm: Report panel's probe status
Panel API need to report probe status in order for consumer to
determine panel's presence

Port from: 834d504

Change-Id: I971b6ea68f97fb047e0c3f62ec23ae042c4b21d6
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444403
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509806
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen 56c5402186 disp: msm: provide API to query for panel enable state
This dsi_display_is_panel_enable(int panel_index) API will take in
panel_index equal 0 for Primary and 1 for Seconday display. It will
return TRUE if the panel is ON or FALSE when it's OFF

Port from: 255270c

Change-Id: Idbc4cc507336104d941a6b2868f9bdf47e5bdaa2
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444402
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509805
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen e51b9ece31 disp: msm: Correct the panel's LP11_INIT
QCOM has panel's LP11_INIT implementation, but it doesn't meet MOT's
panel spec.

Here is QCOM's implementaion:
- Init the DSI PHY, Turn on panel's POWER, Toggle Reset, and sending
  MIPI commands

Here is MOT's LP11_INIT panel spec:
- Init the DSI PHY ( MIPI lines in LP00), Turn on panel POWER,
  Bring MIPI lines to LP11, Toggle Reset, Sending MIPI commands

Port from: 4cea9bb

Change-Id: I0979e4bcb3c8f0404e6e4b1f2011256394626f31
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444414
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509804
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen a07dfdc7ca disp: msm: Adding KMS property testing for motUtil tool
Adding the KMS property (HBM/ACL) testing functionality to
motUtil tool so these KMS property can be tested and verified as
standalone without supporting of the Android FW apk.

Port from: b345943

Change-Id: I825a1450f5b151025cc005fe45748bbae40c30bc
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444401
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509803
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen fa247f6d83 disp: msm: add panel's param feature to display FW
Add the display's param feature such as HBM, ACL, or CABC feature to
display framework

Port from: f988eb8

Change-Id: I445ea7e58188d2354888e2202ed7119bf2e55fc9
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444400
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509802
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen e0ac15bcc0 disp: msm: Provide a dynamic method to disable the ESD.
Providing a dynamic method to disable ESD detection and recovery with UTAGS.

Port from: 1adab9a

Change-Id: I767666d2e802e40af9c8f3508e84b76df365ea38
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444399
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509801
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen 912a0498c8 disp: msm: Add DispUtil tool to motUtil Debugfs
Add the Display Utility(DispUtil) support to the motUtil Debugfs Framework.
This dispUtil tool will send a command from the motUtil debugfs to the panel
or it can read any information from panel back.
The 1st byte (set to 0) will indicate for the displUtil tool.

DispUtil Format:

1st         2nd         3rd    4th  5th       6th
0=DispUtil  0=Pri Disp 0=write 0=HS 0=DCS     number byte to read
            1=Sec Disp 1=read  1=LP 1=Generic

7th        8th         9th....
payldLen_u payldLen_l  payload

Port from: 79ee37d

Change-Id: Ib95d46342915543f942926df167e915cdd733252
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444398
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509800
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen 2e4c31c1e8 disp: msm: sde: Add motUtil Debugfs framework
Adding the motUtil debugfs in /d/dri/0/debug to provide a tool for
developer/tester to interface with the Display driver framework

Port from: 11cb128

Change-Id: I5a385f9f789b56f7a36bde865234325039ec5e36
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444397
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509799
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen 197a688b67 disp: msm: dsi: Raise BUG for continous panel recovery failure
After the ESD detection and recovery keep trying to recover panel, but
after 5 times, unsuccessfully recovery the panel, then cal BUG to reboot
the phone.

Port from: 9a4d104

Change-Id: Ibd1aa3e4d83638c029c163fe1de88d7ef4ba5fe2
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444396
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509798
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen 2d60cf1313 disp: msm: dsi: Trigger ESD event if display isn't on
Check display turns on  during the display resume. If it doesn't, then
trigger the ESD to restart the panel, instead waiting until the ESD
thread starts, detects, and perform ESD recovery.

Port from: f1cfef0

Change-Id: Ib7c0f2451b5e5cf1630b6335ac1d7ce1ff332d22
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444395
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509797
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen 88ab274b03 disp: msm: dsi: Check panel's power_mode during resume
Check the panel's power_mode after it turns on, to see if the panel can turn
on correctly. If it doesn't not, then trigger the ESD recovery to fix it.

Port from: 0301a79

Change-Id: I7e6cdb099dd50559f570e201568479ba00aa0e66
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444394
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509796
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00
Bang Nguyen 8072f67d7d disp: msm: dsi: parsing BL setting ESD and panel
After the Boot Loader (BL) detects the panel information, or reading
the ESD UTAG setting, the BL will write these information to the DTS.
The display driver from kernel and parse and save these setting.

Port from: 61c3e44

Change-Id: I3759b73c2e1eff01269a42dfa11d20807affa17a
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444393
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509795
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00