Граф коммитов

3557 Коммитов

Автор SHA1 Сообщение Дата
GG Hou
ee2ee3b129 disp: msm: sde: update flush mask in fence error case
Add a new clear_flush_mask ops in sde_hw_ctl_ops.
Flush mask update to cancel the fence error frame with
the new ops.

Change-Id: I8d03d8e83a05a652789fb38e885a3c8497e4d262
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
2023-05-14 23:58:37 -07:00
GG Hou
5f4735e2ce disp: msm: sde: fence error handling for wb and cwb retire fence
Fence error handling for wb and cwb retire fence.
Signal the retire fence for the fence error frame.

Change-Id: I0f73195c50edab4b8aefb58cea342214be87584c
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
2023-05-14 23:57:59 -07:00
GG Hou
85015a84cb disp: msm: sde: reset lutdma when fence error occurs
Reset lut dma when fence error is seen to reset the already
submitted queue.

Change-Id: Iba9ab33a2e80bdaba6b1d4ccff086e3a46f8374d
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
2023-05-14 23:57:22 -07:00
GG Hou
d2812ee4e7 disp: msm: add support for display clients to register for fence error
Add framework for display submodules like PP, DSI, DP to register
for fence error and call the client callback funtion when fence
error occurs.

Change-Id: I70cc6b01907177e6c4238c4398fe2c085a000322
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
2023-05-14 23:55:51 -07:00
GG Hou
54209fb4d0 disp: msm: sde: sw fence error handling
Sw fence error handling addresses following:
a. out of order handling
  - For cmd panel, signal the release fence and retire fence once
    sw fence error detected.
  - For vid panel, signal the fence error frame release fence and
    retire fence once sw fence error detected, hold the release
    fence of last good frame till next good frame.
b. avoid BW decrease vote
c. lut dma reset
d. cancel kickoff

Change-Id: Ic496c532a26d80e0ef0074624ef6ace01c4ab2f0
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
2023-05-15 14:54:03 +08:00
GG Hou
a658fb17b7 disp: msm: sde: dma fence out of order handling in fence error case
Handle out of order dma fence signalling and propagation of fence
error. Out of order fence signaling is required only in Video mode.
For example, in case of N, N+1, N+2 frames where N, N+2 are good
frames and N+1 is frame with fence error. The release fence signal
sequence in video mode would be N+1, N, N+2.

Change-Id: I8b6f88cfeee945e28571b765f24ffea22fad23b8
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
2023-05-14 20:15:49 -07:00
GG Hou
725c7a0f3d disp: msm: sde: add support for hw fence error handling
Register callback function to hw fence driver and implement the
callback funtion.

As part of fence error handling, address out of ordering of HW
fences, SW override for release fence signal and handle BW voting
in both cmd and video mode.

Change-Id: I22902762b4cc09a5f5a20cf0dd01fc336a0f0cb4
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
2023-05-14 20:13:58 -07:00
GG Hou
97b1afdda8 disp: msm: add property to handle fence error in driver
Add a new property CRTC_PROP_HANDLE_FENCE_ERROR for userspace
to enable or disable fence error handling.

Change-Id: I72370f405c5299c603b0d673720c28a68c00807a
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
2023-05-14 20:12:02 -07:00
qctecmdr
26ef97e2a5 Merge "disp: msm: dp: update main link training params" 2023-05-12 16:46:38 -07:00
qctecmdr
ed49f6e356 Merge "disp: msm: sde: fix update of current perf bandwidth values" 2023-05-11 03:45:46 -07:00
qctecmdr
0ba41c9277 Merge "disp: msm: sde: avoid incorrect register writes in blend stage clear" 2023-05-11 03:45:46 -07:00
qctecmdr
0b4314dad4 Merge "disp: msm: dp: fix race condition during mst sim hpd" 2023-05-10 20:18:58 -07:00
qctecmdr
5da4bfb834 Merge "disp: msm: dp: configure aux switch only on state change" 2023-05-10 20:18:58 -07:00
qctecmdr
1addbbdc2c Merge "disp: msm: dp: null check before accessing mst panel" 2023-05-10 20:18:57 -07:00
Rajkumar Subbiah
fb4c097428 disp: msm: dp: fix race condition during mst sim hpd
When IRQ HPD is simulated for DP MST, the driver updates the EDID in port context
for all the ports in an effort to refresh the context with the new port count.
But currently this operation is not synchronized with other debugfs operations
and also the edid read operations on the existing port. This can cause the
sim driver to update or delete the edid data while the edid data is being
read on an existing port, which would result in an edid read failure on the
DRM driver.

