Commit Graph

3341 Commits

Author SHA1 Message Date
Sankeerth Billakanti
e2c0202fa4 Revert "disp: msm: dp: check for display status before SDP config"
This gerrit reverts the change I330f6fc162f3366a9ca0aeb64956927dceca4c80
(disp: msm: dp: check for display status before SDP config)

Change-Id: I74391df3493652397d0456c43feba38521baadb5
Signed-off-by: Sankeerth Billakanti <quic_sbillaka@quicinc.com>
2022-12-06 07:57:45 -08:00
Linux Build Service Account
1768bf4fc3 Merge 212962f3df on remote branch
Change-Id: If46c7ee4ae69d4262c7f36612b7c595e0e571e63
2022-11-30 23:58:49 -08:00
Linux Build Service Account
3968cc5882 Merge "correcting code diff" into display-kernel.lnx.5.15.r1-rel 2022-11-21 08:10:04 -08:00
Linux Build Service Account
ee7dc6dc04 Merge "disp: msm: dp: do not skip wait for usb disconnect with dp_sim" into display-kernel.lnx.5.15.r1-rel 2022-11-21 08:10:03 -08:00
V S Ganga VaraPrasad (VARA) Adabala
2c85905256 correcting code diff
Change-Id: I6f790ec62dac88b916897fb9aa0722bd41d97f73
Signed-off-by: V S Ganga VaraPrasad (VARA) Adabala <quic_vadabala@quicinc.com>
2022-11-21 08:04:11 -08:00
Sankeerth Billakanti
377e3d073a disp: msm: dp: do not skip wait for usb disconnect with dp_sim
Wait for the userspace to disable DP when usb cable is removed
during DP simulation. The usb notifier is a blocking call.

Change-Id: I6c00cc684b4d99da30a129f034eb17bf505738bb
Signed-off-by: Sankeerth Billakanti <quic_sbillaka@quicinc.com>
2022-11-21 08:03:20 -08:00
Andhavarapu Karthik
7f76bbaaa7 disp: msm: sde: flush event thread workqueue before vm release
In some cases while transitioning between vm, vblank
work might be get executed on event thread after handoff is
completed on commit thread leading to crash. This change
flush the event thread queue during vm pre-release before
lending the io resources to the other vm.

Change-Id: Ife1fea54dd236cc4cbca70f7636d27c4de1280ec
Signed-off-by: Andhavarapu Karthik <quic_kartkart@quicinc.com>
2022-11-21 07:58:06 -08:00
qctecmdr
212962f3df Merge "disp: msm: dsi: skip clearing dynamic refresh done status in dsi ctrl ISR" 2022-11-17 05:49:15 -08:00
qctecmdr
055742e7f8 Merge "disp: msm: dp: check for display status before SDP config" 2022-11-17 05:49:14 -08:00
qctecmdr
114e45a055 Merge "disp: msm: sde: flush event thread workqueue before vm release" 2022-11-17 05:49:14 -08:00
Ritesh Kumar
62864e8bac disp: msm: dsi: skip clearing dynamic refresh done status in dsi ctrl ISR
After triggering dynamic refresh, if there is any dsi_ctrl_isr, dynamic
refresh done status also gets cleared as part of it. Because of this,
wait4dynamic_refresh_done timeout error is seen even though dynamic refresh
is done successfully.

Change-Id: I39b42c60d15d9cb0557669f95ff2ed83989f9cd3
Signed-off-by: Ritesh Kumar <quic_riteshk@quicinc.com>
2022-11-16 05:46:58 -08:00
Ritesh Kumar
45439a9ef4 disp: msm: dsi: Avoid re-initializing PLL registers during dyn clk switch
Currently, we are always initializing PLL registers whenever PLL is
configured. Re-initializing PLL registers during dynamic clock switch in
case of cphy video mode is moving the PLL to some bad state resulting in
display freeze. Avoid this by restricting initialization of PLL registers
to only while turning on the PLL. This change is for 4nm PLL.

