İşleme Grafiği

183 İşleme

Yazar SHA1 Mesaj Tarih
Yahui Wang
5b3c631e95 disp: msm: dp: move DP disconnect process to DP work queue
Move DP disconnect process to DP work queue to fix DP
notification issue when disconnecting USB cable.

Change-Id: Ib864563f35012ae4499ca5e3002eb52d1084ae58
Signed-off-by: Yahui Wang <quic_yahuiw@quicinc.com>
2024-05-24 01:37:03 -07:00
Sandeep Gangadharaiah
91ba799b32 disp: msm: dp: check for attn work and HPD status before connect notification
During Link CTS test, it is possible that the TE would trigger an HPD
IRQ right after LT. Currently we are waiting for a fixed delay before
sending connect notification to usermode, so that the driver can
process any attention work queue requests immediately. This change
checks for any pending attention work queue requests before waiting
for timeout. After the attention work is done with any test request,
TE can trigger an unplug before running the next test case. In the
current flow we send HPD notification at the end of the attention
work without checking the HPD status, leading to delay in processing
the test requests. Rectified here.

Change-Id: I600c69abfc31deee25e09756c73592854e3faa3b
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2024-05-22 10:30:02 +05:30
Soutrik Mukhopadhyay
d021bca90e disp: msm: dp: Handle aux switch node missing in device tree
Ensure to allocate switch type as bypass in case of dp aux switch
node missing in device tree entry and prevent any scope of null
pointer dereferencing.

Change-Id: I1d50d785e028f2e69a0effaedb2dbb6568a473dd
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2024-05-05 11:05:59 +05:30
qctecmdr
39d1a4857e Merge "disp: msm: dp: Update internal lm tracking" 2023-12-18 01:58:05 -08:00
Nisarg Bhavsar
56d1c40031 disp: msm: dp: Update internal lm tracking
Clear internally tracked total number of lm blocks in
use when there are zero active streams.

This is required to have an accurate count of lm blocks
in use in a mst scenario.

Change-Id: Ida5d509bab60b3b6a4c0ace07c7c68380d28a0dd
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2023-12-06 13:54:15 -08:00
Soutrik Mukhopadhyay
5073940a9a disp: msm: dp: Parse device tree for aux switch
Changes to select particular dp_aux_switch based on board
requirements. Currently provision to support both fsa4480
and wcd939x as aux switches are provided.

Change-Id: Iafbee4d91d14aafb1e7a37ddfa2b1ea0d0e5e784
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-12-01 11:28:44 +05:30
Nisarg Bhavsar
b97e86c661 disp: msm: dp:Add ready state check in deinit flow
Add check for READY state in dp_display_host_deinit.

Clear READY state in deinit flow to prevent state machine
errors with multiple concurrent plug/unplug events.

Change-Id: I0b17cffc7a3261ae4259225bb51452162763ae2a
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2023-09-26 15:44:13 -07:00
Rajkumar Subbiah
ff99320123 disp: msm: dp: ensure failsafe mode in connector mode list
The driver currently inserts a failsafe mode when EDID read fails
for SST. But for cases where the edid read succeeds but all the
modes are getting filtered out because of resource availability,
the driver does not add the failsafe mode. But the usermode
expects the failsafe mode to be always present in the mode list
as per DP specification. Also, the driver currently does not
add the failsafe mode, if the edid read fails on an MST monitor.

This change covers all these missing cases and makes sure the
failsafe mode is always in the connector's mode list if it is
in connected state.

Change-Id: I92eeaa00ad7b26a18b3689aa1c2ada4244aba3bc
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-06-07 10:58:08 -04:00
qctecmdr
2adf210808 Merge "disp: msm: dp: clear connected state if switch config fails" 2023-05-31 15:48:31 -07:00
Rajkumar Subbiah
2d4c6cf994 disp: msm: dp: clear connected state if switch config fails
During HPD High, the driver sets the CONNECTED state and then performs
a sequence of initialization operations. If any of them fails, it should
properly unwind the executed operations to restore the driver to its
initial state. This change adds error handling paths in the hpd high
handler to do just that.

Change-Id: I66a77ff73b7c11d0a59d80b8df3c4ea49a4ed3a6
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-05-29 14:41:06 -04:00
qctecmdr
fc7ef746c3 Merge "disp: msm: dp: fix pbn value for MST RG calculation" 2023-05-26 13:59:39 -07:00
Andrew Bartfeld
ed36c21587 disp: msm: dp: change to internal lm bookkeeping
Previously we were updating internal layer mixer allocation
bookkeeping during every mode validation regardless of whether
the mixers were already designated in use, resulting in double
counting of in-use layer mixers.

This change prevents modification of these values if the given
connector's mode has already been previously validated so valid
modes can be returned properly.

