Commit Graph

287 Commits

Author SHA1 Message Date
qctecmdr
1916b3ae6c Merge "disp: msm: dsi: fix ESD checks for sim and vid panel modes" 2020-10-01 00:36:12 -07:00
Satya Rama Aditya Pinapala
cfa1f49125 disp: msm: dsi: fix ESD checks for sim and vid panel modes
Enure that ESD check doesn't result in a false negative while
booting up with a simulation panel or if TE based check is enabled
and panel switches it operating mode to video.

Change-Id: I62ff088f513d28d2883ce5a6d22f8bac1783fcd2
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-09-29 21:13:39 -07:00
qctecmdr
90c3cec488 Merge "disp: msm: dsi: Panic on getting continuous ESD check failures" 2020-09-29 09:59:58 -07:00
Lipsa Rout
93fa9bdf60 disp: msm: dsi: Panic on getting continuous ESD check failures
During stability stress testing, there are many instances where
the panel is unreachable which results in the ESD check mechanism
failing continuously with PANEL_DEAD events. There are two possible
reasons. Either the device is bad or DSI controller is hung. As of
today, logs/xlog is flooded and info on root cause is missed in the
logs. To catch the root cause for such issues, this patch induces
forced crash when there are five consecutive ESD check failures.

Change-Id: Id0a5762ac977f8a209af651f65cbe9da199cb8d0
Signed-off-by: Lipsa Rout <lrout@codeaurora.org>
2020-09-24 22:51:39 +05:30
Zhao, Yuan
d9c2a8d3a6 disp: msm: disable regulator load after the regulator was disabled
Setting a lower load can make the regulator enter into LPM. Now the
lower load was set before the regulator disable, there's a risk here.
The regulator has been LPM, while it was not disable, if the cosumer
has a higher current needed than LPM at this time, that will lead OCP
on this regulator. The right operation for a regulator enable/disable
should be:
 1. regulator_set_voltage(vreg, active_min_uV, active_max_uV) and
    regulator_set_load(vreg, active_load_uA); in either order
 2. regulator_enable()
 3. regulator_disable()
 4. regulator_set_voltage(vreg, inactive_min_uV, inactive_max_uV)
    and regulator_set_load(vreg, inactive_load_uA); in either order

Change-Id: Ibe4f888a5675baf2691e479daa163d8867902e69
Signed-off-by: Zhao, Yuan <yzhao@codeaurora.org>
2020-09-22 00:45:36 -07:00
qctecmdr
a1c819549d Merge "disp: msm: update POMS detection logic" 2020-09-20 19:01:21 -07:00
qctecmdr
d5af93b74c Merge "disp: msm: dsi: add missing trusted vm check" 2020-09-18 21:24:48 -07:00
Steve Cohen
38a8d2134b disp: msm: update POMS detection logic
Currently, SDE relies on DSI to set a flag for POMS however
if a power ON modeset comes with a different mode than
previously configured, DSI is unable to detect the mode change
and does not set the flag nor perform the mode switch itself.

DSI should always align the panel mode to match the timing node
that is selected regardless of prior configurations.

SDE encoder can detect if POMS is required for the INTF block
without the flag from DSI by comparing the currently configured
INTF mode with the panel mode that is being set. The POMS flag
from DSI is still needed for any active panel mode change so
that the post-modeset cleanup operations are triggered.

Change-Id: Ib198b3098f21338ab35b2022b04be1c01c4cbd94
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-09-19 00:09:43 -04:00
Ray Zhang
b818229a2f disp: msm: dsi: add missing trusted vm check
Need to check trusted VM environment when loading DSI
firmware. Add this missing check due to propagation
issue.

Change-Id: I7c84b487a58133df49ba23e80e6b6ff8783cdf6c
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2020-09-18 17:21:27 -07:00
qctecmdr
13154febbc Merge "disp: msm: check max FPS of DFPS to update UIDLE configurations" 2020-09-18 16:36:35 -07:00
Rajeev Nandan
19a54c5650 disp: msm: dsi: enable xlog in critical paths
Enable xlog in critical paths to increase debug coverage.

