Commit Graph

904 Commits

Author SHA1 Message Date
qctecmdr
15cb70c77f Merge "disp: msm: get reg-bus vote values from device node property" 2020-04-08 09:25:17 -07:00
qctecmdr
a703569e0f Merge "disp: msm: fix data bus bandwidth vote units" 2020-04-07 17:52:00 -07:00
qctecmdr
50e358b5e5 Merge "disp: msm: hdcp: reset authentication state for client initiated abort" 2020-04-07 12:24:24 -07:00
Rajat Gupta
84424a93e3 disp: msm: hdcp: reset authentication state for client initiated abort
Return EINVAL upon early exit/abort of authentication and
reset the authentication state.

Change-Id: I4862bbe55301eabef2a83849a551eb948f73569b
Signed-off-by: Rajat Gupta <rajatgu@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-07 11:03:08 -07:00
qctecmdr
f30a033ad5 Merge "disp: msm: hdcp: abort queued tasks while processing PM suspend" 2020-04-06 21:56:42 -07:00
Steve Cohen
e3184000c5 disp: msm: get reg-bus vote values from device node property
Get the register bus AB/IB vote values for each supported mode
from the device node to allow flexibility in adjusting these
settings for various different targets.

Change-Id: I258320d4847accfa8043f5f9fc4ccc791c16dddd
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-04-06 21:55:15 -04:00
qctecmdr
fbb802950c Merge "msm: sde: SW workaround for REG_BLK_LUT_WRITE HW limitation" 2020-04-06 17:06:19 -07:00
Sankeerth Billakanti
2192810d8a disp: msm: dp: skip powering down dp host in mst mode
If DP is running in mst mode, DP host should not power down during
unprepare call as aux need keep alive to handle further hot-plug
sideband message. Unless it is a PM suspend scenario where it is
required to deinit the host.

Change-Id: I208894e1cbc75e727044c196194b0a4e3936921e
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 16:12:04 -07:00
Rajat Gupta
0e1496c718 disp: msm: hdcp: abort queued tasks while processing PM suspend
During suspend, there might be a chance that lib auth work is queued
but not yet started. So during pm cycle it might start execution
before host_init which can lead to noc error while accessing dp_aux
registers. To prevent that set abort flag to abort lib auth work and
set interrupts before host_deinit.

Change-Id: Ie2c3ac9b0846644d3c2b37f410c341659b030c16
Signed-off-by: Rajat Gupta <rajatgu@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 16:10:58 -07:00
Sankeerth Billakanti
54365213d1 disp: msm: dp: execute host_init on restoring session teardown
Ensure host_init is executed when the DP display driver is resuming
from a video session teardown. The host_deinit is executed when DP
video session teardown is initiated by the userspace while DP cable
is connected. If the DP display is disconnected from dongle while
the video session is in teardown, the host_init is not executed
when the session is restored. All subsequent display connections
will fail because the core clocks are not on and aux abort is not
reset.

This change will ensure host_init is executed whenever the
host_deinit is executed during DP video session teardown by userspace.

Change-Id: If1ae3eb731a96bd929cd023733c098b513436a1c
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 14:34:17 -07:00
Sankeerth Billakanti
d7bc0eebfe disp: msm: dp: send dp hpd notification from attention_work
The hpd notification is skipped in connect_work if there is an
attention_work pending. So, the notification has to be sent in
attention_work.

Some dongles issue multiple attention events with LINK_STATUS_UPDATED
while the connect_work is in progress. So, once the link training
is successfully completed the LINK_STATUS_UPDATED attention event is
considered handled and the attention_work scheduled to execute after
the connect_work will return early without handling the
hpd_notification cases.

This change will ensure the hpd_notification is sent from
attention_work in such cases.

Change-Id: I5ef6781354b80842d2a6f44360cde25ee6d2b0b7
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 14:34:17 -07:00
Sankeerth Billakanti
9ee6c22331 disp: msm: dp: update vswing and pre-emphasis settings for lito
Change to update the voltage swing and pre-emphasis settings for
lito to support dp phy cts.