This change synchronizes these operations to avoid these race conditions.

Change-Id: I692af092583ed12b3da8c6587a74ec97d98fdfec
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-05-10 16:18:05 -04:00
Prabhanjan Kandula
200f6c09dd disp: msm: sde: avoid incorrect register writes in blend stage clear
While clearing all blend stages, avoid writing blend config
registers for invalid dummy layer mixers introduced for dcwb.
These dummy mixers are SW only representation, these mixers
do not have respective blend config register space defined in HW.
Currently blend stage clear logic clears other undefined and
some valid registers like CTL_x_SW_RESET_OVERRIDE which is not
intended. This change limits accessing blend config registers
based on actual HW layer mixer count by ignoring dummy mixers.

Change-Id: I3a61fb6d5522b041fd6f10305b84dae449b4f2c7
Signed-off-by: Prabhanjan Kandula <quic_pkandula@quicinc.com>
2023-05-10 12:56:35 -07:00
Prabhanjan Kandula
d994b9e580 disp: msm: sde: fix update of current perf bandwidth values
In Current SDE driver, perf update check avoids bw update
in RSC state transitioning from CLOCK to SOLVER and updating
cached cur_perf bw values with out actual update to bus causes
bw update miss until usecase change trigger a new bw values
from client.

Below is the sequence of events in issue scenario.
-> wakeup frame from suspend, start with max bw voting and
	framedone successful
-> RSC state updates to CLOCK state because of delay in next
	incoming frame
-> Next frame perf update with paramschange, bw update is
	skipped as new bw  < cur bw and RSC is in CLOCK state
-> RSC updates SOLVER state after above step and commit is flushed
-> Bw update after frame is also avoided because RSC is in SOLVER
	but cur_perf is updated with new bw value.
-> from next frame if bw is same as perevious frame, voting is skipped.
	until change in bw values, vote of max bw in first frame is left.

This change fixes updating cur_perf values only when actual
bus update is intended.

Change-Id: If3ea4f178b94e9e59cd8ca563fa3510dffcc15a5
Signed-off-by: Prabhanjan Kandula <quic_pkandula@quicinc.com>
2023-05-10 12:56:25 -07:00
Shamika Joshi
42d9137a04 disp: msm: sde: fix min fps in EPT calculations
In non-qsync panels when min FPS is not published in DT,
the default min fps is set to 10 FPS. This change handles mode
switch cases, when panel FPS drops below 10 FPS by updating
min FPS to panel FPS for Expected Present Time calculations.
As part of the change, reduce 2ms from EPT to account for
scheduling delays after schedule_timeout.

Change-Id: Idc206f39adfb3517b4ea2cfa303fe53182a8e63e
Signed-off-by: Shamika Joshi <quic_shamjosh@quicinc.com>
2023-05-09 10:27:03 -07:00
qctecmdr
b02c68b75c Merge "disp: msm: sde: avoid concurrency while calculating max mode width" 2023-05-08 15:24:22 -07:00
qctecmdr
ea39f24f67 Merge "disp: msm: sde: fix out of bounds memory access" 2023-05-08 15:24:22 -07:00
qctecmdr
6ce26bb091 Merge "disp: msm: dsi: add new function to cleanup post command transfer" 2023-05-08 11:44:03 -07:00
qctecmdr
190dc72bf9 Merge "disp: msm: dsi: handle case where panel sends more bytes than requested" 2023-05-08 11:44:03 -07:00
qctecmdr
2368cac3d8 Merge "disp: msm: dsi: Send Qsync commands asynchronously to avoid frame drops" 2023-05-08 11:44:03 -07:00
qctecmdr
a0eb3b7090 Merge "disp: msm: sde: propagate the error code in dual display TUI cases" 2023-05-07 22:46:00 -07:00
Saurabh Yadav
8f73dc7e9d disp: msm: sde: fix out of bounds memory access
Change-Id: I74324fc1032086ac4362a059a9f76a6dcdc19193
Signed-off-by: Saurabh Yadav <quic_sauyad@quicinc.com>
2023-05-05 00:09:17 -07:00
Rajkumar Subbiah
5fb27733a7 disp: msm: dp: configure aux switch only on state change
The driver currently does not cache the current status of the aux switch
and calls the switch configure on any hpd event. So when there are
back to back disconnect notifications, it ends up calling switch
disconnect multiple times. But this is disrupting other operations
since the switch driver restores default settings on any call to
update settings.