Change-Id: I57c8cfe1927f83f1ac25238c696a606960f3a8c8
Signed-off-by: Ritesh Kumar <quic_riteshk@quicinc.com>
2022-11-15 09:10:49 +05:30
qctecmdr
ea6b7c6ba0 Merge "disp: msm: dp: issue peripheral flush on every DP commit" 2022-11-13 09:06:52 -08:00
qctecmdr
9a03f599e9 Merge "drm: msm: sde: cache plane csc in sde plane state" 2022-11-12 20:33:51 -08:00
qctecmdr
012fce607e Merge "disp: msm: dp: use compressed bpp for RG calculation" 2022-11-12 20:33:51 -08:00
Rajkumar Subbiah
007df30f22 disp: msm: dp: use compressed bpp for RG calculation
When calculating the Rate Governor parameters for MST, if the
stream is compressed, the calculator expects the input bpp to be
the compressed bpp, but currently the driver is passing uncompressed
bpp. This change updates the driver to pass compressed bpp to the
calculator.

Change-Id: Iac51d75843bd0072bbe07142ac4533d841f795f5
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2022-11-11 08:26:14 -08:00
qctecmdr
20bc8af041 Merge "disp: msm: sde: remove unnecessary debug message" 2022-11-11 02:07:41 -08:00
Sandeep Gangadharaiah
7551e0cdb0 disp: msm: dp: check for display status before SDP config
During DP sim test cases there is a chance that userspace would
call into SDP config ops even when display is not active which
would lead to NOC errors. This change checks for display status
during SDP config operation.

Change-Id: I330f6fc162f3366a9ca0aeb64956927dceca4c80
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-11-08 07:39:22 -08:00
Andhavarapu Karthik
3128c30a23 disp: msm: sde: flush event thread workqueue before vm release
In some cases while transitioning between vm, vblank
work might be get executed on event thread after handoff is
completed on commit thread leading to crash. This change
flush the event thread queue during vm pre-release before
lending the io resources to the other vm.

Change-Id: Ife1fea54dd236cc4cbca70f7636d27c4de1280ec
Signed-off-by: Andhavarapu Karthik <quic_kartkart@quicinc.com>
2022-11-08 15:06:44 +05:30
Rajkumar Subbiah
6c5d4622b2 disp: msm: dp: fix bpp to 24 in TU calc for SST DSC
When using the TU calculator for SST DSC usecase, the calculator
expects the bpp to be 24 irrespective of the actual panel bpp.

Change-Id: Ifdab2c00a2a99b4d7d7dea7eadb33bc34e3cfa8b
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2022-11-06 12:14:15 -08:00
Gopikrishnaiah Anand
fd84b6e8e5 drm: msm: sde: cache plane csc in sde plane state
Pipe csc configuration is being cached in the sde plane which can cause
race conditions between hardware programming and caching.
All drm properties should be cached in sde plane state to avoid race
conditions. Change moves caching to sde plane state.

Change-Id: I22470a82b2fc2812f8c526ababc2b517db13a3ce
Signed-off-by: Gopikrishnaiah Anand <quic_agopik@quicinc.com>
2022-11-06 12:14:11 -08:00
Nisarg Bhavsar
a3032958a7 disp: msm: dp: issue peripheral flush on every DP commit
As per DP HPG recommendation, controller flush mode is
set to be synchronous with a vsync. This requires a
peripheral flush to be issued for HDR SDP to be processed.
Currently in a static HDR use case, since the peripheral
flush is not issued after queueing an HDR SDP, it never
gets sent to the sink and it stays in SDR mode. This change
issues a peripheral flush on every DP commit, so that
any pending SDPs are flushed.

Change-Id: I0ed82b6cd8df33539a3067c6ad9827f74de2ed51
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2022-11-06 12:14:00 -08:00
qctecmdr
f1c4b142bc Merge "disp: msm: sde: use panel dimension on full frame RC ROI" 2022-11-01 00:12:37 -07:00
qctecmdr
aad8816035 Merge "disp: msm: sde: fix to avoid creating output hw-fence for CWB" 2022-11-01 00:12:36 -07:00
qctecmdr
a96b1353ae Merge "disp: msm: dp: modify hdcp wait loop to not add to cpu load" 2022-11-01 00:12:36 -07:00
qctecmdr
c22f425795 Merge "disp: msm: dp: avoid releasing vcpi for active crtc" 2022-11-01 00:12:36 -07:00
Andrew Bartfeld
2b91001521 disp: msm: dp: modify hdcp wait loop to not add to cpu load
Currently, hdcp wait loops uses the wait_event() macro which sets the
status of the thread to WAIT_UNINTERRUPTIBLE and contributes to system
load. The macro wait_event_idle() polls for a changing condition in the
same way but instead sets the thread status to WAIT_IDLE which does not
contribute to system load. This prevents hdcp threads from appearing as
hung threads in system load summaries while still properly polling for
status changes.

