提交線圖

118 次程式碼提交

作者 SHA1 備註 日期
qctecmdr
ffd0bffefb Merge "disp: msm: dp: perform host_init/deinit to reset abort" 2019-11-06 10:34:58 -08:00
Sankeerth Billakanti
e7780e7526 disp: msm: dp: perform host_init/deinit to reset abort
When doing multiple immediate plug-unplug, the DP display
driver is waiting for a link training to exhaust the retry
count before processing the disconnect request while flushing
the connect_work. The driver should stop link training and
exit if the link is disconnected. This change will use the
ctrl_aborted flag to early return from link training and
perform the host init/deinit and host ready/unready in pairs
while handling connect/disconnect to reset the abort flags
for the next connect.

Change-Id: If321136ecf12ab2f67d13ef841f1590142aad406
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2019-10-30 12:14:10 +05:30
Tatenda Chipeperekwa
169ec403f1 disp: msm: dp: skip wait if audio engine is disabled
Skip the wait in the disable path if the audio engine has already
been disabled or was not previously enabled. This avoids an
unnecessary wait since the audio subsystem will only acknowledge
the notification and not request a tear down if no audio playback
was started by the user.

CRs-Fixed: 2550150
Change-Id: I7b47345430f3d9c63b80b0aa92cdc4dd77152da9
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2019-10-28 09:03:52 -07:00
Sankeerth Billakanti
fb9ea90d58 disp: msm: dp: reset combo phy if peer_usb_comm is disabled
Some Type-C multi-port adapters which do not support usb connection
are advertising the multi-functionality in DP alt mode. If
multi-functionality is preferred, the DP driver assumes the adapter
supports usb connection and USB phy driver will program the PHY mode
to DP+USB.

In source mode, usb PD driver checks for the peer_usb_connection
of the adapter. If it does not support usb then it will stop usb stack
and update the PHY MODE to USB only mode from phy_suspend path.
The result is, usb may program the combo PHY to usb only mode when DP
is already connected. This is causing AUX read/write timeouts when DP
is trying to access the phy registers.

To fix this issue, a flag in SVID connect handler in usbpd driver to
notify peer_usb_comm support to the DP driver. DP driver will read this
flag and program the phy mode.

Change-Id: I0164b239bf2832d480795d90f5e9fc221bcc12ba
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2019-10-14 10:42:57 -07:00
qctecmdr
60210da084 Merge "disp: msm: dp: Check if DP version supports FEC and DSC" 2019-10-11 12:10:08 -07:00
Fuad Hossain
126ce89ad6 disp: msm: dp: Check if DP version supports FEC and DSC
FEC and DSC are only supported in DP 1.4 onwards.
Read FEC and DSC capabilities only if this
requirement is met. This will ensure backwards
compatibility with older DP devices.

CRs-Fixed: 2541795
Change-Id: I65a6cb903f332e896946dc3b9da4d95a14fac939
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-10-09 16:31:53 -04:00
Fuad Hossain
f3aa71a5e6 disp: msm: dp: Ensure sink supports DSC decoding of selected BPC
The sink may have limited DSC decoding support
for some BPC values. Ensure that the BPC that is
selected is within the sink's DSC capabilities.

CRs-Fixed: 2527660
Change-Id: I0692e7b606e258c3cab3de25d3b03178f4aa0294
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-10-08 14:37:38 -07:00
qctecmdr
1f35fd007a Merge "disp: msm: update topology based on clock requirement" 2019-09-21 03:22:17 -07:00
qctecmdr
49a66145eb Merge "disp: msm: add changes for bengal target compilation" 2019-09-20 15:51:07 -07:00
Tatenda Chipeperekwa
da892c0b91 disp: msm: update topology based on clock requirement
Update the topology allocation by considering the required
mode clock (vtotal x htotal x fps * fudge factor). Modes with
a clock that exceeds the maximum SDE clock will be denoted as
requiring a topology that uses two layer mixers.

