Commit Graph

266 次程式碼提交

作者 SHA1 備註 提交日期
qctecmdr
6fa30971f2 Merge "disp: msm: dp: unify hpd event for sst and mst" 2020-11-12 12:23:53 -08:00
Rajat Gupta
ecc89334b0 disp: msm: dp: add error handling for host init failures
Add error handling mechanism in host init function to take necessary
action upon failure. For example, power init can fail if we try to
do host_init in between PM suspend. In this case sink sends an hpd
irq with hpd_high equals to 0 and hpd_high equals to 1, after which
ADSP sends the events to DP driver. Now as apps core is in PM suspend
all the devices are put to suspend state and cannot be resumed if
their disable_depth is greater than 1. When driver tries to process
the hpd_high equals to 1 and does host_init in between PM suspend,
it sometimes leads to power init module failure. Inadequate handling
of host init failure as described can lead to a NOC error.

Change-Id: I23eff28e137a18b43eef204fbccc695b743cf726
Signed-off-by: Rajat Gupta <rajatgu@codeaurora.org>
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2020-11-09 21:23:45 -08:00
Rajkumar Subbiah
2fc0439a46 disp: msm: dp: unify hpd event for sst and mst
Currently hpd uevent notification to usermode is triggered at different
points in the hpd handler callflow. With respect to the SST callflow,
the MST callflow has the following issues:
* the completion event object is getting reinitialized after the uevent
is sent
* The NOTIFIED states are not updated properly.
* dp_display_process_mst_hpd_high is overloaded to do two different
functions in the same flow and is controlled by the mst_probe argument.

This change cleans up the hpd callflows for MST and unifies the hpd
event notification. Also moved the mst check logic from
dp_display_process_mst_hpd_high to a separate function.

Change-Id: I8fdc92d2f9aae16d248c74643cb93688786dfbd5
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-11-06 16:48:02 -05:00
Rajkumar Subbiah
f8a75153b7 disp: msm: dp: send hpd notification before updating mst_active
When processing mst hpd low, the driver is clearing mst_active before
triggering hpd notification. The hpd notifier is common for both
sst and mst and since mst_active is cleared it incorrectly treats
this as sst unplug.

This change switches the order of these operations to trigger hpd
notification before clearing mst_active.

Change-Id: I28f90da699e4f2fe177a4e4cfd1d9f03957c3176
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-11-03 14:42:03 -05:00
qctecmdr
9fadc353f3 Merge "disp: msm: dp: handle FEC EN sequence collision with BS symbols in SW" 2020-10-23 09:51:33 -07:00
qctecmdr
83d31bb3f7 Merge "disp: msm: dp: use VESA recommended default dsc slice height" 2020-10-23 09:51:33 -07:00
qctecmdr
746f5eb68a Merge "disp: msm: dp: cache edid data for mst" 2020-10-23 00:57:51 -07:00
Sudarsan Ramesh
cf4877c2c3 disp: msm: dp: cache edid data for mst
Currently, in SST mode, sink edid is read once after hpd
and reused on subsequent mode enumeration calls. But in
MST mode, there is no caching and the driver re-reads the
edid from the sink on every get_modes call for each monitor.
Each read takes more than 500ms causing unnecessary delays
during MST enumeration.

This change reads the edid once per hpd and uses the
cached data on subsequent calls.

Change-Id: I27545a44b9f9bd40000dde60735815f9c47fa54c
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2020-10-22 20:34:21 -04:00
Amine Najahi
6d9245e01a disp: msm: dp: handle FEC EN sequence collision with BS symbols in SW
Prior to Makena, hardware requires SW to retry FEC EN sequence when first
attempts fails. This is needed because hardware doesn't prevent FEC EN
logic to be inserted while BS symbols are sent. Which can lead to some
sink device to not being able to detect FEC EN sequence.

This change implements HPG guidelines, by monitoring FEC_STATUS and
retrying 3 times before failing the enable call.