Change-Id: Iea5dccfbc4087cc76f186101d38b605792326b16
Signed-off-by: Andrew Bartfeld <quic_abartfel@quicinc.com>
2023-05-23 15:42:10 -07:00
Rajkumar Subbiah
4e82bfb0fa disp: msm: dp: fix pbn value for MST RG calculation
The DP MST driver calculates the PBN value for each mode during
mode enumeration. This PBN value is later used to calculate slot
count and also MST RG parameters. But if DSC and/or FEC is enabled,
then the slot calculation needs the PBN with overhead, but
RG calculator needs the one without. But currently, the driver is
using the PBN with overhead for both. This double counting of the
overhead for RG calculation causes MST FIFO overflow for certain
usecases.

This change fixes this by caching both PBN values during mode
enumeration and using the PBN value without overhead as input
to RG calculation.

Change-Id: Id58e91068c25202e6528a793ab736bc51732961f
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-05-11 22:48:10 -04:00
qctecmdr
337c29b341 Merge "disp: msm: dp: fix messaging on dp mode validation failure" 2023-04-19 14:34:14 -07:00
qctecmdr
d6553c5775 Merge "disp: msm: dp: turn off aux switch on dp cable disconnect" 2023-04-13 23:29:59 -07:00
Rajkumar Subbiah
6d55e0b68e disp: msm: dp: fix messaging on dp mode validation failure
Updated the log message on a LM check failure during mode validation
to print the correct available LM value that is being used in the
check.

Change-Id: Ie719dead04bacee70d44e30c0069ce9099a69570
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-04-12 14:40:31 -07:00
Nisarg Bhavsar
bd10effaeb disp: msm: dp: limit mode clock for MST
For a HBR2 dongle, limit mode clock to ensure only resolutions
under 4k@30fps are supported on each port for MST usecases.

This fixes functionality with dongles which only support HDMI 1.4,
but don't filter out higher unsupported resolutions.

Change-Id: I2f9e53e55a31ede7fa891f29b9e7d36e108d375c
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2023-04-10 09:24:32 -07:00
Soutrik Mukhopadhyay
7d74c23aa4 disp: msm: dp: turn off aux switch on dp cable disconnect
The dp_display_disconnect_sync is disabling the aux switch during
the attention hpd low processing. Ideally, the aux switch needs to
be turned off only when the dp cable is disconnected. With aux switch
getting turned off even while cable is connected is leading to HDCP
compliance test failure. This change will turn off aux switch only
when the cable is disconnected. It reverts the commit id
b6466ca7f597396cd2ecb3623d059435dfb0e4c6.

Change-Id: I90cc5f31b2be1afda61f74ea4e0a44332811ead3
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
Signed-off-by: Andrew Bartfeld <quic_abartfel@quicinc.com>
2023-04-03 14:31:04 -07:00
Sankeerth Billakanti
c3cd13a34a 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>
2023-03-23 14:35:17 -07:00
Rajkumar Subbiah
ae1ea3d993 disp: msm: dp: create dp aux log ipc context at probe time
Currently the ipc context for drm_dp_aux is being created
during dp_aux_init. This limits the IPC logs to be only
readable when the external display is in connected state
and it gets destroyed on unplug. This change moves the
context creation to probe time and the aux context will
be passed to the aux driver during initialization.

Change-Id: Id8d26c907c9cb2fd8c89b2842b98e7a908816abe
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-03-06 18:12:50 -08:00
Nisarg Bhavsar
548dc93b0e disp: msm: dp: update resource tracking for 8k@30
Update tracking of layer mixer resources to prevent valid modes
from being skipped during DP topology validation.

Change-Id: Id88337094c4113b721f307d24583a3ca30157216
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2023-02-21 08:15:50 -08:00
Sandeep Gangadharaiah
51ee816c56 disp: msm: dp: port API changes related to MST payload update
Latest LTS kernel has refactored the payload code for MST. This
change port the latest payload related API changes.

LINKED: https://patchwork.freedesktop.org/patch/498176/
Change-Id: I0f5bfe30824c5a9bbf4bc346a24f236a53bc0d70
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2023-01-26 12:57:47 -08:00
Nisarg Bhavsar
4a2e5b3fe1 disp: msm: dp: Add abstract and wcd939x aux switch support
Add functionality to change which aux switch is used
at compile time for different targets. Add wcd939x
switch support.

Change-Id: Iced3b11733009680063790dfa8f180b19002f963
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2022-11-01 19:15:01 -07:00
Sandeep Gangadharaiah
c76df5605c 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
b6466ca7f597396cd2ecb3623d059435dfb0e4c6.

