Commit Graph

1616 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
qctecmdr
77a8b983ed Merge "disp: msm: sde: return proper errno when register event fails" 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
qctecmdr
43cafa8095 Merge "disp: msm: skip rsc client vote for clk state update only" 2020-09-29 00:36:45 -07:00
qctecmdr
8ec396fb16 Merge "disp: msm: sde: update input fence after plane state destroy" 2020-09-29 00:36:45 -07:00
Narendra Muppalla
e13e1ea727 disp: msm: skip rsc client vote for clk state update only
This change skips RSC client vote for clk_state update when
delta vote and update_tcs_content are false.

Change-Id: I4597167c261f06811ffbd84b2eba4e6aa78d1eea
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-09-28 20:01:01 -07:00
qctecmdr
2cff4ac8e7 Merge "disp: msm: register rotator platform driver after genpd init" 2020-09-28 04:39:41 -07:00
Yashwanth
312bd53656 disp: msm: sde: update input fence after plane state destroy
In few cases, even though input fence is freed, it might
get accessed through debugfs node while dumping fence list.
This change updates input fence to NULL in plane state
destroy once it is freed to prevent accessing it further.

Change-Id: I1a3799249e6a177af87653e17d014d1dad7ca638
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-09-28 11:53:39 +05:30
qctecmdr
5100a8e9e9 Merge "disp: msm: sde: check for null topology in dither setup path" 2020-09-25 10:44:51 -07:00
Yashwanth
2683324973 disp: msm: register rotator platform driver after genpd init
Due to power-domain, if rotator driver is registered early,
probe might get deferred several times and get stuck
indefinitely. So, this change adds driver registration
after genpd init to handle such cases.

Change-Id: I8dcb640d0ab0cdf0818cbce1b1fb460c28d8b9e7
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-09-25 21:16:42 +05:30
Amine Najahi
43113b945e disp: msm: sde: check for null topology in dither setup path
Check for invalid topology value before extracting the number
of LMs in dither setup path. This occurs when there is a race
condition between runtime supend/resume and dynamic FPS switch.

Change-Id: Ibf4bd2fe5f094ddec11ebc5b85ea9a5cfa0e91a7
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-09-25 10:32:10 -04:00
Yashwanth
af9841fa44 disp: msm: enable SDE rotator driver configs for GKI
This change enables and exports configs to support SDE
offline rotator in GKI. It also removes unused ioctls
for rotator compilation with GKI config.

Change-Id: I7f67aec394f644478173dcfe9e3ff52fe9129615
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-09-25 14:32:24 +05:30
Raviteja Tamatam
74dd4682cd disp: msm: sde rotator driver configs for probe only
Added code for dummy probe defined under
CONFIG_SDE_ROTATOR_INIT_ONLY to address cases where
rotator device node is defined but driver needs to be
disabled. This is stop gap arrangement until v4l2
configs are available in GKI.

Change-Id: I069b37f818d2e4401b3992f1f1e308858a7e29e6
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2020-09-25 13:49:23 +05:30
qctecmdr
ffde2ecd77 Merge "disp: msm: sde: populate connector modes during init" 2020-09-24 16:51:56 -07:00
Jeykumar Sankaran
9de6eee40e disp: msm: sde: accept and reclaim resources on user prompt
Currently, trusted VM accepts and releases the resources
on RM notifications.

In cases, where TUI fails to submit the first frame on the trusted
vm, display cannot rely on the teardown commit IOCTL to release the
resources back to primary VM.

To handle scenarios where RM notification drops, the VM's should be
able to ACCEPT/RECLAIM resources without relying on the RM.

To address above scenarios, this change moves the resource handling
calls from notification handlers to user prompt. With this change,
trusted VM will ACCEPT the resource only on the first frame commit and
primary VM can RECLAIM the resources back if the TUI use case fails
or any of the RM notifications fail to deliver.

