提交图

923 次代码提交

作者 SHA1 备注 提交日期
Mahadevan
a3fdf9025e disp: msm: sde: add check to fix null pointer dereference
In pstate_cmp the plane_state structures are accessed
without checking it is allocated or not, which leads to
null pointer dereference. To fix it NULL check is added.

Change-Id: I5982138b396b70979205d87bc9aa260d9501fee0
Signed-off-by: Mahadevan <mahap@codeaurora.org>
2020-11-18 13:15:47 +05:30
qctecmdr
987888e623 Merge "disp: msm: sde: add msgq support for sde vm layer" 2020-10-29 11:24:07 -07:00
qctecmdr
c7ba46d5bf Merge "msm: sde: prevent illegal register access" 2020-10-28 18:43:29 -07:00
Jeykumar Sankaran
d076f02017 disp: msm: sde: add msgq support for sde vm layer
Linux message queues(msgq) are used to communicate between VM's
This change creates a display specific msgq and a set of
framework api's for the VM layer to invoke communication
between the VMs'.

Display msgq is bidirectional. Tx end is created by default for
both the VM's. Rx is kept optional to avoid unnecessary creation
of listener threads.

Change-Id: If4e6410045293d6b21087a76ec018d4784dd5238
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-10-28 00:52:12 -04:00
qctecmdr
2fb129f394 Merge "disp: msm: sde: update RSC when QSYNC property is updated" 2020-10-27 17:47:57 -07:00
Ping Li
a0ae165cc3 msm: sde: prevent illegal register access
If event register is called from LA VM when the HW is owned by trusted
VM, it will lead to a crash. This change adds checks to prevent illegal
register access when the HW is not owned by LA VM.

Change-Id: Ib4d956fdce4b5aae41e765d7355082c5e233efe2
Signed-off-by: Ping Li <pingli@codeaurora.org>
2020-10-27 16:51:56 -07:00
qctecmdr
68399fac7e Merge "disp: msm: sde: limit encoders attached to crtc during trusted-ui" 2020-10-27 15:10:05 -07:00
Steve Cohen
50e20bde15 disp: msm: sde: update RSC when QSYNC property is updated
RSC is updated during encoder enable/disable/modeset or power-
collapse/wakeup. The RSC vote for primary display will change
depending on QSYNC status which might change without modeset or
power-collapse. Add a call to update the primary display's vote
when the QSYNC property is updated.

Change-Id: I664754e4aae689ef2db5b1ef7b8b55a4c5fad3be
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-10-27 13:27:56 -04:00
Veera Sundaram Sankaran
a61f249398 disp: msm: sde: limit encoders attached to crtc during trusted-ui
Add checks to block transition to trusted-vm when multiple encoders
are attached to a crtc. This ensures, concurrent writeback is
disabled before trusted-ui usecase. Additionally, avoid enabling /
disabling the IRQs associated with the cwb encoder during all
the transitions to avoid any unbalanced calls.

Change-Id: I022077018ac9b7dfb62506cfaddcb60cb8b35ed8
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-10-27 13:18:19 -04:00
qctecmdr
ec3da37b4a Merge "disp: msm: sde: increment refcount of dma_fence before access" 2020-10-27 10:08:51 -07:00
Veera Sundaram Sankaran
303c324c43 disp: msm: sde: fix crtc_state iteration during vm release
Iterate over the crtc old/new state and decide which ones
to process by checking the active state of both during
the vm release in error cases.

Change-Id: Iab20e89792c53fb72e0c00f1fa5091616c7afbf3
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-10-23 23:01:33 -07:00
Veera Sundaram Sankaran
26b6ae2d21 disp: msm: sde: fix Trusted-ui state transition check
Fix the checks done as part of the trsuted-ui transition.
Allow full validation to go through whenever the new vm request
or old vm request is not NONE. Split the checks and the vm acquire,
so vm acquire can be done after all necessary checks are over.

