Commit Graph

2976 Commits

Author SHA1 Message Date
Yashwanth
cf0f2627c4 disp: msm: sde: always set CTL_x_UIDLE_ACTIVE register to "1"
As per HW recommendation, FAL10_VETO_OVERRIDE register can
be programmed to disable FAL10 in alternate to disabling
uidle at the sspp level as disabling UIDLE controller will
only disable DPU traffic shaping and will not stop the
system from entering FAL10 state. This change programs
FAL10_VETO_OVERRIDE register during uidle disable and also
sets CTL_x_UIDLE_ACTIVE register to always one to avoid
race condition between different CTL paths.

Change-Id: I9c55f5da2037cb8c448cc978eac0a04608a93650
Signed-off-by: Yashwanth <quic_yvulapu@quicinc.com>
2022-01-05 12:38:38 +05:30
Nilaan Gunabalachandran
e51018b92c disp: msm: use vzalloc for large allocations
Large allocations using kzalloc can lead to timeouts. This updates
the allocation calls accordingly to use vzalloc to remove
requirements on contiguous memory.

Change-Id: I86fa0ae13277d97477210a082703514df792d8a9
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-01-04 17:19:57 -05:00
Ritesh Kumar
e230290310 disp: msm: sde: Add support to limit DSC size to 10k
With full DSC size of 20k, RT performance issues are seen due to the
stress created during larger prefill needed to fill up the 20k DSC buffer.

Limiting DSC size to 10k helps to mitigate these RT performace issues.

This change adds support for this based on new flag has_reduced_ob_max
in sde_mdss_cfg data structure. Flag has_reduced_ob_max has be set
true only on targets where its recommended.

Change-Id: I649d213bcd378025bd0548fb982b55c98c99224f
Signed-off-by: Ritesh Kumar <quic_riteshk@quicinc.com>
2022-01-04 13:47:46 +05:30
qctecmdr
669a9a3190 Merge "disp: msm: sde: avoid setting of max vblank count" 2022-01-03 10:38:19 -08:00
Yashwanth
0f940276c6 disp: msm: sde: add tx wait during DMS for sim panel
This change adds pp_tx during DMS switch for sim panel to
prevent WD timer getting updated in middle of the frame and
creating early vsync which might result in ppdone timeout.
For non-sim panels, this tx wait is not required and is
done similar to posted start.

Change-Id: Ifec68535efa19df27e651ce0a39c03627dff2089
Signed-off-by: Yashwanth <quic_yvulapu@quicinc.com>
2022-01-03 15:33:46 +05:30
qctecmdr
369879853c Merge "disp: msm: dsi: add check for any queued DSI CMDs before clock force update" 2021-12-29 22:31:38 -08:00
qctecmdr
17970cc74c Merge "disp: msm: sde: avoid use after free in msm_lastclose" 2021-12-29 22:31:38 -08:00
Satya Rama Aditya Pinapala
c5c2af4297 disp: msm: dsi: add check for any queued DSI CMDs before clock force update
During a force update of DSI clocks, the state of the byte and pclks are
toggled irrespective of the ref-count. This in addition with ASYNC
command wait can result in interrupt storm, if and when the clocks are
being toggled a previous command that was triggered using the ASYNC
wait flag fires an ISR. The interrupt status doesn't get cleared if
the ISR is being serviced with the clocks are off.

The change adds a check for pending queued commands before any force
update of DSI clocks.

Change-Id: I4ca60d0ad43767791255f00c9af8e99e74786097
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
Signed-off-by: Rajeev Nandan <quic_rajeevny@quicinc.com>
2021-12-29 00:03:35 -08:00
qctecmdr
0b905e08b1 Merge "disp: msm: sde: add cached lut flag in sde plane" 2021-12-28 20:58:15 -08:00
qctecmdr
38440e18c0 Merge "disp: msm: sde: correct pp block allocation during dcwb dither programming" 2021-12-28 20:58:15 -08:00
qctecmdr
0e229f995b Merge "disp: msm: sde: update idle_pc_enabled flag for all encoders" 2021-12-28 20:58:15 -08:00
Mahadevan
ede3f587f7 disp: msm: sde: correct pp block allocation during dcwb dither programming
In mid and low tier targets there is reduction in pingpong
blocks and static allocation of pingpong blocks with respect
to dedicated cwb ids causes mismatch failures and leads to
wb kickoff timeouts. This change corrects the pingpong block
id allocation for dedicated cwb in dither control register
programming path.

