Commit Graph

3254 Commits

Author SHA1 Message Date
Renchao Liu
b2f3452dbe disp: msm: sde: fix null pointer dereference issue
This changes fixes null pointer dereference issue.

Change-Id: I9a9628f1fb274aea86a15792ac85b8505f25d28f
Signed-off-by: Renchao Liu <quic_rencliu@quicinc.com>
Signed-off-by: Bruce Levy <quic_blevy@quicinc.com>
2022-09-09 23:50:25 -07:00
Linux Build Service Account
bebdadd24d Merge df56ac358f on remote branch
Change-Id: Ibf686b254e185d1bc7c6bc6e9e9cced18198a707
2022-09-07 09:19:42 -07:00
Bruce Levy
7da7af851d Revert "disp: msm: sde: update hw configs on dnsc_blur disable"
This reverts commit 7b4ea8c54c.

Change-Id: I8d9143086c38f49a819db9c365e3ad9060f8ed68
Signed-off-by: Bruce Levy <quic_blevy@quicinc.com>
2022-09-06 19:00:00 -07:00
Bruce Levy
0426d1258e Revert "disp: msm: dp: remove disconnect call for downstream port status change"
This reverts commit 10ac060759.

Change-Id: I8cd416df1f27c97fc7ecbfbf41cdd669069289e5
Signed-off-by: Bruce Levy <quic_blevy@quicinc.com>
2022-09-06 18:59:52 -07:00
Bruce Levy
a1f10f798b Revert "disp: msm: sde: bound event log traversal to allocated memory in coredump"
This reverts commit 174c107f6a.

Change-Id: I4ef0d4364623389159bc2c3ca950add4d500fa93
Signed-off-by: Bruce Levy <quic_blevy@quicinc.com>
2022-09-06 18:59:34 -07:00
Bruce Levy
dbeaf04922 Revert "disp: msm: sde: add crtc width restriction when 3d-merge is enabled"
This reverts commit d66b542c43.

Change-Id: I8ce020b7a305ce345f9b716d2f8c8d34ac5ef35f
Signed-off-by: Bruce Levy <quic_blevy@quicinc.com>
2022-09-06 18:59:25 -07:00
Bruce Levy
7b02c6d146 Revert "disp: msm: sde: add check to avoid NULL WB output fb"
This reverts commit e46400196a.

Change-Id: Iee38893a5a36cf1439b97aa494b069d1f525a55e
Signed-off-by: Bruce Levy <quic_blevy@quicinc.com>
2022-09-06 18:59:13 -07:00
Bruce Levy
e8dfa47d10 Revert "disp: msm: dsi: reorder various resets of DSI PHY"
This reverts commit a26fe8667d.

Change-Id: I2c50354521bb0a6ec4490b3a390841c1239d05a4
Signed-off-by: Bruce Levy <quic_blevy@quicinc.com>
2022-09-06 18:59:03 -07:00
Bruce Levy
b89826f14f Revert "disp: msm: dsi: avoid DSI PHY shutdown during idle"
This reverts commit c4a9630939.

Change-Id: I440c3aa45e5a75f9ba6bf33f7fd9379eb6ead895
Signed-off-by: Bruce Levy <quic_blevy@quicinc.com>
2022-09-06 18:58:53 -07:00
Bruce Levy
51410a8413 Revert "disp: msm: sde: use new connector state for topology checks"
This reverts commit 762d8a8f1b.

Change-Id: Ibb5c0e248f79659aa1cae7878c40d3e6c3de9bac
Signed-off-by: Bruce Levy <quic_blevy@quicinc.com>
2022-09-06 18:58:41 -07:00
qctecmdr
df56ac358f Merge "disp: msm: dp: resend hpd notification to usermode" 2022-08-31 07:46:50 -07:00
Rajkumar Subbiah
ecaabfefc9 disp: msm: dp: resend hpd notification to usermode
This change adds robustness to hpd notification by resending
it if there was no action in 2 seconds, just in case, the
first notification didn't make it to the usermode.

Change-Id: Iaf00669ec77e8c50618ee5618735a98518ad7f1a
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2022-08-30 13:45:59 -07:00
Rajkumar Subbiah
5043291e1a disp: msm: dp: skip waits when processing usb disconnect in sim mode
With real DP over Type-C sinks, DP driver requests access to USB
combo PHY from USB driver. But in DP SIM mode, there is no real
sink and PD management, so the combo PHY is managed by USB driver
and DP driver uses it without actually claiming it. If the USB
cable is unplugged in this scenario, USB driver notifies the
disconnection through an atomic notifier call. It does not expect
the handler to go into sleep, but the disconnect handler inside
DP driver has multiple wait for events and also sleeps to wait for
HW state updates.

