Commit Graph

1711 Commits

Author SHA1 Message Date
Yashwanth
8249e8b7f3 disp: msm: sde: use current crtc state during idle work scheduling
In the current code, previous crtc state is used to know
the idle timeout period and to schedule the idle notify
work. Due to this, notify work is not getting scheduled
in some cases even when idle timeout is specified. This
change uses current state for idle timeout period.

Change-Id: I3ff4df6a8edd6a5a20d2e19c3c27ebb221694ac1
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-11-06 15:57:58 +05:30
qctecmdr
71267af524 Merge "disp: msm: sde: delay frame trigger on esd failure" 2020-11-05 19:52:37 -08:00
qctecmdr
d31481dbe6 Merge "disp: msm: sde: fix ich reset override logic" 2020-11-05 13:15:56 -08:00
Veera Sundaram Sankaran
1fce17fe87 disp: msm: sde: avoid backlight updates on enable/disable of TVM
Avoid setting backlight to max/0 during bridge enable/disable
for trusted-vm as the transition between the VMs are expected
to be seamless without any implicit changes to backlight.

Change-Id: Ib828113e49af1be4effea2b71b3106e3cbf401c2
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-03 17:56:19 -08:00
Jeykumar Sankaran
08c40fb26e disp: msm: sde: allow backlight device registration for trusted vm
Trusted VM can support dynamic backlight updates through DCS
commands. Allow SDE to register for the backlight device
only if the panel supports DCS backlight update mode.

Note that thermal driver is disabled in trusted vm. So we are
still avoiding registering with msm thermal  driver. The
backlight updates are only supported through backlight driver
provided sysfs nodes.

Change-Id: I9cd41d473445387c8bc9048d7e565d49124a36b7
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-11-03 17:56:02 -08:00
Abhijit Kulkarni
f1a277597f disp: msm: sde: delay frame trigger on esd failure
This change adds support for delaying kickoff in case of ESD error.
This delay is required to handle a race condition between esd
workqueue and display thread.
When ESD workqueue detects the esd and while handling the failure
notification if the new updates arrive on display thread, there
is a possibility that ESD workqueue will keep on waiting on pp_done.
This could happen if display thread keeps on incrementing the kickoff_cnt
before workqueue can check the condition. With this change the kickoff is
delayed, allowing the workqueue to get scheduled and avoiding the race
condition.

Change-Id: I8e6fff5ea5494ae801d1e60ae85b7ad19cc12961
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-11-03 10:14:58 -08:00
Abhijit Kulkarni
2457f38adc disp: msm: sde: fix ich reset override logic
This change fixes the detection logic for overriding the ich
reset in both single and dual dsc case. In the previous logic
ich reset override was not getting triggered when partial update
on single dsc was enabled. This override is required to change the
default Hw behavior of changing the ich reset position.

ICH reset needs to be overridden in dual dsc merge case when
partial update disables the dsc merge and no. of slices per
encoder drops to 1. Similarly for single dsc case partial update
case when DSC encoder configuration changes from 2 slices to
single slice this override is required.

Change-Id: I435dc7ff10c9fb0edb8e40e6701608aa22136981
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-11-03 10:10:35 -08:00
qctecmdr
987888e623 Merge "disp: msm: sde: add msgq support for sde vm layer" 2020-10-29 11:24:07 -07:00
qctecmdr
cf37238a38 Merge "disp: msm: dsi: add dsi ramdump support without DEBUG_FS" 2020-10-29 05:17:45 -07:00
qctecmdr
c7ba46d5bf Merge "msm: sde: prevent illegal register access" 2020-10-28 18:43:29 -07:00
Narendra Muppalla
9b133dd201 disp: msm: dsi: add dsi ramdump support without DEBUG_FS
This change adds dsi display ramdump support when DEBUG_FS
is not enabled.

Change-Id: Ic6659a9380acd5eb55a3270d3e3b7016a9cd2bd7
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-10-28 13:07:28 -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
qctecmdr
4d25c19eaa Merge "disp: msm: re-apply dma_map_attr during secure-UI to secure-vid transition" 2020-10-27 10:08:51 -07:00
qctecmdr
0f8c7b9d49 Merge "disp: msm: enable event log and disp ramdump without DEBUG_FS" 2020-10-27 07:51:07 -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
qctecmdr
9fadc353f3 Merge "disp: msm: dp: handle FEC EN sequence collision with BS symbols in SW" 2020-10-23 09:51:33 -07:00
qctecmdr
83d31bb3f7 Merge "disp: msm: dp: use VESA recommended default dsc slice height" 2020-10-23 09:51:33 -07:00
Jayaprakash
babaee2f7f disp: msm: re-apply dma_map_attr during secure-UI to secure-vid transition
Add changes to re-apply the dma_map attributes during secure UI
to secure-video transition to avoid mismatch of attributes
between the import_attach newly created and the msm_iommu
mappings already existed.