Change-Id: Ie6991881d912ba6fca6bb0fd9558633b1fb83492
Signed-off-by: Andrew Bartfeld <quic_abartfel@quicinc.com>
2022-10-31 10:22:26 -07:00
Ingrid Gallardo
7ef45409a5 disp: msm: sde: fix to avoid creating output hw-fence for CWB
Current code creates an output hw fence for any virtual
connector with a retire fence attached. This is a problem
for CWB, where the output-fence should be handled as a
sw-fence as current hw can only support a single hw-fence
per ctl path.
Fix this issue by adding a check to only create a retire
output hw-fence for virtual connectors that are not CWB.

Change-Id: I5863282d24ef8940b1f45c1fbd7584f91d28f0b8
Signed-off-by: Ingrid Gallardo <quic_ingridg@quicinc.com>
2022-10-31 10:13:47 -07:00
Amine Najahi
e525225c94 disp: msm: sde: use panel dimension on full frame RC ROI
Currently, RC is using displayh and displayv variables
which are pointing to the LM dimension on a full frame
setting. If DS is enable and HW RC was not disabled the
the full frame ROI will not match the panel resolution
and cause an invalid hardware configuration.

This change uses the height and width values coming
from the mode information when a full frame ROI is
detected.

Change-Id: I274d15cbca61076ea7e95a984f907201e97b76ec
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
2022-10-31 10:05:45 -07:00
Linux Build Service Account
fba06e2000 Merge 2ea74a3bb2 on remote branch
Change-Id: Ib69c361653fa5bf5a4e9c9438a80669fdf326f74
2022-10-31 01:39:37 -07:00
qctecmdr
61dd86f625 Merge "disp: msm: dsi: clear the panel esd_recovery_pending in power on commit" 2022-10-30 18:45:20 -07:00
qctecmdr
d1d8ced211 Merge "disp: msm: dp: enable aux switch from display HPD handler" 2022-10-29 10:31:21 -07:00
qctecmdr
4e43939572 Merge "disp: msm: sde: disable RC in case of configuration mismatch" 2022-10-29 10:31:21 -07:00
Andrew Bartfeld
28cde80bd3 disp: msm: dp: avoid releasing vcpi for active crtc
In MST atomic check function, add a check to ensure it's a disable call
before releasing vcpi slots to ensure atomic_release_vcpi_slots() and
atomic_find_vcpi_slots() are never called in the same atomic check
as mentioned in the kernel docs.

Change-Id: I36cf689b4d3bf9d2469a6c402b6377a667f01c12
Signed-off-by: Andrew Bartfeld <quic_abartfel@quicinc.com>
2022-10-27 14:06:50 -07:00
Ingrid Gallardo
4bfae64bbe disp: msm: sde: remove unnecessary debug message
Move print message from error to debug for a failure that is not fatal
but can be expected when a crtc doesn't have a hw ctl, in this case
driver will handle the output fence as a sw-fence.

Change-Id: I908135dce4336b0c9ec3fa388dc9211c6df97f68
Signed-off-by: Ingrid Gallardo <quic_ingridg@quicinc.com>
2022-10-26 12:21:55 -07:00
Ingrid Gallardo
e6499cbbd0 disp: msm: sde: add events to input and output hw-fences
Add extra display driver debug events for input and output
hw-fences.

Change-Id: I32be1d25d98c510ebba5d39f8aff2a0c54144ba1
Signed-off-by: Ingrid Gallardo <quic_ingridg@quicinc.com>
2022-10-25 17:30:03 -07:00
Ingrid Gallardo
504fdd06db disp: msm: sde: fix to avoid creating hw-fences for empty spec fences
Current display driver sets the hw-fences as valid even when
the speculative fence is empty. Avoid this issue by doing a
positive check and only create hw-fences if all the fences in
the speculative fence are valid.