Change-Id: I91165010ad110193c2ca3947af8c6504cd259919
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-10-23 23:01:27 -07:00
Jayaprakash
0a5fdc0fc3 disp: msm: sde: increment refcount of dma_fence before access
Add changes to increment refcount of dma_fence before accessing
the input_fence structure in plane_state through debug_fs node and
decrement once access is finished. This prevents the use after free
issues when accessed through debug_fs node.

Change-Id: I262336ce2b86a94d7662d834e8fd3509dadda1bd
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2020-10-23 14:52:37 +05:30
qctecmdr
746f5eb68a Merge "disp: msm: dp: cache edid data for mst" 2020-10-23 00:57:51 -07:00
Sudarsan Ramesh
cf4877c2c3 disp: msm: dp: cache edid data for mst
Currently, in SST mode, sink edid is read once after hpd
and reused on subsequent mode enumeration calls. But in
MST mode, there is no caching and the driver re-reads the
edid from the sink on every get_modes call for each monitor.
Each read takes more than 500ms causing unnecessary delays
during MST enumeration.

This change reads the edid once per hpd and uses the
cached data on subsequent calls.

Change-Id: I27545a44b9f9bd40000dde60735815f9c47fa54c
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2020-10-22 20:34:21 -04:00
qctecmdr
38f560fb02 Merge "disp: msm: sde: avoid mutex lock for crtc flush event thread" 2020-10-20 16:13:50 -07:00
qctecmdr
68f4129cc6 Merge "disp: msm: sde: add support for qsync min fps list" 2020-10-19 16:18:30 -07:00
qctecmdr
b267a4e5a2 Merge "disp: msm: sde: fix vblank handling during trusted UI" 2020-10-16 00:13:41 -07:00
qctecmdr
81b698b276 Merge "disp: msm: sde: support qsync and vrr in same atomic commit" 2020-10-16 00:13:41 -07:00
Yashwanth
30b1dd339b disp: msm: sde: support qsync and vrr in same atomic commit
This change adds support to program both qsync and variable
refresh rate in the same atomic commit. During vrr
usecase, if qsync is enabled, avr ctrl gets programmed
during prepare phase as well as after configuring timing
engine. This change also handles such scenarios to prevent
double programming of avr ctrl.

Change-Id: I19461423b0ae08c8204b5edeb98e3d73ce16a21b
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-10-15 16:03:46 +05:30
Raviteja Tamatam
e5ff0b8f30 disp: msm: sde: add support for qsync min fps list
In current implementation qsync min fps is single value.
It is same for all the list of supported dfps list.
Added support for new dt entry dsi-supported-qsync-min-fps-list
corresponding to the fps supported in the dfps list
dsi-supported-dfps-list.

Change-Id: Ifd5309c2f51865a3c0d9fadb65cbcd291b6ef42b
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2020-10-15 12:32:25 +05:30
qctecmdr
c83a1df2b3 Merge "disp: msm: sde: avoid tx wait during cwb disable and reset" 2020-10-14 23:19:14 -07:00
Veera Sundaram Sankaran
9d1eee0817 disp: msm: sde: fix vblank handling during trusted UI
Currently vblank enable/disable events are processed based
on the vm ownership check. Use the vblank helper functions
instead, during the transitions to avoid processing the
vblank from DRM framework level.

Change-Id: Icb2bd569e73d9206a234489a288320fecf631845
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-10-14 11:06:58 -07:00
Jayaprakash
d1b2e0be42 disp: msm: sde: add verbose evtlogs for debug purpose
Add changes to extend the current evtlogs for ease
of debug purposes.

Change-Id: Ibe136afbf25b8b8decfc06ef3868e3f628df4dcb
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2020-10-14 11:19:05 +05:30
Veera Sundaram Sankaran
689f5eb836 disp: msm: sde: fix trusted-ui transition checks
Avoid crtc_state active_changed flag and explicitly check new/old
crtc_state active to decide if trusted vm transition checks are
required. As the active_changed might not be set at this point
in atomic_check sequence.

Change-Id: I142befad68359ae5ee862a1306bdc75531d63e70
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-10-13 15:10:32 -07:00
Narendra Muppalla
47261ce97c disp: msm: sde: avoid mutex lock for crtc flush event thread
As per current design in crtc disable sequence event thread
can cause deadlock.This change avoids mutex lock for crtc
flush event thread to flush all event work.