Change-Id: I425991ba95b22411740f88cba5ca2083d13969e1
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-10-29 16:23:35 -07:00
Sandeep Gangadharaiah
cc997cd3d1 disp: msm: dp: disable aux switch at the start of the disconnect path
Currently the aux switch is disabled at the end of the disconnect
path which would include the wait time upto 5 secs becauase of usermode
cleanup. However, the PMIC module is expecting the aux switch to be
disabled within 400 msec after the disconnect is notified. If not, this
would trigger an LPD failure. This change moves aux switch disable
further up in the disconnect path, before waiting on completion of
usermode cleanup.

Change-Id: I42e0608f06127729a78de11631d16d0a3ca0d2b4
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-09-23 11:48:47 -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
qctecmdr
c037ed6b7c Merge "disp: msm: dp: remove register call for regdump framework for DP domains" 2022-08-17 18:44:04 -07:00
qctecmdr
8ac778f8e1 Merge "disp: msm: dp: remove disconnect call for downstream port status change" 2022-08-12 16:02:35 -07:00
Sandeep Gangadharaiah
e60e9026fc disp: msm: dp: remove register call for regdump framework for DP domains
Currently regdump framework for all the DP domains are registered during
init. But, unlike other modules in DP each SWI module is controlled by
its own clock and cannot be read without turning on the corresponding
clocks. Trying to do so might lead to unexpected behavior. This change
removes registering these nodes.

Change-Id: Ib20d7212bde24f3858558009e1679661731d16df
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-08-10 11:29:19 -07:00
qctecmdr
5a5adbba9f Merge "disp: msm: dp: address race condition in LM allocation" 2022-08-09 20:49:21 -07:00
Sandeep Gangadharaiah
f86e196de0 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-09 11:28:01 -07:00
Sandeep Gangadharaiah
0763e33723 disp: msm: dp: fix aux state during individual plug out/in
When a display is powered off, the DP driver currently clears the aux
state and forces it to OFF, expecting a subsequent hpd_low. But in MST
scenarios it is possible for individual displays to be unplugged and then
plugged back in without disconnecting the hub. In this use case, after
the unplug of last display, the aux state is in OFF, and on the
subsequent plug-in, the driver appends the ON flag, leaving both flags
to be set which is an incorrect state. This change removes this
assumption and properly sets the ON/OFF state on enable/disable
respectively.

Change-Id: I96355938a14c77fe958b86bd5f1dabad67584e4e
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-08-03 20:33:56 -07:00
Vara Reddy
df69a7d379 disp: msm: dp: destroy audio workqueue outside session_lock
Change moves destroying dp audio workqueue outside dp session_lock.
As part of disconnect, USB driver uses atomic notifier which holds
rcu_read_lock and calls into DP disconnect callback which needs
session_lock. If another DP threads holds DP session_lock then
we block RCU operations.

Change-Id: I5d565ca149a3a34ebd5ede4fb662982d87454f16
Signed-off-by: Vara Reddy <quic_varar@quicinc.com>
2022-07-29 16:19:42 -07:00
qctecmdr
66a9a093e7 Merge "disp: msm: dp: set DSC capabilities in mode only if panel supports DSC" 2022-07-28 21:43:58 -07:00
Sandeep Gangadharaiah
24d4662c83 disp: msm: dp: set DSC capabilities in mode only if panel supports DSC
During mode validation, DSC book-keeping logic is executed irrespective
of the panel DSC status. If the DSC blocks are available then the
corresponding mode is also set as DSC capable. This step is uncalled for
in a non-DSC panel scenario and might lead to unexpected behavior. This
change checks for panel DSC status before updating DSC book-keeping and
capability for the mode.

Change-Id: I30d6a4d7f3e772b7b13fcca6e318e96372a8becb
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-07-27 12:27:03 -07:00
Sandeep Gangadharaiah
603ae09669 disp: msm: dp: update DP aux state with correct status
End section of the display post enable which is supposed
to do the cleanup before exit is also setting DP aux state
as powered on and notifying the connect as successful.
If there is a race condition between connect and disconnect
paths then the code execution would skip to the end section
since display is already disabled. In this case, the DP aux
state would be misleading. This change will set the status
and notify complete only during success case.

Change-Id: I1eca511e042d2dea619bf85fcc28adf9e0cc9536
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-07-26 21:15:48 -07:00
Alex Danila
5ed42eb243 disp: msm: dp: address race condition in LM allocation
Addresses a race condition which could cause the RM to overcommiting LMs to
DP when multiple DP displays are used.

sde_rm_get_resource_info now uses the RM's mutex and assumes a null
encoder is not a built in display so that it can return an accurate
count of unreserved resources.

DP layer now maintains internal accounting of LMs in use to avoid
validating modes that have insufficient remaining resources.