This change passes a skip_wait flag to all the disable functions
to complete disconnect processing by skipping all processor sleeps
and event waits.

Change-Id: Ia98de0e7fa6b0573e644615ee59015914a93f4cf
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2022-08-30 13:43:49 -07:00
Sandeep Gangadharaiah
2e9d68e174 disp: msm: dp: free DP sim ports during DP sim disable
DP sim ports created during DP sim enable aren't cleared
during disable path. This would retain the last status of
the DP sim port or the connector. This would impact the
next iteration of DP sim test, if done without device
reset. This change will set the port number to 0 during
DP sim disable and clear the memory allocated for these
ports.

Change-Id: I386a62e87fcaf006db8dd18e5751b33bbe70fc9b
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-08-30 10:27:45 -07:00
Linux Build Service Account
1554d485ed Merge "disp: msm: sde: use new connector state for topology checks" into display-kernel.lnx.5.15.r1-rel 2022-08-27 16:45:01 -07:00
Linux Build Service Account
ab47310f7b Merge "disp: msm: dsi: avoid DSI PHY shutdown during idle" into display-kernel.lnx.5.15.r1-rel 2022-08-27 16:45:00 -07:00
Linux Build Service Account
055324bcf8 Merge "disp: msm: dsi: reorder various resets of DSI PHY" into display-kernel.lnx.5.15.r1-rel 2022-08-27 16:45:00 -07:00
Veera Sundaram Sankaran
762d8a8f1b disp: msm: sde: use new connector state for topology checks
Use with the new connector state during validation phase for
checking the 3d-merge topology, since this is the state that
needs to be validated.

Change-Id: Ie212f948affa4dc439ef508363bac6713e560006
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-08-27 14:34:51 -07:00
Shashank Babu Chinta Venkata
c4a9630939 disp: msm: dsi: avoid DSI PHY shutdown during idle
Avoid shutting down DSI PHY and lanes before entering into
idle collapse.

Change-Id: I62fb40c2398e544b08b8cb8788ac2dc1143a82ce
Signed-off-by: Shashank Babu Chinta Venkata <quic_schintav@quicinc.com>
2022-08-27 14:12:07 -07:00
Shashank Babu Chinta Venkata
a26fe8667d disp: msm: dsi: reorder various resets of DSI PHY
DSI PHY has various resets defined to reset analog, PLL and digital
portions. In current sequence, these resets happen after PLL is locked
which can result in introduction of jitter on PHY lanes.Reordering these
resets to happen before PLL is programmed to have intended clean start
of DSI PHY.

Change-Id: I4eb5c05ea0e6015a5447728b2845b49817411c50
Signed-off-by: Shashank Babu Chinta Venkata <quic_schintav@quicinc.com>
2022-08-27 14:11:17 -07:00
Veera Sundaram Sankaran
e46400196a disp: msm: sde: add check to avoid NULL WB output fb
Change the debug message to error during the writeback
encoder validate for wb output buffer. The output buffer
can be NULL only during disable frame and all other frames
need to have a valid output buffer.

Change-Id: I4d6fecfeaf863e56fe25e17ab1200849003b3309
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-08-27 14:03:20 -07:00
Vara Reddy
001fa8da90 Revert "disp: msm: dsi: increase cmd dma timeout to 1200 milliseconds"
This reverts commit 14e7e9b409346aa77fd08cca6eab85252d9ccabe.
Reverting this for now until we properly understand the reason
for command transfer timeouts that we are hitting for 5k panel.

Change-Id: I0390af66f9ca06abc1ebb81996bb683dea35beac
Signed-off-by: Vara Reddy <quic_varar@quicinc.com>
2022-08-26 19:06:16 -07:00
qctecmdr
5ef4dc0b4d Merge "disp: msm: dp: add debug node to capture source and sink crc" 2022-08-24 21:15:52 -07:00
Rajkumar Subbiah
7eef92843d disp: msm: dp: add debug node to capture source and sink crc
This change adds a debug node named 'crc' to drm_dp to read
the frame CRC values for DP controller and DP Sink. In order
to facilitate the immediate read of the CRC values when
accessed, it enables the CRC calculation on the controller
and sink automatically when the stream is enabled. In addition
to the frame CRC values it also reads the MISR values from
controller and PHY to validate the data flow from controller
to PHY.