Change-Id: I98c06a2c3b49c7ea0556dcf1a921969c300fed16
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2021-12-28 10:52:55 +05:30
Mahadevan
9951d3c784 disp: msm: sde: avoid setting of max vblank count
This change avoids setting of max vblank count in crtc
enable if accurate vsync timestamp feature is disabled.

Change-Id: I6d8299359f581a162a7412da8c9b673e3aeae041
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2021-12-28 09:17:02 +05:30
qctecmdr
9b27e02a2a Merge "disp: msm: sde: update TEAR_SYNC_WRCOUNT register before vsync counter" 2021-12-23 23:10:22 -08:00
Yashwanth
039d83144f disp: msm: sde: add cached lut flag in sde plane
Below is the sequence during which issue is observed
while using stale lut values:
1) Scaler block is enabled in the VIG pipe along with the
valid lut configuration.
2) Idle work gets scheduled and GDSC is turned off erasing
the saved lut values.
3) At the same time, userspace sends a commit assuming lut
values are still valid resulting in artifacts on the
screen.
In the plane state scaler config, only lut flag will be
reset for subsequent commits and remaining properties such
as filter cfgs, lut_idx etc. remains same. This change
caches the lut flag in sde plane whenever the lut is being
set and reuses this flag to handle above issue.

Change-Id: I7d83d5e7a22a73a2d94b100dffe60316f92ec309
Signed-off-by: Yashwanth <quic_yvulapu@quicinc.com>
2021-12-22 14:57:11 +05:30
qctecmdr
cb3c6ffeb4 Merge "disp: msm: sde: flush esd work before disabling the encoder" 2021-12-21 07:42:53 -08:00
Jayaprakash Madisetty
eea04d1a31 disp: msm: sde: avoid use after free in msm_lastclose
This change sets kms in msm_drm_private to NULL during
msm_drm_unbind as this can be accessed from msm_lastclose
during msm_pdev_shutdown concurrently.

Change-Id: Ic44f5cf88a96c970903f2c7d3c5b627e22b411fc
Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
2021-12-21 13:32:16 +05:30
Yashwanth
374c86e91b disp: msm: sde: update TEAR_SYNC_WRCOUNT register before vsync counter
During DMS, when tear check registers are updated near
rd_ptr line count, it was resulting in a spurious
rd_ptr_irq to which frame is getting latched and causing
tearing on the screen. This change updates
TEAR_SYNC_WRCOUNT register before disabling the vsync
counter and adds a spinlock to avoid pre-emption.

Change-Id: I986dc3ce6fb3da5fed758c2f50562df44f2ab557
Signed-off-by: Yashwanth <quic_yvulapu@quicinc.com>
2021-12-20 16:30:19 +05:30
qctecmdr
55288db46f Merge "disp: msm: sde: consider max of actual and default prefill lines" 2021-12-16 23:08:55 -08:00
qctecmdr
8afa530470 Merge "disp: msm: dp: avoid dp sw reset on disconnect path" 2021-12-16 23:08:55 -08:00
Rajeev Nandan
f259cf68d1 disp: msm: dsi: Support uncompressed rgb101010 format
Add support for uncompressed rgb101010 format.