Change-Id: I3c773598b0d79cb6fea9d3a0e04d89ff84d67e13
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2019-09-20 14:39:54 -07:00
qctecmdr
4729ea7b8d Merge "drm: msm: dp: change voltage swing levels for lito/kona" 2019-09-20 03:50:39 -07:00
qctecmdr
dd2ff80eb4 Merge "disp: msm: dp: Detect failure cases when setting mst topology manager" 2019-09-19 23:35:26 -07:00
qctecmdr
4030b86b3a Merge "disp: msm: dp: Fix dp mst vcpi slot management for inactive crtcs" 2019-09-19 21:35:12 -07:00
qctecmdr
0d5759feb9 Merge "disp: msm: dp: remove session lock for power state update" 2019-09-19 19:36:26 -07:00
qctecmdr
82e665d204 Merge "disp: msm: dp: clear scrambler bypass for test pattern 4" 2019-09-19 13:06:16 -07:00
qctecmdr
1864600a63 Merge "disp: msm: dp: Fix incorrect NULL pointer check" 2019-09-18 15:37:14 -07:00
Jayaprakash
669557d6eb disp: msm: add changes for bengal target compilation
This change corrects the definitions of functions
invoked when their config keys are not enabled.

Change-Id: Iba4631b8019a5e5a6b95516c5c9f9e28942e60c9
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2019-09-18 19:32:32 +05:30
Fuad Hossain
c348cb858a drm: msm: dp: Fix DSC and FEC handling
Ensure that the driver is handling DSC and FEC
enablement properly. FEC can now be independently
enabled without DSC. FEC configuration is also
now performed after link training in order to
avoid link training failures as per the DP spec.
Consequently, DSC can now be left on during
compliance testing. For DSC use-cases, ensure
that the minimum supported bpp is set to 24, as
required by the DSC spec.

CRs-Fixed: 2517994
Change-Id: I40339585da5b4e51251a3be7119b6959954954d7
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-09-13 15:59:59 -04:00
Fuad Hossain
b6a5a22b60 disp: msm: dp: Detect failure cases when setting mst topology manager
The mst topology manager set may fail for various
reasons. Ensure that the return codes are checked
and stop execution when failure cases are
detected.

CRs-Fixed: 2520932
Change-Id: I95c4caf403d0960525d931bf67560e800a3691ae
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-09-13 12:34:51 -07:00
Xiaowen Wu
e8bd1de8ba disp: msm: dp: Fix dp mst vcpi slot management for inactive crtcs
For crtcs attached to mst connectors, vcpi slots
are being allocated whether or not that crtc is
currently active. This will cause leaks during
lastclose when the crtc is inactive, because the
slots will get allocated, but never freed.

Check if the crtc state is active before
proceeding to allocate vcpi slots for that mst
connector.

CRs-Fixed: 2520907
Change-Id: I359738868e9bc72163f9e33204ff6cd7f0143b09
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-09-13 12:34:42 -07:00
Fuad Hossain
0fb408a362 disp: msm: dp: Fix incorrect NULL pointer check
Fix a typo where the correct pointer was not
being checked for NULL.

CRs-Fixed: 2511681
Change-Id: I1dde2914a7fca1f585fc7f51d8a8579fd9db2558
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-09-13 12:33:24 -07:00
qctecmdr
c0642217b3 Merge "drm: msm: dp: turn off audio before dp lane status toggling" 2019-09-13 01:08:05 -07:00
qctecmdr
d31d35ca72 Merge "disp: msm: dp: fix locking in hotplug processing" 2019-09-12 21:05:25 -07:00
Sankeerth Billakanti
fdd562dc66 disp: drm: dp: wait for a graceful dp_mst disable
DP MST userspace connect and disconnect notifications
are sent from dp_mst_drm. When a MST disconnect event
is notified from dp_mst_drm, the dp_display skips
sending the disconnect event and proceeds to process
the host unready. This is causing graceful dp display
disable to fail and affect the next dp display enable.

DP driver should ideally wait for the graceful disable
of DP display and then proceed. In this change, the DP
driver will wait for the display disable, if enabled,
before proceeding with host_unready.

Change-Id: Ief6857a9d59bf3995543792c8022245ddeac9ae6
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2019-09-10 14:08:49 +05:30
Tatenda Chipeperekwa
c11dcbf65e disp: msm: dp: fix locking in hotplug processing
Return immediately after releasing the lock if the connect event
has already been processed.