Change-Id: I908c1597c1d651b6f9c9b74a34137f30087d8801
Signed-off-by: Alex Danila <quic_eadanila@quicinc.com>
2022-07-20 13:26:49 -04:00
Sandeep Gangadharaiah
d333d97bd6 disp: msm: dp: get DSC enable status from mode instead of panel
DSC enable status is updated in DP panel struct as per the DPCD reg
read which is done at the start of the HPD ISR. However, there is a
chance that DSC is actually disabled later during mode query due to
shortage of DSC blocks. This status is stored as part of compression
info structure. This change checks for the latter struct to determine
the actual DSC status.

Change-Id: Id7cd4e65060f2ec939f945e9ac4f4e66260605d3
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-06-23 13:19:07 -07:00
Nisarg Bhavsar
15b7e73a10 disp: msm: dp: add debug logs to ipc logging
Add existing debug logs to ipc logging to be
accessed through debugfs.

Change-Id: Id9bfe61cb7921674eadc5635847c81a0fbdaef5c
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2022-06-14 17:09:54 -07:00
qctecmdr
8a1413eaad Merge "disp: msm: dp: change display status log level" 2022-05-18 18:55:00 -07:00
Sandeep Gangadharaiah
9e8f2710ea disp: msm: dp: change display status log level
Some of the display status changes such as re-enable
or re-disable are not critical errors and can be ignored.
This change downgrades such errors as warnings.

Change-Id: I6800e534fc7fb825a472f37bb78a928e2e78d63a
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-05-18 10:34:00 -07:00
Sandeep Gangadharaiah
bbe2404b91 disp: msm: dp: update DSC resource book keeping for mst
Currently in an MST scenario, DSC resources are updated in
bookkeeping only when the corresponding stream is enabled.
This would lead to assigning already reserved DSC blocks to the
2nd stream, if 2nd stream is validated before the 1st stream is
enabled. This change would update the bookkeeping as soon as the
mode is validated.

Change-Id: I7f89a16639efcde3e5dfdf423715ed354e1de66a
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-05-18 06:49:07 -07:00
qctecmdr
705ad08735 Merge "disp: msm: dp: add ability to select pattern for tpg" 2022-05-13 09:58:57 -07:00
Rajkumar Subbiah
bbd8a4b5ab disp: msm: dp: add ability to select pattern for tpg
Currently the tpg_ctrl node takes a boolean flag to enable or disable
test pattern output on DP controller. It always sets the pattern type
to a default pattern. This change updates this interface to accept an
integer value so the user can select different patterns supported by
the controller.

Change-Id: I399091a57f353b2fb8d29a48a8390898ca9afb55
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2022-04-14 18:08:34 -04:00
Sandeep Gangadharaiah
e8ccba4d59 disp: msm: dp: set drm device pointer in dp aux object
drm device pointer is not set in dp aux object which
is leading to a warning message during device bootup.
This change will set that pointer before registering
aux object.

Change-Id: Ib79ece56d7d5efd098e06104eb020648d1d075f7
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-04-11 09:42:50 -07:00
Aravind Venkateswaran
78c45e9d5d disp: msm: dp: fix configuration of aux switches and HPD sources
Decouple the configuration and parsing of aux switches with the
parsing and configuration of HPD sources. HPD notification can come from
either GPIO based approach or a PD module through a SW interface. The
presence of AUX switch on the board should have no bearing in deciding
which configuration for HPD detection is used. Update the implementation
to allow for flexibility in selecting any combination of the HPD source
and aux switches.

Change-Id: I96d558f1d88a359d523fae6dc746045393884d5a
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-01-20 13:52:06 -05:00
qctecmdr
b5da8ebb6a Merge "disp: msm: dp: check for active panels ptr before cleanup" 2021-11-11 10:12:37 -08:00
Rajkumar Subbiah
6c8c95f99e disp: msm: dp: add qos vote during hdcp authentication
HDCP authentication has strict timing requirements and if the
display is on static screen during this time, it is possible
that SDE removes the QOS vote when it detects static display,
thereby affecting the hdcp authentication process.

This change adds qos support in dp driver to vote exclusively
for DP. If valid QOS settings are provided in dtsi, then the
driver adds the vote when it starts authentication and removes
the vote when authentication is completed.

Change-Id: I1d8bc098d0857b13fdf1ca089b6dd2d3f381bdb8
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2021-11-09 16:56:58 -05:00
Sandeep Gangadharaiah
ce678e896e disp: msm: dp: check for active panels ptr before cleanup
During a probable race condition where usermode is triggering
a delayed cleanup, this instance would be empty leading to a null
pointer dereference. This change will add protection around this
pointer.

Change-Id: I8e90a1ba3ca925f08678e5fa67616420204edae7
Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
2021-11-08 21:30:33 -05:00