Change-Id: I60c2f7817eb2ea3e462c4692b1beb7f523836326
Signed-off-by: Rajeev Nandan <quic_rajeevny@quicinc.com>
Signed-off-by: Ritesh Kumar <quic_riteshk@quicinc.com>
2021-12-16 20:03:44 +05:30
Yashwanth
73b252c722 disp: msm: sde: update idle_pc_enabled flag for all encoders
At present, idle_pc_enabled flag will be set for encoders
containing only these capabilities MSM_DISPLAY_CAP_CMD_MODE
and MSM_DISPLAY_CAP_VID_MODE. When cwb is triggered,extra
power vote will be taken during kickoff and vote remains
till cwb is disabled. In between, if primary goes into idle
power collapse, vote taken by cwb will not be removed since
idle_pc_enabled flag is not set. This change updates
idle_pc_enabled flag for all encoders based on catalog
property.

Change-Id: If4f147edbd610d0302e4d6c0a3e6b7de2c729db1
Signed-off-by: Yashwanth <quic_yvulapu@quicinc.com>
2021-12-16 11:25:43 +05:30
GG Hou
4d5ae8084e display: driver: default post start if SBLUA DMA exist
Keep posted start as default configuration in driver
if SBLUT is supported on target.
Do not allow HAL to override driver's default frame trigger mode.

Change-Id: I46ad5c87abfb05446592b0e497a23a3a3fc62ca7
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
2021-12-14 22:58:29 -08:00
Kalyan Thota
13e728953c disp: msm: sde: flush esd work before disabling the encoder
Flush ESD status work before resetting the encoder state during
virt_disable sequence to avoid stale pointers being used in
the ESD work.

Change-Id: I4bb08a7a7ae33ad6386169667692736e554141c4
Signed-off-by: Kalyan Thota <quic_kalyant@quicinc.com>
2021-12-14 06:52:04 -08:00
qctecmdr
e7c09f0092 Merge "disp: msm: sde: increment rounded corner HW version" 2021-12-13 22:47:36 -08:00
qctecmdr
27576cdfd5 Merge "disp: msm: sde: extend RC2/3 and LTM2/3 for Kalama target" 2021-12-13 22:47:36 -08:00
qctecmdr
b6c008113a Merge "disp: msm: sde: add support for DMA 4,5 for Kalama" 2021-12-13 22:47:36 -08:00
qctecmdr
9c9343d54f Merge "Merge branch 'display-kernel.lnx.5.10' into display-kernel.lnx.1.0" 2021-12-13 21:16:18 -08:00
qctecmdr
ae2854f289 Merge "disp: msm: sde: allow qsync update along with modeset" 2021-12-13 08:45:25 -08:00
Yashwanth
31d274ebb7 disp: msm: sde: allow qsync update along with modeset
This change allows concurrent qsync updates along with
DMS modeset condition. With this change, qsync can be
enabled or disabled in the same atomic commit along with
MSM_MODE_FLAG_SEAMLESS_DMS condition.

Change-Id: I1b51a68f947126b25a578645e92d95c9a8ae26f5
Signed-off-by: Yashwanth <quic_yvulapu@quicinc.com>
2021-12-13 13:22:23 +05:30
Rajkumar Subbiah
93971106b4 disp: msm: dp: avoid dp sw reset on disconnect path
In an effort to reset the DP controller states on a disconnect, the
driver is issuing a SW reset to the controller. But SW reset on
the controller doesn't necessarily restore the controller to its
full reset state. It only resets part of the logic. So if for some
reason the MST streams were not disabled properly, ie. the slot
allocations were not reset properly in the controller, then a SW
reset would result in the DP controller raising state interrupts.
Since this SW reset is issued in the tail end of the disconnect
processing, the driver turns off all the clocks and also
removes the irq handler. This results in an interrupt storm at
the MDSS top level.

This change removes the SW reset on the disconnect path and
relies on the SW reset that already exists in the connect path
to restore controller state.

Change-Id: Ie7115e17d3c50c46c83c6f0e333da5cb534b8227
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2021-12-09 23:07:03 -05:00
Prabhanjan Kandula
6547137f7b disp: msm: sde: consider max of actual and default prefill lines
In transfer-time calculation remove fixed prefill lines assumption
and consider max of default prefill lines and prefill lines specified
from the panel timing info.