Change-Id: I97f0b9882291d7d52e10ef4bef6ea6a23780e12a
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 14:34:17 -07:00
Sankeerth Billakanti
33f6b8e11e disp: msm: dp: fix for screen freeze on dp disconnect
The DP display driver issues an audio disconnect notification
after the video disconnect notification. Sometimes audio driver
is waiting for the video commit to complete before turning off
the audio engine. In such cases, there is a brief screen freeze
observed on the primary. In other cases, when the off call from
audio driver gets delayed, a momentary screen freeze is seen.
The audio notification happens as part of the display commit call.

The order of notification is video and then audio while
processing display connect and the same order is followed for
disconnect also, which is causing this issue. These changes will
modify the order of notification to send audio disconnect first
and then video while processing DP cable disconnect.

Change-Id: I8bece39c164620b319d971e5a2597d9dc187566e
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 14:34:17 -07:00
Sankeerth Billakanti
be267c80f7 disp: msm: dp: reset panel object for connector when uninstalled
When panel object for a dp connector is destroyed, the instance
of dp_panel in the connector object is made NULL to prevent
further panel object dereferences.

Change-Id: I63409ab8c470f14cf9c032e373cb0c0872577504
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 14:34:17 -07:00
Sankeerth Billakanti
3630628d0d disp: msm: dp: correct the dp_panel instance used to enable audio
When DP_LINK_STATUS_UPDATED irq_hpd occurs, the mst audio instances
are turned off, irq_hpd handled and audio instances are turned on
again. While turning on, an audio instance different from the ones
turned off is being sent, causing ops mismatches eventually leading
to a NOC error. These changes will correct the pointer to the audio
or the panel instances to match the ones that are turned off.

Change-Id: Idd9c013fd64cd6db06bbec34f5083029e4ab522c
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 14:34:16 -07:00
Sankeerth Billakanti
3ce95ac68e disp: msm: dp: update min_enc_level only if link is authenticated
The min_enc_lvl update is asynchronous to the hdcp2x state machine and
can come anytime. In an instance where authentication with the sink is
continuously failing, the enforce engine blocks the hdcp22 secure content
playback and resets the min enc lvl. This is causing the sde_hdcp_2x_main
to perform a send message operation out of sync with the current
authentication attempt. This is causing the state machine to go into bad
state by changing the next message id, sometimes causing a pagefault error
in the sde_hdcp_2x_main while cp_irq is in progress. This change will
proceed with the min_enc_lvl change only when the mainlink is hdcp2p2
authenticated.

Change-Id: I977ac3a083b9593f8f7e760d4e477d4af424d5c9
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 14:34:16 -07:00
Aravind Venkateswaran
69631c415c drm: msm: dp: update logging support
Modify the macros to use default kernel logging function if DRM log
levels are not explicitly set. This helps in being able to selectively
enable function or file level logs.

Change-Id: I4f894a2ecf314a3a5fc0bb22a75a0e10dae31e07
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 14:34:16 -07:00
Aravind Venkateswaran
47cc800aff disp: msm: dp: delay hotplug connect notification
Delay the hotplug connect notification to check for any test
requests issued by the sink. This will avoid unwanted connection
event callbacks.

Change-Id: Id7a04dbbb5ad5b86c3791ac2db5de2c92e98fc46
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 14:34:16 -07:00
Aravind Venkateswaran
d8be39e02b disp: msm: dp: skip HPD connect notification if IRQ HPD is pending
Upon completing the link setup, check to see if any IRQ HPD
notification is pending prior to sending the connect notification
to the user mode. If an IRQ HPD is pending, address the IRQ first
prior to sending the notification. This will ensure that the link
setup is stable first before the connection setup is started. This
will also help in adhering to the CTS timing requirements for
responding to IRQ HPD notifications. The current patchset limits
this logic only for SST connections.

Change-Id: I3f5e8e9290f915b98ec5e9e6cf9ff14aa9929d96
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 14:34:16 -07:00
Aravind Venkateswaran
fac5436450 disp: msm: dp: fix locking during link maintenance
Ensure that session lock is held while handling link maintenance
to ensure that connect/disconnect handling and link maintenance are
serialized. This will avoid un-intended interleaving of session
setup/teardown with link maintenance which can result in link training
failures.

