Commit Graph
1242 Commits
Author SHA1 Message Date
tanhua1 71541e9d76 drm: Add the panel color feature for game mode
Add the panel color enhance feature for game mode

COLOR_VBT:  not use, currently with QC qdcm solution
COLOR_STD:  not use, currently with QC qdcm solution
COLOR_GAME: for game mode enhance
COLOR_NONE: disale panel color enhance

Change-Id: Ia76db7e78741b2ad80081f9b6a92b1619593d938
Signed-off-by: tanhua1 <tanhua1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1974105
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/2160848
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Dezhen Hou <houdz1@motorola.com>
2023-06-01 00:43:20 -03:00
daiss1 4bdf576411 drm: Add the DC panel param feature
Add the DC panel param feature which will be controlled
from the user-space

Change-Id: Ia241893614f91ba209ce830db033033235da2dfc
Signed-off-by: daiss1 <daiss1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1946756
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Signed-off-by: tanhua1 <tanhua1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2160847
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Dezhen Hou <houdz1@motorola.com>
2023-06-01 00:43:20 -03:00
huaqin79 9e130d9052 display: Modify the lcd reset gpio pin.
Modify the lcd reset gpio for
Rhode

Change-Id: I9e63931c462aba6584575f63778b9c19e11a9e49
Signed-off-by: huaqin79 <huaqin79@motorola.com>
Reviewed-on: https://gerrit.mot.com/2136967
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hua Tan <tanhua1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:43:20 -03:00
Flavio Ipiranga 8256494319 Fix: display blinking issue
Brightness parameter was being updated more than once 
and more than one way inside dsi_panel_update_backlight function.

This parameter should be set just once and only in one way inside
dsi_panel_update_backlight function.

Change-Id: I8090e04034fa2fb2c4590b643df0a8a303759129
Reviewed-on: https://gerrit.mot.com/2081098
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Rafael Ortolan <rafones@motorola.com>
Reviewed-by: Shuo Yan <shuoyan@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:43:20 -03:00
tanhua1 a854918923 propagation: panel: add ft8006s special reset timing control
add a panel reset before touch reset enable for
djn ft8006s special timing

Change-Id: I29a103bd6a0c0f9663e1d956024e922fe17b3af8
Signed-off-by: tanhua1 <tanhua1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2051894
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/2053274
Reviewed-by: Marcos Sassahara <msassaha@motorola.com>
Reviewed-by: Carlos Pinho <cpinho@motorola.com>
2023-06-01 00:43:20 -03:00
tanhua1 3d023239dc display: support ft8006s panel brightness level special align
support ft8006s panel brightness level special align

DSI_BACKLIGHT_LEVEL_ALIGN_BIT15_8_BIT3_0 means:
  12bit brightness
  51H: DVB[11:4]
  52H: DVB[3:0]

Change-Id: I3b4e27eefe07a8ec11badf08a1000c976c79266f
Reviewed-on: https://gerrit.mot.com/1999763
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Dezhen Hou <houdz1@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:43:20 -03:00
Joo Costa 17390af7e7 [Guam NA] Fix propagation error in dsi_display.c
Fix conditions placement error in dsi_display_disable() and
dsi_display_unprepare(), which were swapped probably due to a mistake
during propagation.

Now, the display turns on correctly and the moto extended dsi features
can be used.

The MMI_STOPSHIP will be removed from bengal-guamna-display.dtsi in a
follow-up commit.

Change-Id: If730caf231f74968037bffec89d04cb5656529a9
Signed-off-by: Joo Costa <jmcosta@motorola.com>
Reviewed-on: https://gerrit.mot.com/1925140
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Tiago Ganselli <ganselli@motorola.com>
Reviewed-by: Sergio Vilela <sergiosv@motorola.com>
Reviewed-by: Carlos Pinho <cpinho@motorola.com>
Submit-Approved: Sergio Vilela <sergiosv@motorola.com>
2023-06-01 00:43:20 -03:00
hujing3 f55d542166 kernel:dsi: ESD te support for video mode panel
Add ESD TE check on video mode panel
to fix TP noise issue when configed as read_reg ESD

Change-Id: Idf6ce40fd4275a03f169f8c3bca48e56303b1c77
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1820691
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:43:20 -03:00
hujing3 e9809af5c5 kernel:dsi: backlight update for hbm gpio
Backlight: hbm gpio support update
set hbm state for hbm gpio case
to fix issue: should ignore backlight update when HBM on

Change-Id: Ic45b158cf01f0dcecedf3893d8b92fc8ed3aff32
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1805329
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
hujing3 a8cf6596f0 kernel:dsi: backlight update for hbm gpio
Backlight: support hbm gpio
add backlight update when hbm on/off

Change-Id: Iea72f37e645264b65773f054499fec07df846a03
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1785873
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
hujing3 657105bfb6 kernel: dsi: rst pull down config update
update panel_on_rst_pull_down config independent,
some panel need pull down lcd rst only without tp_rst config

Change-Id: I803d063c5c7d224618d5f8960d5373b1671045dc
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1718350
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:43:20 -03:00
hujing3 740a0d62c6 kernel: dsi: tp_rst seq update
Cebu: tp rst seq need pull high before lcd_rst
Update to rst logic

Change-Id: I16632ccf9f5fc7e79fa8f985097c234b9fc6b7a9
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1714969
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
hujing3 16c651cad2 kernel: dsi: enable tp_rst & esd fail logs
Some products handle tp reset in panel
enable tp_rst logs for better debug

Change-Id: I4ab1510cbdc9fd072dff8f2378db19c154077083
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1686088
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
lixh8 a57b627cde Capri beingup
[fit bringup] touch: synaptics: Fix wakeup_source event API change

On latest kernel wakeup_source_init API remove,
Need to use wakeup_source_register for the same.

This fix replaces wakeup_source_init to wakeup_source_register
wakeup_source_trash to wakeup_source_unregister

Change-Id: Iaddd6424c43a36bb193b9c4a90dd096a77746656
Signed-off-by: lixh8 <lixh8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1704594
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Submit-Approved: Jira Key
Tested-by: Jira Key

Revert "[fit bringup] touch: synaptics: Fix wakeup_source event API change"

This reverts commit 436b075a3ddfae916d5c5abe310076d98614e2ce.

fix r compile errors due to qcom api changes

Change-Id: Ifb00b2c199ded097fb337d17ef0aff93a9528efb
2023-06-01 00:43:20 -03:00
wangyq13 64756c8fc1 kernel: dsi: add new backlight device to avoid conflict
New added backlight wled driver uses ko, it is not be loaded at
recovery mode. If new added backlight driver uses same backlight type
as panel0-backlight, system will call panel0-backlight when ko is not
loaded, but panel0-backlight is a logical device, cause system dead.

Change-Id: I0c03905c116aae2f42e5ca11edd89035b0cadf33
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1653756
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
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 799f19025f kernel: dsi: download touch firmware after panel reset
Download touch firmware after panel reset for quick touch
response.
Move dsi_panel_get_index to the head of the C source file,
avoid compile error.

Change-Id: Id95ab836de22dfa70aa81589d26d738c4b71425a
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1649599
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Dezhen Hou <houdz1@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:43:20 -03:00
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