Commit Graph

987 Commits

Author SHA1 Message Date
Lipsa Rout
9cf9c8e99b disp: msm: dsi: Fix the total number of modes calculation
This change updates the parsing of timing nodes to check
the mode of operation as video or command. In command mode,
for each timing node, num of supported dfps rate is always
one. Accordingly, update the num_dfps_rate to 1 for
command mode.

Change-Id: I5098c7e0d4d2320609d6e10031eaef78c1d8b3c1
Signed-off-by: Lipsa Rout <lrout@codeaurora.org>
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-04-20 09:59:14 -07:00
Rajeev Nandan
4f53bc1569 disp: msm: dsi: fix physical size truncation of large panel
Panel's physical width/height larger than 255mm is getting
truncated due to type conversion into smaller type.

Change-Id: I826fb2db542146c07d8379951563430b7da8288c
Signed-off-by: Rajeev Nandan <rajeevny@codeaurora.org>
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-04-20 09:59:09 -07:00
Harigovindan P
1b9802c099 disp: msm: dsi: modify handling of debugfs initialization
Add support to allow creation of debugfs node only if
CONFIG_DEBUG_FS is enabled.

Change-Id: I1ae2c4188a99e3ed88f59fc021efc01407bf942d
Signed-off-by: Harigovindan P <harigovi@codeaurora.org>
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-04-19 14:20:12 -07:00
qctecmdr
a1143d12be Merge "disp: msm: sde: remove unnecessary DSPP HW resource check" 2020-04-16 15:32:21 -07:00
qctecmdr
265642fa46 Merge "disp: msm: sde: restart idle power collapse timeout every kickoff" 2020-04-16 15:32:20 -07:00
qctecmdr
da0b8d3812 Merge "disp: msm: sde: skip power events when cont-splash is enabled" 2020-04-16 14:02:26 -07:00
qctecmdr
76c75d3441 Merge "disp: msm: dsi: disable ESD while using swte" 2020-04-15 21:36:04 -07:00
Amine Najahi
8f00f9a40a disp: msm: sde: remove unnecessary DSPP HW resource check
The color-processing partial update check wrongly
assumes that all pipes in a CRTC have a DSPP attached.
This inhibits the use of any LMs without a valid DSPP.

Fix the issue by removing this invalid check since whenever
a DSPP feature is required, the HW resource availability is
already confirmed during the color-processing property validation.

Change-Id: I5b4565865644e4a0fa3d0542a299067f21756863
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-04-15 17:56:00 -07:00
Steve Cohen
f95824d0ec disp: msm: sde: restart idle power collapse timeout every kickoff
Restart the timeline for the idle power collapse delayed work
timer for every resource control kickoff instead of only during
a power state change. This will prevent entering mode2 at
unexpected times during active scanouts.

Change-Id: I001157ff7e6b6246e26d537e30d8617cab9cb463
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-04-14 14:22:17 -07:00
qctecmdr
6947c549ba Merge "drm: msm: sde: Allow reservation of odd number of DSCs" 2020-04-14 10:55:05 -07:00
qctecmdr
a6caceab89 Merge "disp: msm: update sde rscc mode2 sequence" 2020-04-14 06:26:47 -07:00
qctecmdr
55ca989cd8 Merge "disp: msm: hdcp: fix compilation of msm_hdcp module on GKI" 2020-04-13 20:54:42 -07:00
Thomas Dedinsky
b4d4eae01c drm: msm: sde: Allow reservation of odd number of DSCs
Add a check to escape the DSC allocation once the requested
number of DSCs has been reached and a pair is not required
for the last DSC allocated. This issue was introduced when
trying to allow for quad DSC, which broke single DSC use.

Change-Id: I4bc368004f92570d588e76ceb832d63fd3bb15d7
Signed-off-by: Thomas Dedinsky <tdedinsk@codeaurora.org>
2020-04-13 16:02:09 -04:00
Satya Rama Aditya Pinapala
23505c9d70 disp: msm: dsi: disable ESD while using swte
While running the panel in simulation mode using sim-swte, ESD check is
invalid. The change doesn't set the ESD capabilities if watchdog timer
is being used for TE.

Change-Id: I375f369ad4602f21da6151e526e7b6e78fcea524
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-04-13 12:22:31 -07:00
Prabhanjan Kandula
ebc5d6c7da disp: msm: sde: add partial update support for spr block
This change adds support for regdma accelerated programming of
partial update offsets for SPR hw block and validation of ROI
during atomic check based on SPR hw block limitations.