Change-Id: I96bb5b01a80433e26d675a019b8827de9fecb75b
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 14:34:16 -07:00
Aravind Venkateswaran
5f73d3b6bd disp: msm: dp: do not abort DP display init if link is aborted
It is possible that by the time DP display is initialized by the
user mode in response to a hotplug connect event, the DP display has
already been disconnected. In such cases, the link aborted flag is
set by the driver prior to sending the HPD disconnect event. Current
implementation will abort the connection callback when this aborted
flag is set. As a result, the DP stream clocks would not be enabled
and the DP interface will not be able to generate any vsyncs. This can
cause a lot of instability. Allow the connection callbacks from the
usermode to complete successfully to avoid these issues. This will also
help in subsequent disconnect and connect notifications to be handled
gracefully.

Change-Id: I9a0d44492a3590e1b6026bc545ee81f7414925cd
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 14:34:16 -07:00
Aravind Venkateswaran
732622e52c disp: msm: dp: init/deinit host only for cable connection/disconnection
DP host initialization and de-initialization need to be done only
in response to cable connect/disconnect events. De-initializing host
(which includes turning off all regulators), for every HPD low events
is unnecessary and can cause unintended issues with DP CTS tests.

Change-Id: I95ac71853dc14a46e4175cf0bee4c3eae315fc1e
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 14:34:16 -07:00
Tatenda Chipeperekwa
f7de094233 disp: msm: dp: Enforce HDCP 2.3 timing requirements
The HDCP 2.3 specification added new timing
requirements for message read duration. Ensure
that these requirements are enforced in the DP
display layer.

Delay for a specification-allowed amount of time
before reading messages to ensure that sinks have
enough time to process messages and make their
replies available to read.

Change-Id: I40b210823a7cbaca6efc12abc4c8e8b98a10e071
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 14:34:16 -07:00
Tatenda Chipeperekwa
3e26909b0a disp: msm: dp: abort aux before going to dp suspend
During resume, DP uses AUX to perform various functionalities
like DPCD/EDID read or link training etc. This involves other
hardware modules as well like USB and Charger. In a situation
like continuous suspend/resume, while DP is processing resume,
suspend can trigger resulting in dependent hardware modules
to go to sleep. As AUX communication is hardware interrupt
based, this can result in unstable system.

Abort all functionalities before going to suspend to
avoid unnecessary AUX and other functionality failures.

Change-Id: Id52d408270232adf7258a7eb064ee969eba4be71
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 14:34:16 -07:00
Tatenda Chipeperekwa
cf7ed76bdd disp: msm: dp: add more state and event based logging
Add more state and event based logging in order to enhance
state transition and use case based debugging in the driver.

Change-Id: I00dee6fcff832c104d3f8b651635a41d9cfc6921
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 14:34:15 -07:00
Tatenda Chipeperekwa
9377fcd5af disp: msm: dp: refactor functions to reduce code complexity
Refactor the mode validation and HDCP worker functions in order
to reduce code complexity and improve readability.

Change-Id: I6b33599d66b73d16a6cb9cc120605a032dada996
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-06 14:02:07 -07:00
qctecmdr
43342ef07f Merge "disp: msm: refactor DSI debugbus dumping" 2020-04-06 08:25:33 -07:00
qctecmdr
d52f43d4aa Merge "disp: msm: fix buffer size calculation for VBIF debug bus" 2020-04-06 06:58:58 -07:00
qctecmdr
9900a4baf3 Merge "disp: msm: use generic read function for dbgbus dumps via debugfs" 2020-04-05 19:29:38 -07:00
Steve Cohen
568d2b1529 disp: msm: fix data bus bandwidth vote units
Bandwidth vote values were being applied as Bytes-per-second but
the interconnect framework uses Kilobytes-per-second units. Fix
the error by using unit conversion macros provided by the
interconnect interface.

Change-Id: I8bdce2d35afb8d97f200ce40fc1defa8a3be1b75
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-04-05 21:34:07 -04:00
qctecmdr
3fd4d644db Merge "drm: msm: sde: reserve DSC in pairs for 4DSC topologies" 2020-04-03 19:23:57 -07:00
qctecmdr
74ad57500f Merge "disp: msm: sde: add pm_qos support for high frame rate display" 2020-04-03 15:40:45 -07:00
qctecmdr
121d6356e2 Merge "disp: msm: add split-vote support with interconnect" 2020-04-03 13:58:26 -07:00
Narendra Muppalla
690deaec8e disp: msm: sde: add pm_qos support for high frame rate display
Add/remove pm_qos request during sde encoder resource
controller enable/disable for high frame rate and command mode display.