This change caches the switch state and reconfigures it only on a
configuration change.

Change-Id: Ieeeaf5ac3bf8a7771b3118735422365cf2ee1f7b
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-05-04 17:48:06 -04:00
Srihitha Tangudu
ddb854d52d disp: msm: dsi: add new function to cleanup post command transfer
Currently we are always doing command transfer cleanup which includes
disabling command engine, clocks, gdsc and unmasking overflow interrupt
as part of post command transfer function only after CMD DMA wait is
done. Cleanup should also be done if an ESD failure happens before
kickoff of a batch command. Organize code so that command transfer
cleanup can be done irrespective of whether command kickoff is done
or not.

Change-Id: Ieb92daa7f5da62c16c71f1b23ceff20adfbf3621
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
2023-05-04 10:36:44 -07:00
Srihitha Tangudu
47eb93ed08 disp: msm: dsi: handle case where panel sends more bytes than requested
Reset number of bytes read from panel to the expected value when panel
sends more bytes than requested during DSI read. This can otherwise lead
to negative value of repeated bytes and array out of bounds access.

Change-Id: I9310c521a862108940142ba7c1a8c39838be0f79
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
2023-05-04 10:33:45 -07:00
Rajkumar Subbiah
dea1de3600 disp: msm: dp: null check before accessing mst panel
This change checks if the mst panel is still valid before
accessing them when MST specific debugfs nodes are used.

Change-Id: I45f63009c1bff6a83e7af60a85f953674fef6797
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-05-04 10:54:47 -04:00
Ayushi Makhija
5ba1ca1738 disp: msm: dsi: Send Qsync commands asynchronously to avoid frame drops
Qsync ON/OFF commands have to be sent to the panel before connector
kickoff and sending them in the commit thread blocks it for few
millliseconds, and can lead to frame drops. Avoid this by sending
them asyncronously.

Change-Id: Ia7bc694871faf02b7c1a068b3d0ee7056c272506
Signed-off-by: Ayushi Makhija <quic_amakhija@quicinc.com>
2023-05-02 23:12:40 -07:00
Nisarg Bhavsar
2c11ea7025 disp: msm: dp: update main link training params
Update DP PHY tx drive level and pre-emphasis information
for mainlink training.

Move parameters from code to dtsi and add parameter parsing.

Change-Id: I7527327e39952d76184ea22adade7949c64d3734
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2023-05-01 13:08:43 -07:00
qctecmdr
8ef80f7cf4 Merge "disp: msm: dsi: Fix DSI lane swapping" 2023-04-29 23:02:10 -07:00
qctecmdr
f993f4d8e0 Merge "disp: msm: sde: program INTF VSYNC src_en bits for vsync TS" 2023-04-28 00:59:51 -07:00
Raviteja Tamatam
26c011089e disp: msm: sde: propagate the error code in dual display TUI cases
Propagate error in case the number of active displays is greater
than 1, in dual display scenario to fail the validate.

Change-Id: I04250af8d7a6b0c290132abbaed2ed8e5e311a4f
Signed-off-by: Raviteja Tamatam <quic_travitej@quicinc.com>
2023-04-26 12:01:53 -07:00
Veera Sundaram Sankaran
a599814880 disp: msm: sde: program INTF VSYNC src_en bits for vsync TS
From MSSS 10.x, the src_en bits needs to be set appropriately for
vid/cmd mode for getting the vsync timestamp. Program it based
on the new feature flag SDE_INTF_VSYNC_TS_SRC_EN.

Change-Id: Ia9c59d66afb436f082c7ebe6bf28e3953fde27a5
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2023-04-25 11:51:02 -07:00
Rohith Iyer
f59a9af17c disp: msm: dsi: Fix DSI lane swapping
Replaced lane swap register for lane swap in DSI controller.
Added check for where to perform lane swap based on DSI controller
version. Replaced function to parse device tree data for lane swap,
as previous function did not work.

Change-Id: I5e50a761b6ac0d2658ba73a5648e2f80f3470b96
Signed-off-by: Rohith Iyer <quic_rohiiyer@quicinc.com>
2023-04-25 10:36:23 -07:00
Nilaan Gunabalachandran
c6bdb5db3a disp: msm: sde: avoid concurrency while calculating max mode width
With DP plug-ins, it is possible for the connector fill modes API
to be called to update available modes on the connector and at the
same time have the commit thread calculate the max mode width
on the available modes. As a result, it is possible to access
pruned modes from the modelist.