Change-Id: I9e20af4ba7752e8a4af5e9738612c57603163744
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2020-04-13 11:04:03 -07:00
qctecmdr
d94c7aef02 Merge "disp: msm: sde: add pm QoS vote on CPU receiving display IRQ" 2020-04-12 23:31:30 -07:00
qctecmdr
697315b082 Merge "disp: msm: sde: correct line time to include compression ratio" 2020-04-11 15:53:27 -07:00
qctecmdr
a6128a06ce Merge "disp: msm: sde: fix vsync wakeup time" 2020-04-11 14:36:34 -07:00
Samantha Tran
7401ef1995 disp: msm: sde: correct line time to include compression ratio
Current computation of line time does not include compression ratio
from either DSC or VDC. This change stores source bpp and target bpp in
sde_crtc during sde encoder mode set to be used while calculating line
time.

Change-Id: Ib1e045dce17fcf006447d4562b402cc3f214ed8c
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2020-04-10 16:23:38 -07:00
qctecmdr
25062d1965 Merge "disp: msm: dsi: add return code to probe deferral error logs" 2020-04-10 09:39:57 -07:00
qctecmdr
7f3ea3bfbb Merge "disp: msm: dsi: add widebus support for DSI" 2020-04-10 07:07:32 -07:00
Rajkumar Subbiah
56e041919c disp: msm: dsi: add widebus support for DSI
From Lahaina onwards, for compressed DSI output, widebus should be enabled.
In widebus mode, 6 bytes of data are transmitted per pclk.
For uncompressed output, widebus must be disabled to transmit 3 bytes
of uncompressed data per pclk.

Change-Id: I7fc0bdb2e1678152d57b4cbb8295063a2ba8ae73
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-04-09 14:15:13 -04:00
Rajkumar Subbiah
c0d4857a81 disp: msm: sde: adjust intf timing for widebus
From Lahaina onwards, widebus is enabled for compressed DSI stream.
This change adjusts interface timing parameters to account for widebus.

Change-Id: Ie6b739ed2cdb515064e3a94404b3e0fe07755d7e
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-04-09 14:14:55 -04:00
Satya Rama Aditya Pinapala
f93224bc4b disp: msm: dsi: add return code to probe deferral error logs
This change adds return code -EPROBE_DEFER to DSI error logs during
a probe deferral.

Change-Id: I59971ebc319e90d65f64e73149e34ba691441741
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-04-09 10:39:20 -07:00
Thomas Dedinsky
5be3c7a8ce disp: msm: sde: fix vsync wakeup time
Current wakeup time is surpassing next vsync and not being used.
This change will use mdp transfer time calculated by dsi to compute
line time in command mode. In video mode, fps will be used to compute
the line time. This line time will be used with current interface
line count to calculate time until the next vsync.

Change-Id: I0b6fc396711ade95ecf95755a907280309af223e
Signed-off-by: Thomas Dedinsky <tdedinsk@codeaurora.org>
2020-04-09 12:52:45 -04:00
Samantha Tran
e85a88ea01 disp: msm: sde: add pm QoS vote on CPU receiving display IRQ
Add a QoS vote on CPU receiving display interrupt. QoS vote
will prevent that CPU from going into low power mode avoiding
possible interrupt latency. Using irq notifier, display will
receive notification when display IRQ has switched CPUs and
will adjust the vote accordingly. The vote is also removed and
requested whenever display IRQ is enabled or disabled.

Change-Id: I94b4501896b4b20b37deaca90d6b5ff883d56621
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
2020-04-09 22:56:18 +08:00
qctecmdr
15cb70c77f Merge "disp: msm: get reg-bus vote values from device node property" 2020-04-08 09:25:17 -07:00
Tatenda Chipeperekwa
cf0e14d185 disp: msm: hdcp: fix compilation of msm_hdcp module on GKI
Add stub functions for msm_hdcp module in order to prevent
linker issues when CONFIG_HDCP_QSEECOM is not defined, marked
as not disabled or defined as module. Furthermore, a Kbuild
entry for the msm_hdcp.h file so that it is exported.

Change-Id: I0f102bf4c9722d95b897facdab94d83e32f7d29f
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-04-07 23:15:53 -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