Change-Id: I350eabe31d39f619e536ef87648874b4d58a7292
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-10-22 14:18:01 -04:00
Sankeerth Billakanti
11bb969e5d disp: msm: dp: reset disconnect flags on cable hotplug
When a physical DP sink is connected after a simulation
session, the attention events from the sink are ignored.
The forced_disconnect flag prevents handling of attention
events when disconnect is simulated or forced. This flag
does not get reset when a physical sink is connected.
Certain sinks which lose link integrity after link
training sequence fail to display image.

This change will reset the flag so that the attention
events which occur after the cable hotplug can be processed.

Change-Id: Ie551ead19ecff0e93da48acc2dbb1d761c55fa20
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2020-10-20 06:09:57 -07:00
Amine Najahi
ab0bfd7fdd disp: msm: dp: use VESA recommended default dsc slice height
By default use a slice height of 108 lines as it provides better
performance while maximizing compression and avoiding creating
artifacts at the slice boundary. This value is the recommended
one in VESA DSC specification and it is required for DP DSC CTS
tests with CRC validation to PASS.

Change-Id: I5c295873e4cf79f9fcf2da167a2349289118783b
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-10-13 11:12:40 -04:00
qctecmdr
59571e81dc Merge "disp: msm: dp: remove function get_min_req_link_rate" 2020-10-13 00:22:43 -07:00
qctecmdr
bd70659510 Merge "disp: msm: dp: use correct lane_count to validate mode" 2020-10-13 00:22:43 -07:00
qctecmdr
b581ca2910 Merge "disp: msm: dp: modify handling of CP_IRQ to fix HDCP 2.3 CTS test 1B-09" 2020-10-13 00:22:43 -07:00
Sankeerth Billakanti
8f89a26df1 disp: msm: dp: remove function get_min_req_link_rate
Remove unused function dp_panel_get_min_req_link_rate.

Change-Id: I91c0860074d1b8e121bf3aef35520e6ffce8552a
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2020-10-11 20:02:29 -07:00
Sankeerth Billakanti
cba1cdf6af disp: msm: dp: use correct lane_count to validate mode
The lane_count used for validating the display mode
to be set is wrongly taken from the initial panel
capability. So, when lane count is reduced during
link training, the reduced lane count will not be
considered for validating supported modes. Hence
reporting incorrect display modes.

This change will use the correct lane count which
is obtained after the link training sequence.

Change-Id: Iab6239280c29961f7bc6f945ff3ecee9954b0b73
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2020-10-11 20:02:18 -07:00
Aravind Venkateswaran
38407b22c4 disp: msm: dp: modify handling of CP_IRQ to fix HDCP 2.3 CTS test 1B-09
Upon receiving a CP_IRQ, the current implementation waits for up to 200
milliseconds for the link polling to be enabled, before reading the
message from the sink. This wait is currently done in the DP HDCP
module's main event thread. However, polling mode is also enabled in the
same event thread upon a wakeup triggered by the HDCP engine. This can
be problematic if the CP_IRQ comes before link has been transitioned to
the polling mode. Such a sequence of event is easily seen when executing
HDCP 2.3 CTS test 1B-09 using Unigraf UCD-400 test equipment.

To address this, wait for the polling mode to be enabled from the CP_IRQ
handler context directly and invoke the event thread only for reading
the CP_IRQ message after the link has transitioned to polling mode.

In addition to the above change, increase the wait time for link to
transition to polling mode to 300ms. This is needed because, in the
current implementation there is a fixed delay of 200ms as part of the
call to the QSEECOM API to enable encryption after the authentication is
successful.

Change-Id: I0bdd4893bf63e6ae0fcda5dfb61f23e901061207
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2020-10-09 22:56:00 -07:00
Rajat Gupta
91dce244a4 disp: msm: dp: reinit video_comp variable before using it again
Reinitialize video_comp completion variable before using it again
to wait for interrupt.

