msm/drm:
Use drm ioctl to set panel feature, avoid panel features
are not set instantly.
Change-Id: I6779c3b665f4b887a00cf41bb818ae03917755ac
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2270744
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Dezhen Hou <houdz1@motorola.com>
Submit-Approved: Jira Key
sometimes,finger unlock, turn on FOD HBM first, and the
turn on the backlight, this caused the restore '0' brightness
that screen can not be turned on.
Change-Id: I450373a5b50d30e2147a0a6534bdec007a12b60f
Signed-off-by: tanhua1 <tanhua1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2274898
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Dezhen Hou <houdz1@motorola.com>
Submit-Approved: Jira Key
The configuration of the mask aplha of the local hbm
is based on the DBV level to ensure that the brightness
of local hbm on or off is consistent.
Change-Id: I68a7a233a27549db0582a6f07d7a421ed400f3d2
Signed-off-by: tanhua1 <tanhua1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2238455
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
Some project need to change the strength volue of phy,
to fix the RF issue.So we can define the strength at the panel dtsi file.
Change-Id: I9b3fb6e741798ac6ef5ec3921875a9975ce88e9f
Signed-off-by: houdz1 <houdz1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2160545
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
When shut down phone, it will call shutdown function to shut down device.
That can meet the power down timing requirements of panel.
Change-Id: If5f5eb57934559d8c6aa979431d434bf89d33de9
Signed-off-by: houdz1 <houdz1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2063775
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
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
Signed-off-by: tanhua1 <tanhua1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1949836
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/2046088
Reviewed-by: Zhihong Kang <kangzh@motorola.com>
hange the default output voltage through I2C bus at XBL. And store the default
value to EEPROM. So we can nod make I2C operation at kernel.
Only pull up/down gpio to enable/disable regulator.
So use gpio regulator to control avee and avdd.
Change-Id: I5c9381c8304f0928ff215ac109c72eeda286cb00
Signed-off-by: houdz1 <houdz1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2020983
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
For cypfq, we will set the backlight to max with dcs command.
And pull up hbm_en gpio to set the max current to 25mA.
Change-Id: I07885a122a9efc73e3f1191fa2465c0721ab9ec1
Signed-off-by: houdz1 <houdz1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2007805
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Some panel IC can not support 0x0b for compress pixel stream's DataType.
For example gc7372, it will use 0x3E for compress pixel stream's DataType.
Change-Id: Ie9bc90d79b11033414658d93e0b39137c6f4f8e0
Signed-off-by: houdz1 <houdz1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1976131
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
This reverts commit 98f75f797773394bdb81969aa795d3eeb68642ad.
Mot-CRs-fixed: (CR)
MIPI_DCS_READ_MEMORY_CONTINUE =0x3E
MIPI_DCS_READ_MEMORY_START =0x2C
These commands for page 0 is MIPI DCS commands.
But For other pages, these commands(0x3E,0x2C) maybe normal register.
So these codes are not right.
And we haven't get the requirement to disable 0x3E and 0x2C, SO we revert
these changes first.
Change-Id: I5e18a5e52420ceb78dc298598b097d70011151dd
Signed-off-by: houdz1 <houdz1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1952409
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hua Tan <tanhua1@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
The clock and data lanes have a calibration circuitry feature. To offset the drive
strength from the calibrated value in an increasing or decreasing manner, use 6 bit two’s
complement values.
Change-Id: I1cb612b4f62ea6af07165ffd1fb8e15528200e5e
Signed-off-by: houdz1 <houdz1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1850370
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Some panel need send command to DDIC.
That TP can get the current refresh rate.
Change-Id: Iecd1e4675729d1f74461f8d56f8115e4808fa8e2
Signed-off-by: houdz1 <houdz1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1831813
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Hua Tan <tanhua1@motorola.com>
Reviewed-by: Dezhen Hou <houdz1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Some panels must let ldo always on.
We must add "qcom,supply-always-on" in "qcom,panel-supply-entry".
Change-Id: I81669aa225df0abde26e407c391c56412ee7a109
Signed-off-by: houdz1 <houdz1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1822732
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
The function is ready for other project.
SO remove "MMI_STOPSHIP"
Change-Id: I33d83dc84641f6765ffd8c39cc4a01d19bcf62f6
Signed-off-by: houdz1 <houdz1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1812530
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Remove MOTO_PANEL_CHECK_TOUCH_STATE, we alway compile this
code. When "tp_state_check_enable" is define at device tree file , then
call "check_state" function to get touch state.
Change-Id: Iccdff4a408eb9ad27b71c8394b4c4a844da7b238
Signed-off-by: houdz1 <houdz1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1793078
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Submit-Approved: Jira Key
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 touch state is 0, Instead,
the touch state is 1.
3. Touch driver will call set() function to set the touch state,
And panel driver will call check() function to check state.
Change-Id: I034909007678ae940769ec8e350518185cc5fad3
Signed-off-by: houdz1 <houdz1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1784647
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: litong <litong20@motorola.com>
Submit-Approved: Jira Key
This reverts commit 2da822bf859e4c166c09706f62292a657273104e.
From Kernel-5.4, Send panel_notify at msm_atomic.c.
So do not add this old notify method.
Mot-CRs-fixed: (CR)
Change-Id: I16778dc0a404b1ab20e59bc73a40d32385bdc01b
Signed-off-by: houdz1 <houdz1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1783211
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
There have few cases which no brightnes when panel on.
Add more backlight logs to debug this issue.
Change-Id: I2c25f15f1617f894ecb84efc7c15340cbfc89ad5
Reviewed-on: https://gerrit.mot.com/1783198
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Shuo Yan <shuoyan@motorola.com>
Submit-Approved: Jira Key
HBM 1 and HBM2 are assigned as HBM on.
When HBM is off, the value is HBM off.
Change-Id: Iacf17b60725dfe1d2cc2f7206063b81e2e7e98aa
Reviewed-on: https://gerrit.mot.com/1783197
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Submit-Approved: Jira Key
Hardware team required to set ordered DSI driver strength for
different DSI PHY.
Add support to config DSI PHY driver strength from DTSI config.
Change-Id: I60c5ee335c897d3f20dde42114798c15576cf32e
Reviewed-on: https://gerrit.mot.com/1783170
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Submit-Approved: Jira Key
PROPAGATED_from (CR)
Before make the read operation, malloc the space of rx_buf.
To avoid the out-of-bounds issue.
Change-Id: If5debbae4957845bf6bd35f9f81eaca79faa54e5
Reviewed-on: https://gerrit.mot.com/1782951
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
PROPAGATED_from (CR)
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, 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: Ifa20a92388c6dab20cf5550868f3f3685815936f
Reviewed-on: https://gerrit.mot.com/1782945
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
PROPAGATED_from (CR)
add bl logs for panel resume and suspend.
That we can check some "no display" issue.
Change-Id: I9ecbe59a3ce8931e81edb2f54aa66499995a9a7e
Reviewed-on: https://gerrit.mot.com/1782943
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
PROPAGATED from (CR)
Panel is black when HBM trigger.
The reason is CLI HBM commond set send to Primary Display.
Fix MOT`s panel param so it can support dual panels
Change-Id: Iaa4a0c974740571347a810d2517adcb830cb7795
Reviewed-on: https://gerrit.mot.com/1782933
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Submit-Approved: Jira Key
PROPAGATED from (CR)
Device reboot when CLI panel dead
Quality team hopes Device still alive when one panel dead.
Modify the ESD recovery policy that reboot all when all
display dead.
Change-Id: I78ca19de9723c00416ea43457b6750b7a765c08f
Reviewed-on: https://gerrit.mot.com/1782924
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Submit-Approved: Jira Key
Add CABC control interface for video mode panel. This interface is
also used by sde connector property.
port of : 09a47b9fa
Change-Id: Id3170799333bc7852c1b92895bd016fda13d580c
Reviewed-on: https://gerrit.mot.com/1782225
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This code is pick from the project with Android-p,
But there is a code error when make propagation from the previous project.
We must reset the param after panel enabled every time.
Mot-CRs-fixed: (CR)
Signed-off-by: houdz1 <houdz1@motorola.com>
Change-Id: I164c5bd1dcb89bfcf07627eb2455db0fc9d184b6
Reviewed-on: https://gerrit.mot.com/1782141
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This file is included from 534dfd90e.
This is a unused file.So remove it.
Change-Id: I50b1c12a515808379c7edc18d6f6b360eaccef05
Signed-off-by: houdz1 <houdz1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1782130
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
For the Secure UI feature, the display feature, which allows host to
read-back its internal memory buffer, should be disable. The MIPI DSI
command 0x2E (read_memory_start) and 0x3E (read_memory_continue) will
be disable.
For the kernel-4.19, this is changed at drm_mipi_dsi.c.
https://gerrit.mot.com/#/c/1444417.
For the kernel-5.4 and android-R, it is not a better way to modify common
code of drm. So we move this changes to msm/dsi/dsi_ctrl.c
Change-Id: Ib41ef05902267fe6b996b46b4e3182824d961295
Signed-off-by: houdz1 <houdz1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1780712
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Correct the DSC 1.1 Rate control for Max QP values for each ratio type
in dsi_dsc_ratio_type
Change-Id: I75092e1a40213be80c74292e8c20cd332d582910
Signed-off-by: daiss1 <daiss1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1720143
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Add a new property to specify the default brightness level that would
set for usecases where no explicit brightness level is configured.
Mot-CRs-fixed: (CR)
Change-Id: Iecc6f4e0b5b9fbda5d8bf97efa7d4de4dbbd5570
Signed-off-by: houdz1 <houdz1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1697641
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@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: I9c3c319b6288239914092af9c0b9bfd59412fa07
Signed-off-by: houdz1 <houdz1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1697640
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
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/1697638
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: I82d5a96b715683168ae0a609664624128cdb170e
Signed-off-by: houdz1 <houdz1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1697637
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key