Change-Id: I95fab92de8399d8b892751d654e7913166856cf3
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-04-03 09:52:02 -07:00
qctecmdr
a4d36867eb Merge "disp: msm: sde: ensure string buffer is properly terminated" 2020-04-03 05:36:11 -07:00
qctecmdr
7e1ca767cf Merge "disp: msm: remap dmabuf attach during secure transitions" 2020-04-03 03:59:17 -07:00
qctecmdr
1cb8cc4490 Merge "disp: msm: enable debugbus support for MDSS 7.x derivatives" 2020-04-03 02:41:54 -07:00
qctecmdr
4ac0b88638 Merge "disp: msm: sde: add encoder helper to get kms" 2020-04-02 00:11:24 -07:00
qctecmdr
2942529106 Merge "drm: msm: fix active pipe index" 2020-04-02 00:11:24 -07:00
Abhijit Kulkarni
b96cd591ed disp: msm: sde: add encoder helper to get kms
This change adds helper to retrieve the kms from
the drm_enc structure and provides additional error
checking which can be avoided in the callers.

Change-Id: Id8ba07a2d48a605dd4ce846e5d61f302e5861b4d
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-04-01 22:33:06 -07:00
Abhijit Kulkarni
70595d8eda disp: msm: sde: move dsc configuration into helper
This change moves the dsc configration programming into
a helper to improve the readability of the code and reduce
the cyclomatic complexity.

Change-Id: I6706e2036fa9208e6c930be97a875b89db689108
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-04-01 22:08:08 -07:00
Gopikrishnaiah Anandan
33404efc1c drm: msm: fix active pipe index
Active pipe index will be incremented when free entry is found with the
current implementation. All the indexes will not be used and there is need
to have special handling for last index with current implementation.
Change adds a break in the loop and simplifies the handling.

Change-Id: Ic74ad2aef791ba9c81acb19e85f44edf4d59e434
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2020-04-01 18:18:31 -07:00
qctecmdr
76d89c1e24 Merge "disp: msm: add support for no blend planes" 2020-04-01 17:45:16 -07:00
Steve Cohen
85c0c75dd7 disp: msm: add split-vote support with interconnect
Add support for parsing ebi and llcc data busses for split vote
support as only the mnoc interconnect data bus was getting
parsed correctly.

Change-Id: I331bbcb0c61b341d935882f5560702f6317fc2a7
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-04-01 19:50:19 -04:00
qctecmdr
6b664b94bc Merge "Revert "disp: msm: sde: cache vbif QoS parameters"" 2020-04-01 13:29:29 -07:00
qctecmdr
e6bbb3c104 Merge "disp: msm: sde: enable pu checks only if main feature is set" 2020-04-01 13:29:29 -07:00
qctecmdr
3a94095a86 Merge "disp: msm: sde: update uidle wd timer load value" 2020-04-01 13:29:29 -07:00
qctecmdr
b44c7803a0 Merge "disp: msm: sde: avoid solver mode if autorefresh is enabled" 2020-04-01 04:44:47 -07:00
Gopikrishnaiah Anandan
078d42797b disp: msm: add support for no blend planes
Some of the features in the DPU hardware needs planes to be staged but
it should not be blended in the layer mixer. Change adds support for drm
driver client to set the blend type on the plane and updates driver code
to skip staging the plane.

Change-Id: I1e8c7f6ce5617820ea8b24419e0d4d27b481819b
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2020-03-31 14:07:49 -07:00
Gopikrishnaiah Anandan
a337e44c28 msm: sde: demura support for register dma
Demura block of dpu will use the register dma path for programming.
Change updates the register dma frame-work to allow programming of the
demura block.

Change-Id: Ie5a64df1b2fffcb84d9554e5211249892ed2d96d
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2020-03-31 14:05:24 -07:00