For panels with higher porches exceeding default prefill lines
alternate framedrops can occur if transfer-time exceeds RSC static
waketup time as actual prefill lines are considered in RSC static
wakeup timer calculation. This change ensures transfer-time is with
in RSC static wakeup time.

Change-Id: I3663f9c9179efb7225a748f456f2a2cf167d241e
Signed-off-by: Prabhanjan Kandula <quic_pkandula@quicinc.com>
2021-12-09 16:55:08 -08:00
Prabhanjan Kandula
add2cb79c9 disp: msm: ensure vbif debugbus not in use is disabled
Ensure register write is complete with a write barrier
while disabling other vbif debugbus when not in use
and also while clearing the test point.

Change-Id: I40da69027f86e13f4a71d87ad3975f94a5a1cb31
Signed-off-by: Prabhanjan Kandula <quic_pkandula@quicinc.com>
2021-12-09 16:54:47 -08:00
Prabhanjan Kandula
9ab14dedc2 disp: msm: sde: update cached encoder mask if required
When a new connector is added or removed an a crtc because
of clone mode enable and disable update cached encoder mask.
Currently since cached encoder mask is not updated properly
vblank frame counter is returning wb encoder frame counter
right after clone mode disable on wb encoder.

Change-Id: Ieff9dfbf0c7df3688fb1b6f9d3f3614345b494c2
Signed-off-by: Prabhanjan Kandula <quic_pkandula@quicinc.com>
2021-12-09 16:08:34 -08:00
Prabhanjan Kandula
92cbd6d654 disp: msm: sde: while timing engine enabling poll for active region
DCS commands triggered right after timing engine enable can conflict
with blanking period causing command transfer failures. Right after
timing engine enable poll for frame start and line count reaching
active region of display before any DCS commands.

Change-Id: Ia3967e01c3bb5bc82aa3549c300fa8335e00210c
Signed-off-by: Prabhanjan Kandula <quic_pkandula@quicinc.com>
2021-12-09 16:08:34 -08:00
Prabhanjan Kandula
dddb10147f disp: msm: enable cache flag for dumb buffer
For dumb buffer allocation switch to cached flag
from current use of write combine.

Change-Id: Ic3dc88ff83a083e4f386c2aecc27ce71324e06f5
Signed-off-by: Prabhanjan Kandula <quic_pkandula@quicinc.com>
2021-12-09 16:08:25 -08:00
Nilaan Gunabalachandran
00468713c6 disp: msm: sde: disable ot limit for cwb
Currently ot limits are being set for concurrent writeback,
which is not supported. This change adds a check to correctly
set wfd parameter while applying ot limit settings.

Change-Id: I87c1ca756c1714fec4466cd5a5a820ddf2519975
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2021-12-09 14:30:16 -05:00
qctecmdr
bc9f90b65c Merge "disp: msm: sde: reset mixers in crtc when ctl datapath switches" 2021-12-09 05:06:37 -08:00
qctecmdr
d9a891d5ff Merge "disp: msm: dsi: set qsync min fps list length to zero" 2021-12-09 05:06:37 -08:00
qctecmdr
d58ff8053f Merge "disp: msm: sde: update vm state atomic check for non-primary usecases" 2021-12-08 23:57:49 -08:00
qctecmdr
f9eb7a143c Merge "disp: msm: sde: reset CTL_UIDLE_ACTIVE register only if uidle is disabled" 2021-12-08 23:57:48 -08:00
Abhijit Kulkarni
fb15930280 disp: msm: sde: avoid race condition at vm release
This change acquires the vm lock before pre-releasing the
dependent drivers. This avoids any race condition on any
parallel async commands transfers scheduled on connector
drivers. Additionally the main irq line is only disabled
after the pre-release to allow any ongoing transfers
to complete.