Change-Id: I177acd3f2c2ab349f533bb9fbd8a8122539d524b
Signed-off-by: Rajeev Nandan <rajeevny@codeaurora.org>
2020-09-16 13:00:11 +05:30
Lei Chen
c44e0b42df disp: msm: check max FPS of DFPS to update UIDLE configurations
It is not applicable for all DFPS cases to update UIDLE state
according to current frame rate. If DFPS changes frame rate
through vertical front porch values, the SDE clocks and transfer
time will not get changed accordingly, and it always get fixed
at max frame rate configuration of DFPS.
Add this change to check max FPS of DFPS instead of current
frame rate for UIDLE update, if DFPS is enabled with VFP.

Change-Id: I7634bce6a9eb1af212ba19a267735be08b20ae1f
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
2020-09-15 09:51:30 +08:00
qctecmdr
b0775fe9da Merge "disp: msm: add allowed_mode_switch blob property" 2020-09-12 00:11:57 -07:00
Lipsa Rout
96e7af3205 disp: msm: dsi: Handle pm_runtime_put_sync return value properly
Currently,power resource disable fails when pm_runtime_put_sync
returns negative values. Due to this, clock state update is
failing. pm_runtime_put_sync can return negative values in
scenarios where  pending resume requests take precedence over
suspends. This change allows pm_runtime_put_sync to return
negative vales also.

Change-Id: I1a46ca574129ba953ddb6300f9b3ab24cdb3171e
Signed-off-by: Lipsa Rout <lrout@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-09-10 11:35:56 -04:00
Ritesh Kumar
755686a110 disp: msm: dsi: Handle GDSC PM in pre/post clk on/off
Currently, power_state variable does not reflect the GDSC
status. Due to this, there are scenarios where ctrl_power_on
is not happening leading to clock failures. This change
updates power_state based on current status of all the
regulators. GDSC enable is moved to pre_clkon and GDSC
disable is moved to post_clkoff.

Change-Id: I6d9508d5dffda0c94bd3b3bd9b5feb4724dc9dc7
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
[cohens@codeaurora.org: fixed static analysis error]
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-09-10 11:34:28 -04:00
qctecmdr
20db960f01 Merge "disp: msm: dsi: do not enable PWM when setting bl to 0" 2020-09-09 18:55:26 -07:00
qctecmdr
26112d7b3b Merge "disp: msm: dsi: Update pll delay calculation as per latest DSI HPG" 2020-09-09 02:29:19 -07:00
qctecmdr
d6eccf2b10 Merge "disp: msm: dsi: Add support to keep display reset pin high" 2020-09-09 02:29:19 -07:00
qctecmdr
3ee7b6f685 Merge "disp: msm: dsi: Skip soft reset during display disable" 2020-09-09 02:29:19 -07:00
qctecmdr
eabc896956 Merge "disp: msm: dsi: initialize display before request_firmware" 2020-09-08 23:07:45 -07:00
qctecmdr
370f3ad937 Merge "disp: msm: dsi: Mask overflow error for Broadcast command" 2020-09-08 23:07:45 -07:00
Zhao, Yuan
8050179062 disp: msm: dsi: do not enable PWM when setting bl to 0
Check backlight value, if it's 0, do not enable PWM.

Change-Id: I6fccb42555731bf3faa88a93cbf1a36a417ff49d
Signed-off-by: Zhao, Yuan <yzhao@codeaurora.org>
2020-09-08 19:02:14 -07:00
Satya Rama Aditya Pinapala
03f9c40e7d disp: msm: add allowed_mode_switch blob property
The change adds a new mode property allowed_mode_switch. The new
property is a 32bit bitmask that indicates the modes each mode
can switch to. This change is required to pass the driver mode
switching capabilities, so that user mode can reject any mode switch
that is not supported by the driver.

Change-Id: I76d1733a07a6d57487ba9f461055270d7e60e060
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-09-04 17:58:46 -07:00
Harigovindan P
a976e8c7fa disp: msm: dsi: dual dsi constant fps porch calculation
This change adds porch calculation support to maintain
constant fps during clock switch for dual DSI controller.

Change-Id: I9a7e6d1f6d028355dba30aafe0234fc30c153059
Signed-off-by: Harigovindan P <harigovi@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-08-25 22:23:45 -04:00
Ray Zhang
9fc2eec97a disp: msm: dsi: initialize display before request_firmware
dsi_display_init has to be called after dsi_display has valid
device info, so initialize it before calling request_firmware
in dsi firmware case.