Change-Id: I1acee2dba931e4635caf4a400e336a72c86e88bf
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2022-08-24 13:47:27 -07:00
Linux Build Service Account
ea7e73f13b Merge "disp: msm: sde: add crtc width restriction when 3d-merge is enabled" into display-kernel.lnx.5.15.r1-rel 2022-08-24 10:42:26 -07:00
Linux Build Service Account
cb83e5d8b4 Merge "disp: msm: sde: bound event log traversal to allocated memory in coredump" into display-kernel.lnx.5.15.r1-rel 2022-08-24 10:42:25 -07:00
Linux Build Service Account
c0cb8e74ef Merge "disp: msm: dp: remove disconnect call for downstream port status change" into display-kernel.lnx.5.15.r1-rel 2022-08-24 10:42:18 -07:00
Veera Sundaram Sankaran
d66b542c43 disp: msm: sde: add crtc width restriction when 3d-merge is enabled
Add validation during crtc_atomic_check to have crtc width as
multiple of 4 when dualpipe 3d-mux is enabled and multiple of 8
when quadpipe 3d-mux is enabled. This ensures each layer mixer
is having an even width.

Change-Id: I5dc173c1b0349430a8e12a7b1c9440c7854e7ecd
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-08-24 00:26:14 -07:00
Amine Najahi
174c107f6a disp: msm: sde: bound event log traversal to allocated memory in coredump
Currently, driver is determining the amount of memory to allocate
based on the event log object indexes (first, last). The last index
can change if there is additional logging done during the coredump
phase and potentially cause an out-of-bound memory access during
buffer traversal.

This change restrict the event log object traversal to a maximum
of the output buffer size.

Change-Id: I91e5734362d2d7a796129fce85e27611bab2245f
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
2022-08-24 00:25:27 -07:00
Sandeep Gangadharaiah
10ac060759 disp: msm: dp: remove disconnect call for downstream port status change
During MST scenario, plugging out all the downstream monitors connected
to the MST hub would trigger a disconnect handler which would cleanup
display structure. This isn't required since MST hub is still connected
and the display cleanup would be taken care during the actual MST hub
disconnect. Also, handling the disconnect immediately on port status
notification leaves the usermode in an invalid state where it assumes
the display is still enabled and results in commit errors.

Change-Id: Ia9a58fadd89bd05746da25f142b54b31e8567258
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-08-24 00:00:01 -07:00
Veera Sundaram Sankaran
7b4ea8c54c disp: msm: sde: update hw configs on dnsc_blur disable
Currently, dnsc_blur hardware block is not updated when the connector
dnsc_blur property is set to NULL or when dnsc_blur_count is 0. Update
the dnsc_blur hw block configs to avoid stale configs affecting the
current frame.

Change-Id: I39934a8b9490a13a0f77f3b5dbc5053b76a9370b
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-08-23 23:56:49 -07:00
Veera Sundaram Sankaran
d44f0ff715 disp: msm: sde: use new connector state for topology checks
Use with the new connector state during validation phase for
checking the 3d-merge topology, since this is the state that
needs to be validated.

Change-Id: Ie212f948affa4dc439ef508363bac6713e560006
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-08-22 14:29:16 -07:00
Linux Build Service Account
f47a4bd39b Merge 5a5adbba9f on remote branch
Change-Id: I82779224a7c3752c42974842515efd6e06acdfd7
2022-08-19 15:24:37 -07:00
Veera Sundaram Sankaran
51775dd093 disp: msm: uapi: increase SDE_FRAME_DATA_MAX_PLANES size
MDSS 9.0.0 supports 10 pipes, so modify the max_planes
accordingly. This is used for the frame_data transfer
between user/kernel and since its a new feature added
there is no backward compatibility that needs to be handled
for this uapi change. Add corresponding bound check during
the usage.

Change-Id: I0853fcc55395855d798f2c1b03cf9bf7b4bd3c96
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-08-19 13:10:39 -07:00
Arya Anand
16512fbd66 Revert "disp: msm: sde: reduce stack size in _sde_crtc_check_rois"
This reverts commit 9e8739b820.

Change-Id: I27fa7eae4c6f243779534c9d6561ce27bdac437e
Signed-off-by: Arya Anand <quic_aryaanan@quicinc.com>
2022-08-18 16:33:35 -07:00
Arya Anand
e097620d90 Revert "disp: msm: dp: address race condition in LM allocation"
This reverts commit ad1b9376ab.

Change-Id: Ib5eae02546b3a31c3609b5a6af32910b4193ca38
Signed-off-by: Arya Anand <quic_aryaanan@quicinc.com>
2022-08-18 16:33:22 -07:00
Arya Anand
a315c77ed7 Revert "disp: msm: sde: update hw configs on dnsc_blur disable"
This reverts commit 728f9d65ca.

