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
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>
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
[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
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
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
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>
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
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
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>
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>
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>
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>
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>
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>
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>
[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>
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>
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>
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>
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>
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>
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>
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>
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>