This change moves the calculation into the fill modes call-flow,
so that the max mode width is determined once, and stored to be
used during virt enable.

Change-Id: I6c332c57e6e98ed98444a303add97d163a2031bf
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2023-04-25 12:39:05 -04:00
Grace An
612cf09d0f disp: msm: sde: add hw-fence QOS priority config
This change updates the hw-fence QOS priority level.

Change-Id: I61e832f15d060cd563986dbd7135c00fce9dd5c9
Signed-off-by: Christina Oliveira <quic_coliveir@quicinc.com>
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-04-25 09:18:22 -07:00
Nilaan Gunabalachandran
825dd16313 disp: msm: sde: correct llcc_slice_getd/putd usage
The llcc_slice_getd/putd APIs were previously used to get/put the
slice descriptor reference, for every time the driver needed the
descriptor. However, the APIs should be used to get the reference
once, and only put after completing usage of the slice
(ie. if the slice is still active, the descriptor cannot be putd).

This change corrects the usage of the llcc_slice_getd/putd APIs by
storing the descriptor after initialization.

Change-Id: I33e6448290ff7a4d8bfa72e1e6bc8ca133283e12
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2023-04-24 16:46:38 -04:00
Rajkumar Subbiah
8722b154e7 disp: msm: dp: fix unused label for kalama compilation
This change fixes the unused label warning, when compiling
this driver for kalama, introduced by change
I383680c54feb826676965282e76bb3e5c3e17c4c.

Change-Id: Ia7c51fd1956b847220ebeae29a51edcc9f4dbf7e
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-04-20 18:18:22 -07:00
Veera Sundaram Sankaran
336212e10a Revert "disp: msm: sde: enable EPT_FPS feature for cmd mode in pineapple target"
This reverts commit ae24e846e1.
Enable the feature only when user-mode support is added. With this
feature enabled in driver, it expects EPT_FPS to be set for qsync
enabled cmd-mode panels and will not honor EPT(expected present time).
With the EPT_FPS feature disabled, all panels cmd/video with/without
qsync can use EPT.

Change-Id: Ib8b1625bb1927ece3ec435e4b9a724da0555e518
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2023-04-19 22:08:50 -07:00
qctecmdr
8dcfe0cb6b Merge "disp: msm: dp: catch and propagate slot allocation failures" 2023-04-19 14:34:14 -07:00
qctecmdr
a6e0f3a73d Merge "disp: msm: dp: log an error when connector has no modes" 2023-04-19 14:34:14 -07:00
qctecmdr
337c29b341 Merge "disp: msm: dp: fix messaging on dp mode validation failure" 2023-04-19 14:34:14 -07:00
qctecmdr
a5b7dc6eb9 Merge "disp: msm: sde: reset dsc 4hs merge enable" 2023-04-19 14:34:14 -07:00
qctecmdr
92bc0435a0 Merge "disp: msm: dp: fix aux error handling" 2023-04-19 14:34:14 -07:00
qctecmdr
c8692b921b Merge "disp: msm: dp: Update vcpi start slot for MST single port plug/unplug" 2023-04-19 14:34:14 -07:00
qctecmdr
a5dd993196 Merge "disp: msm: sde: remove EPT & QSYNC dependency" 2023-04-17 17:42:31 -07:00
Nisarg Bhavsar
902ac9549a disp: msm: dp: Update vcpi start slot for MST single port plug/unplug
Update vcpi start slot for other connectors when an individual connector is unplugged.
Currently the driver is caching the previous start slot and doing the adjustment
in a single pass. When the connectors are removed and added in a specific order,
it is possible that the list of payloads are not sorted by start_slot and the
removed payload is not the first payload in the list.
The current logic does not support this case and will leave the start_slot of
the first payload unadjusted thereby resulting in an invalid slot allocation.

This change does the caching and adjustment in two separate passes to make sure
the start slot adjustment happens irrespective of the order of the payloads.

Change-Id: I5ca7ded263740590b0fe3cc31c8d67441a42c92f
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2023-04-17 14:00:19 -07:00
qctecmdr
2e5aa28b7a Merge "disp: msm: dsi: add support for dual display with shared dsi" 2023-04-15 20:49:21 -07:00