Change-Id: Ifc105eaa758d85ef604a440b3be7adfdafe7fc0f
Signed-off-by: Rajat Gupta <rajatgu@codeaurora.org>
2020-10-09 14:13:37 +05:30
qctecmdr
7ab3158794 Merge "disp: msm: dp: add support for Trusted UI transitions" 2020-10-08 21:51:47 -07:00
Tatenda Chipeperekwa
f3b2c5f89c disp: msm: dp: add support for Trusted UI transitions
We add support for Trusted UI (TUI) transitions and address the
following use cases:

1. Display was active before TUI start
    - Power off on TUI start, power off on TUI stop
    - Register access not allowed after TUI start (skip all
      events except disconnect)
2. Hotplug while TUI is active
    - Connect: skip sending connect uevent
    - Disconnect: send disconnect uevent and skip any controller
      programming
3. TUI start while processing HPD High
    - Complete all connect work (and therefore any register access)
      then send connect uevent
4. Audio
    - Disable audio at TUI start and skip audio programming if TUI
      is active

Change-Id: I553e5fa9f3b8265dd0410bf2d616a9accf90605f
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-10-08 15:58:57 -07:00
qctecmdr
74f9934cfc Merge "disp: msm: dp: improve interop experience for fast hotplug scenarios" 2020-10-06 01:26:25 -07:00
Aravind Venkateswaran
7454e06259 disp: msm: dp: improve interop experience for fast hotplug scenarios
Current implementation waits for 10ms prior to sending the connection
notification to user mode. This delay is to check for any potential
IRQ HPD event from the sink which may require a link maintenance.
However, this delay may not be sufficient for certain use cases.
Increase this delay to 150ms and modify the implementation to exit
the wait whenever an IRQ HPD is received. This ensures that we can
process the IRQ HPD in a timely manner as per the specification. To
further improve debug ability, add the support to configure this delay
though debugfs:

   echo [delay_ms] > /sys/kernel/debug/drm_dp/connect_notification_delay_ms

Certain cables are unable to handle back-to-back HPD notifications and
may end up skipping some events. To improve interoperability, delay the
handling of disconnect notification. Sinks would typically issue an HPD
high following an HPD low only after they sense that the mainlink has
been torn down. Delaying the handling of HPD low would in turn delay the
issuing of the subsequent HPD high from the sink. Here again, make this
delay configurable through debugfs to improve debug ability of these
interop issues:

   echo [delay_ms] > /sys/kernel/debug/drm_dp/disconnect_delay_ms

Change-Id: Ie29198af4dcda6d392798a3a93ebb3ddaa6746c8
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2020-10-05 15:05:48 -07:00
qctecmdr
b19b9e4355 Merge "disp: msm: dp: reduce log level for messages" 2020-10-02 17:13:06 -07:00
Aravind Venkateswaran
d1d2d5a809 disp: msm: dp: reduce log level for messages
Decrease the log level for messages that are typically printed from a
real time thread execution environment (such as the display commit
thread). This can help with cases where a console lock held during the
execution of these real time threads can result in RT throttling issues.

Change-Id: I41e1e4f171b5eee9966d8a7d26d64430a81bc6fc
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2020-10-01 23:38:58 -07:00
qctecmdr
cf51cabb69 Merge "disp: msm: dp: skip link training in simulation mode" 2020-10-01 00:36:12 -07:00
Aravind Venkateswaran
5ba397e17e disp: msm: dp: fix the check for link maintenance
Current implementation checks for loss of channel equilization
or clock recovery only if the sink sets the link status updated
bit in the DPCD. However, it is possible that the sink can issue
an IRQ HPD to notify a link loss without setting the link status
updated field. Update the implementation to perform a link
maintenance whenever clock recovery or channel equalization is not
ok irrespective of whether the link status updated bit is set.