Change-Id: I5a902d6d88c6ea9f633b4396e8121c2b14708f31
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2020-10-23 16:40:46 +05:30
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
a27dce97f8 Merge "disp: msm: dsi: invoke DSI soft reset when video engine is stuck" 2020-10-22 11:28:20 -07:00
Amine Najahi
6d9245e01a disp: msm: dp: handle FEC EN sequence collision with BS symbols in SW
Prior to Makena, hardware requires SW to retry FEC EN sequence when first
attempts fails. This is needed because hardware doesn't prevent FEC EN
logic to be inserted while BS symbols are sent. Which can lead to some
sink device to not being able to detect FEC EN sequence.

This change implements HPG guidelines, by monitoring FEC_STATUS and
retrying 3 times before failing the enable call.

Change-Id: I350eabe31d39f619e536ef87648874b4d58a7292
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-10-22 14:18:01 -04:00
qctecmdr
2372f6e819 Merge "disp: msm: dsi: error handling during debugfs command transfer" 2020-10-22 08:18:12 -07:00
Ritesh Kumar
97dcdc695a disp: msm: dsi: invoke DSI soft reset when video engine is stuck
During ESD check failure, DSI video engine can get stuck
sending data from display engine. In use cases where GDSC
toggle does not happen like DP MST connected or secure video
playback, display does not recover back after ESD failure.
This change adds support to perform soft reset when DSI
video engine gets stuck.

Change-Id: I9cb31e6c71c4da171f9fe22fc3bee9175711831d
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2020-10-22 11:48:24 +05:30
Satya Rama Aditya Pinapala
3cf46fba79 disp: msm: dsi: error handling during debugfs command transfer
Change clears the DSI TX command buffer allocated for debugfs
command transfers and destroys the command packets in case of
error during command transfer.

Change-Id: Ia1e822b9b60d44f7eba325116d416916419471fa
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-10-21 21:39:53 -07:00
Dhaval Patel
4a21b7b6d8 disp: msm: enable event log and disp ramdump without DEBUG_FS
This patch allows event log and display ramdump
module compilation when DEBUG_FS config is in disabled
state.

Change-Id: Ibe1ff7d9d4a4f3c64091df757caba2450295e7ec
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-10-21 17:01:52 -07:00
Satya Rama Aditya Pinapala
bbe18a1689 disp: msm: dsi: batching multiple DSI commands using debugfs node
The change batches DSI commands sent using the debugfs node, in a
separate buffer from the TX command buffer to ensure that they are not
triggered before the last command bit is set. Once the last command
bit is set the buffer is then copied to the DSI TX buffer and triggered.

Change-Id: I9ba624e4e19341696a974994817603315c6c8a45
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-10-21 15:25:48 -07:00
Ritesh Kumar
ba3d7304f5 disp: pll: Fix cfg1 value when pclk_src_mux parent is updated
Currently, PLL_CFG1(1:0) register is updated with cached values
in dsi_pll_enable. This can create issue when UEFI and kernel
cfg1 programming is not same. To fix it, return cached value
of cfg1 when its read in pclk_mux_read, so that pclk_mux_write
is called and cached value is updated.

Change-Id: I1e45ff0685797bf4dd2e3a52af4753425f31edfc
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2020-10-20 23:17:23 -07:00
qctecmdr
3668566409 Merge "disp: msm: dp: reset disconnect flags on cable hotplug" 2020-10-20 18:36:53 -07:00
qctecmdr
38f560fb02 Merge "disp: msm: sde: avoid mutex lock for crtc flush event thread" 2020-10-20 16:13:50 -07:00
Sankeerth Billakanti
11bb969e5d disp: msm: dp: reset disconnect flags on cable hotplug
When a physical DP sink is connected after a simulation
session, the attention events from the sink are ignored.
The forced_disconnect flag prevents handling of attention
events when disconnect is simulated or forced. This flag
does not get reset when a physical sink is connected.
Certain sinks which lose link integrity after link
training sequence fail to display image.

This change will reset the flag so that the attention
events which occur after the cable hotplug can be processed.

Change-Id: Ie551ead19ecff0e93da48acc2dbb1d761c55fa20
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2020-10-20 06:09:57 -07:00
qctecmdr
68f4129cc6 Merge "disp: msm: sde: add support for qsync min fps list" 2020-10-19 16:18:30 -07:00
qctecmdr
7d1acf4361 Merge "disp: msm: dsi: add support to set continuous clock through phy" 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
qctecmdr
6edad6b0ad Merge "disp: msm: dsi: Add support for secondary display using firmware approach" 2020-10-15 21:39:04 -07:00
qctecmdr
95955d984a Merge "disp: msm: dsi: Fix num of displays for firmware approach" 2020-10-15 10:08:10 -07:00
Lipsa Rout
a43ff33da8 disp: msm: dsi: Add support for secondary display using firmware approach
Currently, changing panel configuration from firmware approach is present
for single display. This change adds support for secondary display using
firmware approach.

Change-Id: I8095dceed1567d8582c7473c0ac7f59c4666a200
Signed-off-by: Lipsa Rout <lrout@codeaurora.org>
2020-10-15 18:04:32 +05:30
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
qctecmdr
09dad7e79b Merge "disp: msm: sde: add verbose evtlogs for debug purpose" 2020-10-14 23:19:14 -07:00