Change-Id: Iec9636641ac9146eb651be08615e2478994c2508
Signed-off-by: Ingrid Gallardo <quic_ingridg@quicinc.com>
2022-10-25 17:19:31 -07:00
Amine Najahi
7191219f9e disp: msm: sde: disable RC in case of configuration mismatch
Currently when there is a modeset and usermode does not disable
or reprogram the RC mask, driver will compute an invalid configuration.

This change checks the RC mask with panel resolution and disables
RC HW internally if there is a mismatch.

Change-Id: I0e6afcf38cfc9165a6c0d2c12bfbc7b2b5f2ce65
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
2022-10-24 16:37:47 -04:00
Veera Sundaram Sankaran
3c72f95aa3 disp: msm: sde: program read pointer after configuring vsync_counter_en
Program the read pointer after configuring the tearcheck registers.
The read pointer register should be configured after VSYNC_COUNTER_EN
is set as per hw programming sequence. Since the register programming
sequence is changed during the tearcheck configuration, remove the
redundant override call from idle-pc path.

Change-Id: I2fa1429798fab51d08091e74a33f1b1c4382eafe
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-10-24 13:12:32 -07:00
qctecmdr
2ea74a3bb2 Merge "disp: msm: sde: override qsync read pointer during IPC" 2022-10-20 19:18:13 -07:00
qctecmdr
adfcb0f857 Merge "disp: msm: sde: improve qsync trigger window accuracy" 2022-10-20 19:18:13 -07:00
qctecmdr
8ff2ca9b94 Merge "disp: msm: sde: avoid setting plane qos_dirty during cwb modeset" 2022-10-20 19:18:13 -07:00
Amine Najahi
5421008a85 disp: msm: sde: improve qsync trigger window accuracy
Currently, panel jitter and loss of precision are not
compensated when calculating the trigger window size
for a QSYNC panel. These errors can be signigicant on
panels supporting very slow frame rate (10 Hz).

This change improves fixed point calculation and take
into account panel jitter when calculating the minimum
qsync time period.

Change-Id: Ibe620862afbd853580992fccec09cac8307b92bd
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
2022-10-18 06:50:27 -07:00
Amine Najahi
5b30b4e9db disp: msm: sde: override qsync read pointer during IPC
Currently, when there is an idle power collapse HW resets
the internal read pointer value to 0. This causes the trigger
window to be out of sync when power is restored until the
next vsync is received.

This change overrides the internal read pointer value to
the maximum qsync timeout value on restore and defers frame
trigger to next vsync.

Change-Id: Ibdad3f8eb367136ee0d766bed10742a281e36b4e
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
2022-10-18 06:49:57 -07:00
qctecmdr
f6fb5df623 Merge "disp: msm: sde: add support for wait on multiple hw fences" 2022-10-17 05:49:43 -07:00
qctecmdr
f2e56f2eeb Merge "disp: msm: sde: add line counter logging" 2022-10-17 05:49:43 -07:00
Linux Build Service Account
26b0bbdf66 Merge 99e01152fa on remote branch
Change-Id: I25136915f3744c208b38dddaf505112e997ca2c7
2022-10-16 22:57:35 -07:00
Sandeep Gangadharaiah
89469d1de1 disp: msm: dp: enable aux switch from display HPD handler
Currently, aux switch is enabled by usbpd handler before
handing over the control to dispaly HPD handler. However,
in some scenarios there is a chance that altmode would
directly call into display HPD handler bypassing the usbpd
handler. This would lead to aux errors since aux switch
is not enabled. This change will enable aux switch in
display HPD handler which would avoid the resulting aux
errors. This issue is a regression caused by this change
b6466ca7f5.

Change-Id: I425991ba95b22411740f88cba5ca2083d13969e1
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-10-14 17:52:03 -07:00
Narendra Muppalla
7802222177 disp: msm: sde: fix typo in trace message
This change fix trace message in sde trace.

Change-Id: I73a873984564f995f84e0c08f9e49164cb67063a
Signed-off-by: Narendra Muppalla <quic_nmuppall@quicinc.com>
2022-10-14 13:11:39 -07:00
qctecmdr
8fbfedfc80 Merge "disp: msm: fix register offset logging with debugfs register access" 2022-10-13 20:28:13 -07:00