Commit Graph

3268 Commits

Author SHA1 Message Date
qctecmdr
431fcb2e4b Merge "disp: msm: sde: adds ipcc client dpu phys id for hwfence config" 2022-11-23 02:52:35 -08:00
Srihitha Tangudu
3a448c4f47 disp: msm: dsi: Correct minimum bit clk calculation for cphy cmd mode
For calculating bit rate in cphy, we multiply bit rate by a factor of
7/16 where 7 is the number of symbols and 16 is the bits per symbol.
But we are currently not considering the 7/16 factor while calculating
minimum bit clk value for command mode which is resulting in a smaller
bit rate value than the minimum bit clk.

Bit rate should always be greater than the minimum bit clk which otherwise
can lead to discrepancies. Correct minimum bit clk calculation for command
mode, by multiplying a factor of 7/16 if cphy.

Change-Id: I39b202dcafe60e2047549f84ff9388b46ae490a5
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
2022-11-20 21:12:24 -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
Grace An
bce890bc38 disp: msm: sde: adds ipcc client dpu phys id for hwfence config
This change adds a device-tree configurable property to define
the ipcc client id of the dpu used for registers access and
configuration. Starting pineapple, this is the ipcc client physical
id, distinct from the ipcc client virtual id.

Change-Id: Icb59111c85c7132c0efd7b207eaa5417cca013eb
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2022-11-14 18:27:58 -08:00
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
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
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
Veera Sundaram Sankaran
6f3f3e7839 disp: msm: sde: avoid setting plane qos_dirty during cwb modeset
The encoder modeset updates all the plane's qos_dirty flag attached
to the crtc to make sure the qos params are updated during seamless
mode-switch cases like fps or resolution switch. But this is not
required for cwb encoder modeset as it does not have any effect on
the planes attached to the main display. Add check to avoid this
reprogramming.

Change-Id: I1ab7a71971b7200a50e6643407327734b1c9cbc5
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-10-13 14:47:26 -07:00
Veera Sundaram Sankaran
1055b42576 disp: msm: sde: cache cwb enc mask to use during seamless transitions
The cwb_enc_mask is set by the wb phys encoder during the validate
phase and this is in-turn used during the commit phase. During
seamless transition cases like poms with cwb, the encoders are
disabled and then enabled back after the validate phase. The cwb
flags are reset during this time leading to issues. Cache the flag
and reapply it during the modeset to avoid this case.

Change-Id: I5df1be18a5e30bb1107dc0f2e87d771a735f1ab6
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-10-11 14:55:29 -07:00
Christina Oliveira
ea0ad0a45e disp: msm: sde: add support for wait on multiple hw fences
This change adds support to wait on multiple hardware fences by
creating a fence array so each dpu-client only gets signaled until all
the hw fences going to the same ctl-path are signaled. It also
accounts for if a fence is a fence array.

Change-Id: Iba4b1d2b7322aea64dc197ca7655920b79dbb919
Signed-off-by: Christina Oliveira <quic_coliveir@quicinc.com>
2022-10-10 12:25:07 -07:00
Srihitha Tangudu
9688168454 disp: msm: dsi: clear the panel esd_recovery_pending in power on commit
Currently the panel esd_recovery_pending flag is cleared for every mode
set. The ESD recovery completes only after the suspend and resume. Clear
the flag only during power on commit.

Change-Id: I97e370feba0aad34558e4675168b4bcb7f5901ca
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
2022-10-05 23:12:54 -07:00
Amine Najahi
40ac02b833 disp: msm: sde: add line counter logging
Add logs to track the read/write line counters
and tear check configuration during key events.

Change-Id: Ife8afecc63a9008a8d9fc746d0ec8579a311b335
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
2022-10-05 23:42:23 -04:00
Narendra Muppalla
99e01152fa 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>
2022-10-04 09:41:53 -07:00