Change-Id: Ia7156032bee9245fe84fd1621cf1994920b8e574
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-10-13 13:21:01 -07:00
Dhaval Patel
d9f194e6f7 disp: msm: sde: avoid tx wait during cwb disable and reset
Avoid TX wait during CWB encoder disable and delay
reset call after last CWB frame trigger.

Change-Id: I9f96d522cfe4205e0272b6b3fa9edd409cab3648
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-10-08 21:51:23 -07:00
Ritesh Kumar
4a82bfb9c7 Revert "disp: msm: dsi: Panic on getting continuous ESD check failures"
This reverts commit 93fa9bdf60.

Change-Id: Ia29c690202d53207377fad9117199d9c024a33cf
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2020-10-08 21:50:15 -07:00
qctecmdr
ff5233ee86 Merge "disp: msm: sde: only flush SSPPs when enabling sys-cache read" 2020-10-08 11:34:59 -07:00
qctecmdr
2a32d717d4 Merge "disp: msm: sde: ignore sspp check in rm splash init during vm handoff" 2020-10-01 22:13:22 -07:00
qctecmdr
76293cfe64 Merge "disp: msm: sde: enable system cache support for shima" 2020-10-01 06:53:44 -07:00
qctecmdr
5e96441e58 Merge "disp: msm: sde: delay cwb done wait for last frame" 2020-10-01 00:36:12 -07:00
qctecmdr
4063d019aa Merge "Revert "disp: msm: sde: trigger esd recovery before event notification"" 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
Krishna Manikandan
70d2ee1bf4 disp: msm: sde: enable system cache support for shima
This change enables system cache support for shima
target which allows sde to read image from system
cache instead of DDR memory during static display
for video mode panels.

Change-Id: I2d7e17c4a6f6b477acf84fd2914c8db2d83df286
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2020-10-01 12:02:42 +05:30
Zhao, Yuan
01466c6032 Revert "disp: msm: sde: trigger esd recovery before event notification"
This reverts commit 9ce6a2fbb3.
Revert the change for sde_encoder.c, and keep the change for
sde_connector.c.

Change-Id: I19ff26e4543b9b338ccaf363c99c5eb2c115f99b
Signed-off-by: Zhao, Yuan <yzhao@codeaurora.org>
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-09-30 10:52:59 -07:00
Dhaval Patel
8d6fea832e disp: msm: sde: delay cwb done wait for last frame
Commit Ifa100424733 ("disp: msm: sde: delay
encoder disable for clone mode") delays the CWB
encoder disable but it is also skipping the CWB
disable flush. That can cause the underrun on dp
display if it uses the same 3d_merge HW block. This
change reverts the portion of original code and
only delays the last cwb frame done wait. It still
keep the last CWB frame done wait as it is if crtc
is also moving to inactive state.

Change-Id: I3461188a35197f2925899ceea7ef705adf00a398
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-09-30 10:19:23 -07:00
qctecmdr
90c3cec488 Merge "disp: msm: dsi: Panic on getting continuous ESD check failures" 2020-09-29 09:59:58 -07:00
Steve Cohen
0c946dca85 disp: msm: sde: only flush SSPPs when enabling sys-cache read
The worker function for enabling sys-cache re-uses the flushes
from the previous commit. This ends up flushing several
blocks which have no programming update. Instead, only flush
planes attached to the CRTC which is entering sys-cache state.

Change-Id: Ieed68a713e9e56a5718518cf1a6b632f37864fb9
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-09-28 13:21:06 -04: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
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
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
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
Krishna Manikandan
55099ebe9a disp: msm: sde: ignore sspp check in rm splash init during vm handoff
The last commit in primary-vm before transitioning to
trusted-vm during trusted-ui usecase will be NULL
commit for video mode. In the current splash path,
rm reserve during cont splash res init will succeed
only if there are sspps staged on the mixer. Avoid
this check for vm handoff usecase.

Change-Id: I9829c66f8eb856cc009edc35e489bc9adad1c5d7
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2020-09-23 23:54:37 -07:00