Change-Id: I2d765236b1e8ddae3c410087406546d0422cdf07
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2020-09-30 22:58:22 -07:00
Tatenda Chipeperekwa
46e93edf2e disp: msm: dp: skip link training in simulation mode
Skip link training when in simulation mode considering that we
are not yet implementing tests specific to link training. This
change will reduce the time it takes to power on the panel in
simulation mode, and also reduce the likelihood of failures
caused by unresponsive host machines.

Change-Id: Ie215cafd545bb25b4a033ceae1f275c690e7433d
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-09-29 11:24:28 -07:00
qctecmdr
5382be1db4 Merge "disp: msm: dp: log altmode events in xlog" 2020-09-18 03:50:12 -07:00
qctecmdr
d0e92b2a26 Merge "disp: msm: dp: fix dp-mst stream double disabled issue" 2020-09-18 00:12:13 -07:00
qctecmdr
99372af0b6 Merge "disp: msm: dp: skip attention requests on disconnect" 2020-09-18 00:12:13 -07:00
Sankeerth Billakanti
3b784e6ef5 disp: msm: dp: log altmode events in xlog
Add the altmode communication events in xlog to help
debug the stability issues.

Change-Id: I29d4821a8222e6139187f92b75ec1d05b5ce4939
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2020-09-18 09:53:43 +05:30
Xiaowen Wu
c60d3d5989 disp: msm: dp: fix dp-mst stream double disabled issue
There is a corner case when dp-mst stream is disabled twice:

1. stream 1 is enabled
2. cable plugged out, stream 1 is disabled by kernel
3. cable plugged in, enable stream 0 first
4. disable stream 1

Stream 1 is double disabled and will cause hw crash. This change
will add the check and skip stream_off if already disabled.

Change-Id: Icd1e815a1ed14cd4e784924f3db19b98eb06d571
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2020-09-16 06:25:38 -07:00
qctecmdr
5391d25fbc Merge "disp: msm: dp: do not skip disconnect when host is unready" 2020-09-12 11:26:36 -07:00
qctecmdr
e253a5d57d Merge "disp: msm: dp: enable logs in key mst callflow operations" 2020-09-11 21:50:39 -07:00
Rajat Gupta
02ad85b541 disp: msm: dp: skip attention requests on disconnect
Don't process any attention requests after hpd off. During automation
tests, scripts are doing a mst unplug after hpd off. But sometimes
disconnect thread freezes waiting for audio ack. During this freeze
unplug happens and uninstalls connector and free the panel and audio
objects due to which lock associated with completion variable causes an
exception.

Change-Id: I4038fd7debc383a96d60906eef17ec6e2163b326
Signed-off-by: Rajat Gupta <rajatgu@codeaurora.org>
2020-09-11 18:19:00 +05:30
qctecmdr
11483a9d3d Merge "disp: msm: dp: return early if all streams are disabled" 2020-09-10 10:30:19 -07:00
Zhao, Yuan
7605176062 disp: msm: dp: do not skip disconnect when host is unready
usbpd_attention_cb will do dp_display_disconnect_sync, but will
not deinit dp host. usbpd_disconnect_cb can deinit dp host, so
need to check dp state, if dp is unready, should not skip
usbpd_disconnect, can deinit dp host now.

Change-Id: I5a149923ecb043b3a7db973e092bd0d49a715981
Signed-off-by: Zhao, Yuan <yzhao@codeaurora.org>
2020-09-10 09:58:33 -07:00
Rajkumar Subbiah
1b694e8213 disp: msm: dp: enable logs in key mst callflow operations
This change adds more debug logs and event logs to MST callflows
to help with MST stability issues.