Change-Id: Iec59882c776eb4bd19ce68d3ded052629c344d17
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-08-25 19:15:37 -04:00
Ritesh Kumar
269ead80c7 disp: msm: dsi: Add support to keep display reset pin high
This change adds support to keep display reset pin high during
suspend state.

Change-Id: I8fab43d8f7b30fce72cc95277d016b72b914aa99
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-08-25 19:14:56 -04:00
Harigovindan P
25b6a3e7d1 disp: msm: dsi: Mask overflow error for Broadcast command
Currently, for Dual DSI Broadcast command, Overflow error
is masked only for master controller. This changes add
support to mask overflow error for slave controller as well.

Change-Id: Ida73c4166e996fcf2c8c936d0c76d0a89a220d89
Signed-off-by: Harigovindan P <harigovi@codeaurora.org>
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-08-25 19:14:29 -04:00
Harigovindan P
4a86b80a50 disp: msm: dsi: cphy constant fps porch calculation
This change adds porch calculation support to maintain
constant fps during clock switch for CPhy.

Change-Id: I74b2f0e064441fba7f452b06438ece7fe3b373eb
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
Signed-off-by: Harigovindan P <harigovi@codeaurora.org>
2020-08-25 19:13:56 -04:00
Harigovindan P
662ac3ab89 disp: msm: dsi: Add support for C-PHY dynamic clock switch
This change adds support for C-PHY dynamic clock switch feature.
Also add support for phy ver 4.0 C-PHY timing parameters calculation
to be used for clock switch.

Change-Id: I8292860fd8c93a7ba7988ec8c44ea9683f45b6e6
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
Signed-off-by: Harigovindan P <harigovi@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-08-25 19:13:56 -04:00
Ritesh Kumar
998dec67d8 disp: msm: dsi: Skip soft reset during display disable
As per DSI HPG, Soft reset is not required to disable
video mode operation for version 1.3.0 and later. So,
add check to skip it during display disable.

Change-Id: If6d263bdf22f8a6fbef76d78d04bb9d11be05945
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-08-25 19:12:33 -04:00
Ritesh Kumar
fc571a94aa disp: msm: dsi: Update pll delay calculation as per latest DSI HPG
As per DSI HPG, pll delay should be 25usec for phy ver 4.0 and
100usec for phy ver 2.0 and 3.0. This change updates pll delay
calculation during dynamic DSI clock switch accordingly.

Change-Id: Ief5cbdc9304cf5ad025fe3bbe689b93834a1f710
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2020-08-25 19:10:11 -04:00
Ritesh Kumar
a81e6a55fe disp: msm: dsi: Fix pll delay calculation during clock switch
During clock switch, Pll delay is calculated considering escape
clock to be in KHz. But escape clock is in Hz. This leads to wrong
pll delay calculation.

Change-Id: I616d16cc3d775a37e77c7c35bb860c23b1f9e37a
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2020-08-25 19:10:11 -04:00
qctecmdr
f1b667341c Merge "disp: msm: add connector API to disable cont_splash resource votes" 2020-08-25 09:23:14 -07:00
Vara Reddy
f206b420c0 disp: msm: dsi: do NULL check before accessing controller node
Add NULL pointer checks, before accessing the controller node.

Change-Id: If24c4fd4352ef5ab7642c817ddaa61a80b725c99
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2020-08-24 16:49:36 -07:00
qctecmdr
ead6a35953 Merge "disp: msm: dsi: add parsing logic for panel gpio pins/address" 2020-08-21 12:36:22 -07:00
qctecmdr
86d25d0c03 Merge "disp: msm: dsi: update min prefill lines for lahaina" 2020-08-21 12:36:22 -07:00
Linux Build Service Account
0af93447c5 Merge "disp: msm: dsi: enable dfps trigger at mdp intf flush" into display-kernel.lnx.5.4 2020-08-20 21:52:52 -07:00
Vara Reddy
c9cb9f51f3 disp: msm: dsi: enable dfps trigger at mdp intf flush
This change allows dynamic refresh trigger to sw trigger
and mdp intf flush. With this we can make sure that DSI
timing/clock update and mdp intf timings are updated in
one vsync.