Change-Id: I664a71adfece87f0c570a273b929a8e9e9691108
Signed-off-by: Arya Anand <quic_aryaanan@quicinc.com>
2022-08-18 16:33:10 -07:00
Arya Anand
77a8968663 Revert "disp: msm: sde: enable encoder resources before phys enc disable"
This reverts commit 8eef598b0b.

Change-Id: Ia219731034901fd6bbbd80a53e7865b2fcda4bc4
Signed-off-by: Arya Anand <quic_aryaanan@quicinc.com>
2022-08-18 16:32:59 -07:00
Arya Anand
2d176f445c Revert "disp: msm: sde: use mode from new state during CP check phase"
This reverts commit a9294b7329.

Change-Id: I1258955eebc11ae2694ea106e0a90e7221e4d82d
Signed-off-by: Arya Anand <quic_aryaanan@quicinc.com>
2022-08-18 16:32:47 -07:00
Arya Anand
9c68afbcb0 Revert "disp: msm: sde: reset wb output crop during cwb disable"
This reverts commit 600e4ef057.

Change-Id: Ida30631e3a7272ed8d72e711da1a33792d95ba19
Signed-off-by: Arya Anand <quic_aryaanan@quicinc.com>
2022-08-18 16:32:34 -07:00
qctecmdr
859b582d2f Merge "disp: msm: sde: skip msm_lastclose if display is stuck in splash" 2022-08-18 15:04:08 -07:00
qctecmdr
c1d1e0a6ff Merge "disp: msm: dsi: avoid DSI PHY shutdown during idle" 2022-08-18 15:04:08 -07:00
qctecmdr
4bb0038c6b Merge "disp: msm: sde: bound event log traversal to allocated memory in coredump" 2022-08-17 18:44:05 -07:00
qctecmdr
1c8167f09f Merge "disp: msm: sde: add crtc width restriction when 3d-merge is enabled" 2022-08-17 18:44:04 -07:00
qctecmdr
c037ed6b7c Merge "disp: msm: dp: remove register call for regdump framework for DP domains" 2022-08-17 18:44:04 -07:00
Jayaprakash Madisetty
f9578b89c9 disp: msm: sde: skip msm_lastclose if display is stuck in splash
This change skips msm_lastclose, when splash enabled builtin-displays
equals number of actual displays and are stuck in continuous splash.
It fixes the issue seen with change commit 548b17185e95
("disp: msm: send power_on event in dual display composer kill scenario").

Change-Id: I1f5417d8945db621dc20ab0a9cc0146eabae5e22
Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
2022-08-17 14:25:40 -07:00
Jayaprakash Madisetty
182aac6040 disp: msm: cancel all delayed_works before triggering msm_lastclose
This patch cancels all the delayed_off_works if scheduled and flushes
the display threads for completion during msm_lastclose. The commit
from msm_lastclose client modeset to disable any crtcs if enabled is
always scheduled on primary crtc_commit thread. In the current issue,
delayed_off_work is scheduled on secondary display crtc_commit thread
and primary crtc_commit thread is scheduled to turn off active crtcs
from msm_lastclose leading to null dereference access of sde_enc's
cur_master. This race is avoided by serializing the operations in
msm_lastclose.

Change-Id: I30cc95b925c8134f0064816ebe2cfdb86a49fb36
Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
2022-08-17 14:06:45 -07:00
Amine Najahi
8a4d70c9ca disp: msm: sde: bound event log traversal to allocated memory in coredump
Currently, driver is determining the amount of memory to allocate
based on the event log object indexes (first, last). The last index
can change if there is additional logging done during the coredump
phase and potentially cause an out-of-bound memory access during
buffer traversal.

This change restrict the event log object traversal to a maximum
of the output buffer size.

Change-Id: I91e5734362d2d7a796129fce85e27611bab2245f
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
2022-08-17 15:29:20 -04:00
qctecmdr
d273ee1f5e Merge "disp: msm: sde: disable spr and demura for secondary panel in trusted vm" 2022-08-17 12:04:50 -07:00
Veera Sundaram Sankaran
3550ca8f9f disp: msm: sde: add crtc width restriction when 3d-merge is enabled
Add validation during crtc_atomic_check to have crtc width as
multiple of 4 when dualpipe 3d-mux is enabled and multiple of 8
when quadpipe 3d-mux is enabled. This ensures each layer mixer
is having an even width.

Change-Id: I5dc173c1b0349430a8e12a7b1c9440c7854e7ecd
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-08-16 18:44:17 -07:00