Change-Id: Ic0bffc93ebb1b69fbd8d1f096b320a86ad84c857
Signed-off-by: Abhijit Kulkarni <quic_kabhijit@quicinc.com>
2021-12-08 12:52:26 -08:00
Jeykumar Sankaran
cf39b00660 Merge branch 'display-kernel.lnx.5.10' into display-kernel.lnx.1.0
Change-Id: I5d2b08380b6b0eb09492b950fb38cd9a0b3196c1
2021-12-08 12:37:35 -08:00
Mahadevan
e0d90143fd disp: msm: dsi: set qsync min fps list length to zero
In certain usecase where qsync is enabled without qsync
min fps list, incorrect list length might cause issues
while populating modes. This change sets qsync_min_fps
length to zero if its empty which resolves such issues.

Change-Id: I23083d8fd9610665dad63188f5d2db7eb6b23ee1
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2021-12-08 19:33:12 +05:30
Jayaprakash Madisetty
8b01e6124e disp: msm: sde: reset mixers in crtc when ctl datapath switches
This change reinitializes the sde_crtc->mixers when CTL
datapath switch occurs during mode set and RM allocation
of CTL hw block is changed. This initialization is required
for CTL_LAYER programming to trigger on the new CTL allocated
from RM.

Issue case:
1. Primary Display is using CTL_0 and it is reserved.
2. Secondary Display is using CTL_1. On suspend, RM adds
   CTL_1 into the free list.
3. External Display is powered on, RM allocates CTL_1 hw blk.
4. Secondary Display is powered on, RM allocated CTL_2 hw blk.
5. External Display is suspended/unplugged, RM adds CTL_1 into
   the free list.
6. When any mode_set(say fps switch) occurs on secondary, RM
   allocates new resources and CTL_1 is allocated.

sde_crtc->num_mixers is non zero, so all the layer programming
happens on CTL_2, but CTL_1_FLUSH bits are programmed causing
hw timeout issue.

Change-Id: I5f1f52b7673740c48b249ab4d36e80b7a1d3db96
Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
2021-12-08 11:28:43 +05:30
Yashwanth
093d93ed58 disp: msm: sde: update vm state atomic check for non-primary usecases
If vm has already transitioned from primary to trusted,
triggering a wb/secondary display commit will result in
crash since hw is not owned by the vm. This change adds
necessary changes to fail atomic check in such usecases.

Change-Id: Ic9886d479726c27d1072d12304a87f3bf5deeb76
Signed-off-by: Yashwanth <quic_yvulapu@quicinc.com>
2021-12-08 08:44:39 +05:30
Yashwanth
b9b744a123 disp: msm: sde: reset CTL_UIDLE_ACTIVE register only if uidle is disabled
This change sets CTL_UIDLE_ACTIVE register whenever uidle
is enabled and resets it only when uidle is disabled.

Change-Id: I0393d1585df4fdb79a844d04df62ac9eda949232
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-12-07 14:20:33 +05:30
Amine Najahi
d59faab858 disp: msm: sde: increment rounded corner HW version
Increment rounded corner HW version to 1.1

Change-Id: I8b1004b84e4b897d68b08deb559ef96ea097d7b6
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
Signed-off-by: Renchao Liu <quic_rencliu@quicinc.com>
2021-12-07 15:11:43 +08:00
Xu Yang
882cc50498 disp: msm: sde: extend RC2/3 and LTM2/3 for Kalama target
Change supports extending the enum for LTM2/3 and RC2/3.

Change-Id: I45df1808fa3a7e23f20afef084edaf091a59d7dd
Signed-off-by: Xu Yang <quic_yangxu@quicinc.com>
2021-12-07 11:40:54 +08:00
Renchao Liu
1238001c28 disp: msm: sde: add support for DMA 4,5 for Kalama
Expand reg dma data structures to support DMA 4,5.

Change-Id: I3aa7e879eb5ab7f89a7152e202759e885b05c75a
Signed-off-by: Renchao Liu <quic_rencliu@quicinc.com>
2021-12-06 17:32:08 -08:00