Change-Id: Ic807f498e2e47be6dd0f1e11ff1fc0896a8ec758
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2020-08-20 12:48:32 -07:00
Chandan Uddaraju
35b60f6208 disp: msm: add connector API to disable cont_splash resource votes
The panel regulator votes are added by default during
dsi probe to make sure sync state driver doesn't disable
these regulators for cont_splash use case. These regulator
votes need to be removed when cont_splash feature is
disabled. Add a new connector API to handle this.

CRs-Fixed: 2734419
Change-Id: Ie54c8f246877a042afacddaeae8b90440652116f
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2020-08-17 16:18:01 -07:00
Veera Sundaram Sankaran
30757e8c8a disp: msm: dsi: add parsing logic for panel gpio pins/address
Add parsing code for getting the TLMM base address and size
of each GPIO pin register space along with the GPIO pins
used for the specific panel. This list is used to lend
these IO ranges to trusted vm during the trusted UI usecase.

Change-Id: I10429cfa14265d52e898815c6cf94be27daa5677
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-08-17 09:47:49 -07:00
Yuan Zhao
c810238fb4 disp: msm: dsi: support LP mode for DCS brightness setting
DCS brightness settng can only use HS mode. Add a new
DT property for LP mode choose for DCS brightness setting.

Change-Id: Ibe5867fe344776871eb3a410a8d79d347775f3d4
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2020-08-12 23:08:06 -07:00
qctecmdr
faf4a8b1c8 Merge "disp: msm: dsi: add debug ability to read TE read pointer line count" 2020-08-06 22:45:51 -07:00
Satya Rama Aditya Pinapala
ec6f97fd9d disp: msm: dsi: update min prefill lines for lahaina
Change updates minimum prefill lines for lahaina target.

Change-Id: Ic3c4f498eb2b73ddfc4445d94850c72dd242d575
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-08-06 17:26:26 -07:00
Satya Rama Aditya Pinapala
3deb5c353e disp: msm: dsi: add debug ability to read TE read pointer line count
The change adds register mapping of MDP_INTF_[1/2]_TEAR_INT_COUNT_VAL
register to DSI controller. This allows for the controller to read the
line count and frame count of the read pointer during trigger and
successful transfer of DMA command.

To enable the debug feature:
echo 1 > /d/<panel_name>/dsi-ctrl-0/enable_cmd_dma_stats.

To disable the debug feature
echo 0 > /d/<panel_name>/dsi-ctrl-0/enable_cmd_dma_stats.

To read line count value:
cat /d/<panel_name>/dsi-ctrl-0/cmd_dma_stats.

Change-Id: I5cdeb54ca941af05b226a9d7ab332b899ecc5797
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-08-06 13:54:52 -07:00
Satya Rama Aditya Pinapala
50af1eb43b disp: msm: dsi: add support for DMA CMD scheduling for CMD mode panels
The change allows for configuring a command DMA window during which
the command is triggered. The DMA window must not intersect with the
MDP tear check window. Once the command transfer is successful, the
trigger control needs to reset to the default DMA trigger specified
by the panel.

Change-Id: I5485ca1f8e141ed92dc8c77c2daf579634271022
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-08-05 20:31:24 -07:00
qctecmdr
447de1a67d Merge "disp: msm: update seamless check for connector" 2020-08-01 23:23:29 -07:00
qctecmdr
ecf7bd7696 Merge "disp: msm: dsi: reorder operations during DSI display pre kickoff" 2020-07-24 14:10:40 -07:00
qctecmdr
da06015241 Merge "disp: msm: dsi: update MDP/DSI transfer time calculation" 2020-07-24 14:10:39 -07:00
qctecmdr
32251009e0 Merge "disp: msm: dsi: fixes in GKI cleanup path" 2020-07-24 11:17:20 -07:00
Yuan Zhao
b54107cfa3 disp: msm: dsi: add a new PWM pinctrl configure
The default PWM gpio pin mode was not right for PWM backlight
control. If needs to use PWM backlight, must config the
gpio pinctrl.

Change-Id: I5fd6b947d379b53ef4c358be1b935a2ad4970f99
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2020-07-23 19:54:02 -07:00