Change-Id: I80552b4c569d436ec85a945f4ddc3d389e3af43f
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2019-09-09 14:13:00 -07:00
Sankeerth Billakanti
1cc485a4cd disp: msm: dp: fix for dp link layer cts failures
The DP link layer CTS tests issue continuous DP plug/unplug.
When that happens, sometimes the DP sw state machine is going
into a bad state causing DP blankout. This is happening when
the post_enable call fails and the hpd handling logic in the DP
driver skips sending the disconnect and next subsequent connect
notifications. This change will fix the conditions to correctly
notify the userspace about the DP connection status.

Change-Id: I41310c8c465901eb5e5bd8fdec2038fe3c01e50a
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2019-09-04 14:40:32 +05:30
Tatenda Chipeperekwa
1d1ce83ab1 disp: msm: dp: remove session lock for power state update
Remove session lock for power state update to improve functionality
for fast hotplug use cases. This allows the controller and aux modules
to be updated asynchronously based on hotplug state. For example,
in disconnected state all aux transactions will be aborted.
Updates to the power state can be done without the session lock
since this path is only exercised during compliance testing.

Change-Id: Ibe175624ef56d9f7b953b9b54928682f1cac906a
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2019-09-03 18:01:58 -07:00
Tatenda Chipeperekwa
93893b319b disp: msm: dp: clear scrambler bypass for test pattern 4
Clear the scrambler bypass bit while programming test pattern 4
for electrical compliance. This bit is only used for debugging
purposes and must be unset in order to get the correct test pattern
output from the controller.

Change-Id: If54ba17dc5bdd096899cf57cc4f276aab1837308
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2019-09-03 17:01:02 -07:00
RAJAT GUPTA
078b0f0793 drm: msm: dp: turn off audio before dp lane status toggling
There is an audio turn off timeout error whenever DP handles
the link state toggling requests from sink during audio
playback session. The audio hw is waiting for DMA write done
interrupts before issuing a audio session tear down. As the
DP controller is put into reset before link training, the
DMA write done is not sent by the DP controller hence causing
audio timeout errors. These changes turn off audio before the
DP controller is put into reset so that the audio session
tear down takes place within the stipulated time.

Change-Id: I7b88d0385a84f308d8537c2766e6fbc25a2ddc3b
Signed-off-by: RAJAT GUPTA <rajatgu@codeaurora.org>
2019-08-30 15:17:40 +05:30
Ajay Singh Parmar
8fb6f89363 disp: msm: dp: fix test pattern selection
Use one level lower test pattern in case the current
test pattern fails to train link. This helps with few
monitors which sometimes fail with a selected test
pattern. Instead of failing the link, try with a lower
test pattern.

CRs-Fixed: 2507729
Change-Id: I394253398f49b03084dc547dacaededa49a9c527
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2019-08-19 14:36:17 -07:00
qctecmdr
b1ad60a7fd Merge "disp: msm: dp: use the correct checksum for EDID" 2019-08-12 09:49:12 -07:00
qctecmdr
50e8ef62d3 Merge "disp: msm: add proper null checks and propagate error" 2019-08-11 20:21:19 -07:00
qctecmdr
2a9da1c03b Merge "disp: msm: dp: fix register read/write delays" 2019-08-08 16:50:41 -07:00
qctecmdr
28022d54f0 Merge "disp: msm: dp: fix dp_display module's state handling" 2019-08-08 16:50:40 -07:00
qctecmdr
6cdf3b339e Merge "disp: msm: dp: synchronize debug and aux common buffer handling" 2019-08-08 16:50:40 -07:00
qctecmdr
c19743bbc6 Merge "drm/msm/dp: remove qfprom reference from dp driver Remove qfprom regmap reference from DP driver as it is not used anymore." 2019-08-08 07:09:16 -07:00
Ajay Singh Parmar
4ca56193c5 disp: msm: dp: synchronize debug and aux common buffer handling
DP debug module is run by external script for automation testing.
DP aux and debug modules operate on shared buffers. In some race
conditions, aux and debug module can go out of sync resulting in
automation failures. Lock the buffers to make sure there are no
race conditions.