Change-Id: Iebb1724a7558e52567f8af1a49e38f8adbec88a0
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-09-24 11:24:28 -07:00
Jeykumar Sankaran
a521764b53 disp: msm: sde: populate connector modes during init
When continuous splash is enabled, KMS populates the modes of
a connector during splash config. With TUI VM enabled, this path
will also be exercised by trusted vm for splash handoff, where for
a given display we try to use the same HW blocks configured by
the primary VM.

Since the trusted VM invokes the path under connection_mutex lock,
calling fill_modes will lead to a deadlock. So, move the connector
mode population during init for DSI displays, since the modes are
available for the connector during initialization.

Change-Id: I12f920f4af84b7bccc97a5f5edb5117ada49b960
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-09-24 11:24:03 -07:00
Ping Li
b4d055a10d disp: msm: sde: return proper errno when register event fails
When HW resource is not available, return ENODEV so that user space can
check the errno and do proper handling.

Change-Id: If5422f1020c262ede4ac7226a274da2c5713b446
Signed-off-by: Ping Li <pingli@codeaurora.org>
2020-09-24 11:06:25 -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
qctecmdr
de8c973a73 Merge "disp: msm: rsc: fix RSC handling of state and timing updates" 2020-09-24 04:01:01 -07:00
qctecmdr
29fa7949ef Merge "disp: msm: sde: enable trusted vm support for shima" 2020-09-24 04:01:01 -07:00
qctecmdr
d550ee8532 Merge "disp: msm: sde: trigger esd recovery before event notification" 2020-09-24 01:51:52 -07:00
qctecmdr
79096b2af9 Merge "disp: msm: sde: Update HH_RM_MEM_NOTIFY_* macros" 2020-09-23 15:35:54 -07:00
qctecmdr
5febc21a3a Merge "disp: msm: sde: adapt VM IRQ notification framework" 2020-09-23 12:16:25 -07:00
Dhaval Patel
9ce6a2fbb3 disp: msm: sde: trigger esd recovery before event notification
ESD recovery schedules KICKOFF event on event_thread,
switches the vsync source to wd_timer and waits for
pending frame. This work is triggered from workthread
and it must be finished before panel dead event
notification to avoid race condition with power off
sequence. This change also cancels the delayed work
after encoder is disabled.

Change-Id: Iadc5753238a54e6dad3ff57a9b8ae3bd9644c0dc
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-09-22 16:53:49 -07:00
Steve Cohen
0e0eb8ac11 disp: msm: rsc: fix RSC handling of state and timing updates
This patch addresses 2 issues with RSC; 1) internal tracking of
certain state updates, and 2) skipping certain timing updates
in CLK state that are required.

1) With primary in video mode, RSC will override the video mode
state in favor of clock mode on RSC rev3+ HW but this override
is applied after updating the client's state and checking if a
state change is required.

If RSC is already in clock state and the client provides a video
mode state update, the state change check will proceed since the
client request doesn't match the current state, but then the
requested state gets overridden so that it does match and another
switch to clock state occurs. Fix this by moving the state update
and state change check after applying the override. Also update
the event log so the state transitions are logged properly to
help identify similar issues in the future.

2) If continuous splash is still active on a secondary display
and primary gets a mode switch, the timing update is skipped
since the RSC client requests for a CLK state update. When
secondary is then used and goes idle, solver mode can get
enabled with the wrong timing.

Primary is the only encoder allowed to provide timing updates
and it votes for CLK state when splash is active on another
display or if QSync is enabled. In both cases timing updates
should be applied in case of later transitions to solver mode.
To address the issue, add a check which ensures timing updates
are applied for these corner cases.

Change-Id: I54ca0898d2f430b7e8c601de7309fc57d717e0bb
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-09-22 15:46:08 -04:00
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
bb71c092c8 Merge "Revert "disp: msm: sde: add delay after porches changed"" 2020-09-21 18:13:23 -07:00
Isaac J. Manjarres
39a7f44e17 disp: msm: sde: Update HH_RM_MEM_NOTIFY_* macros
The macros for HH_RM_MEM_NOTIFY_[RECIPIENT/OWNER] have been
updated to be more descriptive, so update the macro
usage in the display files.