Change-Id: I9053eab5932487fccce522cc17ed2e9fb8d887ab
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-09-10 09:07:34 -04:00
qctecmdr
a56d1440d0 Merge "disp: msm: dp: add support for diff values of pre-emp and swing levels" 2020-09-09 02:29:19 -07:00
qctecmdr
c97cf39485 Merge "disp: msm: dp: remove link probe from dp display driver" 2020-09-09 02:29:19 -07:00
Rajat Gupta
1afa803170 disp: msm: dp: return early if all streams are disabled
Return early if the active streams are not present. Clean function
doesn't take into account the count of active stream which is being
changed during disable and link clk is turned off before that.
Adding active stream check in pre_off will ensures atleast one
stream is on and link clk is not turned off.

Change-Id: I6abf4b14ae4f99161eed3d5300b1961a1983977d
Signed-off-by: Rajat Gupta <rajatgu@codeaurora.org>
2020-09-09 12:12:50 +05:30
qctecmdr
6f85b051af Merge "disp: msm: dp: enhance trace and logging for mst" 2020-08-28 14:11:38 -07:00
qctecmdr
e2f4c767b9 Merge "disp: msm: dp: avoid use of mst_lock in hpd callbacks" 2020-08-28 11:49:24 -07:00
Rajkumar Subbiah
6ffa470809 disp: msm: dp: enhance trace and logging for mst
Enhance logging in dp mst functions by adding connector ids to
better identify operations for different streams and add more
trace logs.

Change-Id: Iaf5c67105c7af82fc5118674ddde5aef2319a611
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-08-27 17:50:28 -04:00
Sankeerth Billakanti
766b43bd13 disp: msm: dp: remove link probe from dp display driver
When resuming the video session from a source initiated power down, the
dp_display driver is doing a link probe again to override the previous
link information parameters. The link_probe is not accurately capturing
all the sink capabilities resulting in the link getting trained at a
different rate when resuming from a PM suspend or a secure display
session. The HBR3 support is indicated in the extended capabilities
DPCD registers which is not considered in the upstream link probe
implementation.

This change will remove the drm_dp_link_probe function from the DP
driver because it is not capturing the accurate DP sink capabilities.

Change-Id: I3c225cf825c826edd73592b18fae74c8b5b8236c
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-08-25 22:33:28 -04:00
Rajat Gupta
9ea7fca99f disp: msm: dp: add support for diff values of pre-emp and swing levels
Update the DP controller and PHY programming to support different
values for pre-emp and voltage swing levels at different link rates.

Change-Id: I974c47cd1bf71b76dea4f270031a9cdfe320725e
Signed-off-by: Rajat Gupta <rajatgu@codeaurora.org>
2020-08-25 19:08:07 -04:00
qctecmdr
d8ffbf3d39 Merge "disp: msm: dp: fix simulated hpd_irq handling for real monitors" 2020-08-25 12:01:32 -07:00
qctecmdr
57807a5d97 Merge "disp: msm: dp: use base connector properties for mst connectors" 2020-08-20 23:40:52 -07:00
Rajkumar Subbiah
1a9437a816 disp: msm: dp: fix simulated hpd_irq handling for real monitors
A mode switch on a real monitor can be triggered by forcing the new
mode using debugfs and initiating an hpd_irq. Due to a missing
check for simulator state, the current driver calls the hpd_irq
callback for simulator even for a real monitor. This change adds
this check.

Change-Id: I13480eccd27eac2f9df3dd766d0445c0a5ea9b2c
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-08-20 17:23:31 -04:00
Rajkumar Subbiah
b240ae79e4 disp: msm: dp: avoid use of mst_lock in hpd callbacks
DP MST driver registers bridge callback functions with the DRM framework.
mst_lock is used for synchronization of the mst bridge functions. These
functions call into dp_display where a session lock is obtained for
the display. HPD callbacks, on the other hand, are first handled by
dp_display. During these callbacks, dp_display takes a session lock
first before calling into DP MST driver layer. Currently, the DP MST
layer waits on mst_lock which can result in a deadlock.

This change removes the usage of mst_lock inside hpd callback functions
and just uses the session lock for synchronization.

Change-Id: I7ec338004eef43ac0f1e1f092463e9915cd60684
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-08-19 14:21:05 -04:00