Change-Id: If0ae370c22cf035f3177666bd714221d6b3cd56e
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2019-08-06 15:32:21 -07:00
Samantha Tran
c00bf10768 disp: msm: add proper null checks and propagate error
Fix possible null pointer dereferencing and propagate error
code during early return.

Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-08-06 14:47:18 -07:00
Ajay Singh Parmar
9eb1b41671 disp: msm: dp: fix register read/write delays
Currently, for every DP hardware register read/write, there
is a string comparison to determine the execution mode. This
adds up an extra delay while powering up/down which does a
large number of register reads and writes. During stress
testing and automation, this can cause an issue resulting
in failures. Remove the unnecessary delays by using common
APIs for register reads and writes. Switch these APIs only
in case of execution mode change.

Change-Id: I9403873a29b3466c606297b2aa386d0885bb2dc7
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2019-08-06 12:55:48 -07:00
RAJAT GUPTA
c22348bfd4 drm: msm: dp: change voltage swing levels for lito/kona
Change HBR and RBR voltage swing level for 600mV-3.6db
settings on lito/kona as per hardware specification in
dp phy hpg.

Change-Id: If86bf158fb8b538d7ea31364a757584201d5f1c3
Signed-off-by: RAJAT GUPTA <rajatgu@codeaurora.org>
2019-08-06 12:10:33 +05:30
Ajay Singh Parmar
488cb89f09 disp: msm: dp: fix dp_display module's state handling
Currently the DP display's states are not able to handle
the use cases like suspend/resume. The required steps of
host initialization and ready are not properly followed
in such cases. Define proper DP display states, set and
unset at the right places to make sure dp is in proper
state in such cases.

Change-Id: Ibf6d35dec3ab373a7225b30ac1c2f9864bb6ff78
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2019-08-02 17:26:39 -07:00
qctecmdr
c70f647143 Merge "disp: msm: dp: correct the resolution width check in get_mode_info" 2019-08-02 13:42:29 -07:00
qctecmdr
3aa07c4957 Merge "drm/msm/dp: add checks to prevent buffer overflows" 2019-08-02 07:47:14 -07:00
Ajay Singh Parmar
eaed3221fa disp: msm: dp: use the correct checksum for EDID
As per new requirements from DP 1.4a CTS, DUT (device under test)
should update the TE (test equipment) with the correct checksum
of the EDID even though the EDID is corrupted. Update the TE
with the checksum stored in the connector to meet this new
requirement.

CRs-Fixed: 2490128
Change-Id: Ib5c7bf4430c45050da3c91968716e88bd830e3e4
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2019-07-31 20:53:55 -07:00
RAJAT GUPTA
d0a2630e5f drm/msm/dp: add checks to prevent buffer overflows
Add checks to prevent buffer overflows through debugfs.

Change-Id: I1242a6e94b3182a9a3b0cbef4b04a9f8b14a4103
Signed-off-by: RAJAT GUPTA <rajatgu@codeaurora.org>
2019-07-30 11:58:38 +05:30
Tatenda Chipeperekwa
0ca2e2dc14 disp: msm: dp: send hotplug notification on state change
Send the hotplug notification to the user space only when there
is a state change e.g. from connect to disconnect, or vice versa.
This ensures that there are no spurious notifications that are
sent to the user space.

CRs-Fixed: 2478822
Change-Id: Ic3fdc95de5f2573a14cb526203d7e4ab58c567ba
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2019-07-29 16:08:43 -07:00
qctecmdr
60d59191c8 Merge "disp: msm: dp: add colorspace property for MSM DP" 2019-07-28 01:12:00 -07:00
qctecmdr
42aaee7d8c Merge "disp: msm: dp: enhance dpcd debugfs to parse extended capability information" 2019-07-28 01:12:00 -07:00
qctecmdr
9908bdb083 Merge "disp: msm: dp: Enable pre-emphasis level 3" 2019-07-27 07:06:22 -07:00
Ajay Singh Parmar
2d4ac9b559 disp: msm: dp: Enable pre-emphasis level 3
Enable the pre-emphasis level 3 as per hardware recommendations.

CRs-Fixed: 2490128
Change-Id: I649b0cb79c1c5f5d92d2265d9ff2058c2ca81c16
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2019-07-25 14:43:40 -07:00