Change-Id: I46d866830a2586c647da0f821bdc6f16a3d1c0b1
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2020-09-21 15:29:35 -07:00
Jeykumar Sankaran
02bef42599 disp: msm: sde: adapt VM IRQ notification framework
Kernel RM IRQ wrapper has changed the prototype of the
notification callback function to support per event
notifications. This uncouples the VM IRQ operations from
their respective notifications.

Adapt the changes in SDE driver by making the notification
handler generic and invoking the notifications calls
explicitly.

Change-Id: I02ddb1d2fa70fdab8002325e0472b43e94b6b09c
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-09-21 15:14:31 -07:00
qctecmdr
8f16ccc93b Merge "disp: msm: add support to notify retire frame event" 2020-09-21 03:57:31 -07:00
qctecmdr
21a74c8c10 Merge "disp: msm: sde: fix panel early event blank notifier call" 2020-09-21 03:57:31 -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
qctecmdr
1a11e07ee4 Merge "disp: msm: dsi: enable xlog in critical paths" 2020-09-18 03:50:13 -07:00
qctecmdr
5382be1db4 Merge "disp: msm: dp: log altmode events in xlog" 2020-09-18 03:50:12 -07:00
qctecmdr
e7c79e76dc Merge "disp: msm: sde: remove previous pm qos irq vote during affinity change" 2020-09-18 00:12:13 -07:00
qctecmdr
d0e92b2a26 Merge "disp: msm: dp: fix dp-mst stream double disabled issue" 2020-09-18 00:12:13 -07:00
qctecmdr
99372af0b6 Merge "disp: msm: dp: skip attention requests on disconnect" 2020-09-18 00:12:13 -07:00
qctecmdr
3ac7505d1d Merge "disp: msm: sde: return latest rsvp_next pointer on poll timeouts" 2020-09-18 00:12:13 -07:00
Sankeerth Billakanti
3b784e6ef5 disp: msm: dp: log altmode events in xlog
Add the altmode communication events in xlog to help
debug the stability issues.

Change-Id: I29d4821a8222e6139187f92b75ec1d05b5ce4939
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2020-09-18 09:53:43 +05:30
qctecmdr
c16eaa7924 Merge "disp: msm: sde: fix rounded corner region partial update logic" 2020-09-17 13:13:25 -07:00
Rajeev Nandan
2103ce58b8 disp: msm: sde: fix panel early event blank notifier call
If trusted vm is disabled, the DRM_PANEL_EARLY_EVENT_BLANK
notifier does not get called because of this touch early
suspend does not happen which leads to continuous touch
i2c transfer failure during suspend.

Change-Id: I6abaacb9f8343eec24d5642f7eda9e7c410fd8b7
Signed-off-by: Rajeev Nandan <rajeevny@codeaurora.org>
2020-09-17 13:52:00 +05:30
Krishna Manikandan
5bacc44468 disp: msm: sde: enable trusted vm support for shima
Enable catalog entry to support trusted vm support
for shima target.

Change-Id: I1bdabf20243f7b52ad5978e75cd6decfa30c9b36
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2020-09-17 11:26:53 +05:30
Xiaowen Wu
c60d3d5989 disp: msm: dp: fix dp-mst stream double disabled issue
There is a corner case when dp-mst stream is disabled twice:

1. stream 1 is enabled
2. cable plugged out, stream 1 is disabled by kernel
3. cable plugged in, enable stream 0 first
4. disable stream 1

Stream 1 is double disabled and will cause hw crash. This change
will add the check and skip stream_off if already disabled.

Change-Id: Icd1e815a1ed14cd4e784924f3db19b98eb06d571
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2020-09-16 06:25:38 -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
Narendra Muppalla
6e8693a6ef disp: msm: sde: return latest rsvp_next pointer on poll timeouts
To avoid use after free issues this change gets latest rsvp_next pointer
in poll timeout scenario.

Change-Id: I4bd4ce1ce9d4f5f2df0e814ceb8babe544578fc6
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-09-15 17:57:06 -07:00