Wykres commitów

50 Commity

Autor SHA1 Wiadomość Data
Tatenda Chipeperekwa
4571b23507 disp: msm: dp: use the new altmode framework
Use the new altmode framework to receive the connect, disconnect
and attention events.

Change-Id: Ic542525b526e1abd0f153c293bca6e4cdbb6bf0b
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-03-13 20:26:39 -07:00
Tatenda Chipeperekwa
37412f5add disp: msm: dp: add support for PLL programming
Add support for PLL programming in the DisplayPort driver.

Change-Id: I4f08a621dcae5d1f54d67bb5c34409249012cc7b
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-03-13 20:26:39 -07:00
Abhinav Kumar
2e1c9a0751 disp: msm: remove drm_connector usage for colorspace
Move away from using the supported colorspaces in drm_connector
and replace it with sde_connector to satisfy GKI requirement.

Change-Id: I947c91ea6672e242e572151f72cf0db2e71990cb
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2020-02-19 14:32:02 -08:00
Tatenda Chipeperekwa
6f0828d9a7 disp: msm: dp: update mode validation logic for widebus
Update the mode validation logic by halving the mode clock
when widebus is enabled.

Change-Id: I8f060d8b60403aa5020496983bec0b3e2878b08b
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-02-10 11:31:50 -08:00
Abhinav Kumar
27844b7b60 disp: msm: dp: remove usage of compression ratio enum from DP driver
As overall display driver is moving away from hard-coded compression
ratios, prepare the DP driver for the same by removing the usage of
the compression ratio enum.

Change-Id: I298db7d20baed8afec9f96dff8c7e950702bfec9
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2020-01-29 13:46:46 -08:00
Abhijit Kulkarni
acb8d98e66 disp: msm: use upstream dsc config data
This change enforces dp, dsi and the sde drivers to use the
drm framework defined dsc_config data structure. As a part of this,
it introduces the sde_dsc_helper API to configure the dsc params
and creating a PPS command. Earlier each driver implemented it's
private versions leading to duplication of code. Additionaly the
helper api supports DSC spec 1.2 422 and 420 mode.

Change-Id: I25933fab08cdabbc6787079926885d1a78945e97
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-01-22 12:33:24 -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
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
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
0d5759feb9 Merge "disp: msm: dp: remove session lock for power state update" 2019-09-19 19:36:26 -07:00
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
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
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
qctecmdr
28022d54f0 Merge "disp: msm: dp: fix dp_display module's state 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
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
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
Abhinav Kumar
14e02e4b02 disp: msm: dp: add colorspace property for MSM DP
Add the colorspace property for DP controller for MSM. Also, change
the default method to send the colorimetry information to the sink
from MISC bits of MSA to VSC SDP packets if the sink supports it. This
helps to avoid dynamic switches between the packet types for sending
the colorimetry information during BT2020 and DCI-P3 use-cases.

Change-Id: I7ddf879a187b023fcf7404d64028e4d19b031119
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2019-07-24 17:24:27 -07:00
Abhinav Kumar
c79760ba97 disp: msm: dp: populate supported colorspace property for DP
Populate the supported colorspaces property for DP
as part of getting the display modes.

This will expose the supported colorspaces of the sink to
userspace and in-turn the userspace shall pick the colorspace
suitable for the use-case.

Change-Id: I70408c719610bc63f9c06dad8cd50f7fa5d94908
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2019-07-24 13:54:00 -07:00
Satya Rama Aditya Pinapala
aacd9e9585 disp: msm: dp: adding prefix for logs
Adding prefixes for error, debug and info
messages in dp files. To enable debug logs
run "echo 0x100 > /sys/module/drm/parameters/debug"

CRs-Fixed: 2493739
Change-Id: Ibf509e837f527be6bff6b7a1c34b0cde2921b388
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2019-07-23 09:14:04 -07:00
Ajay Singh Parmar
59008eabf8 disp: msm: dp: split host init and deinit
Break the host initialization and de-initialization to
create late initialization and early de-initialization.
Call host init/deinit on physical connect/disconnect only
As attention messages from sink doesn't change the physical
cable configurations, call only late init/early deinit in
this case to avoid unnecessary hardware resources
re-initialization.

CRs-Fixed: 2490128
Change-Id: Ib930d250724ab3ea811a7388c7ad0aeae1164e21
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2019-07-19 13:45:56 -07:00
qctecmdr
b700d98e0e Merge "disp: msm: dp: filter modes based on sde resource availability" 2019-07-12 16:50:22 -07:00
RAJAT GUPTA
31aadfab0e drm/msm/dp: remove qfprom reference from dp driver
Remove qfprom regmap reference from DP driver as it is not
used anymore.

Change-Id: I2e90363a68e50e24a07b0f2d173c14de5ff513cc
Signed-off-by: RAJAT GUPTA <rajatgu@codeaurora.org>
2019-07-12 16:13:24 +05:30
Tatenda Chipeperekwa
c36e7e01be disp: msm: dp: update the connected state during clean up
Update the connected state to false during display clean up. This
will allow subsequent connections to be processed correctly in
the face of disconnect failures due to unresponsive user mode
clients.

Change-Id: If30f5d722bf742060c9d4d2dec2207d7baf27fc2
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2019-07-09 17:42:42 -07:00
Tatenda Chipeperekwa
d2c24e44e2 disp: msm: dp: disable audio during display clean up
Disable audio for every active panel during display clean
up use cases when the driver times out waiting for the
video path to tear down. This ensures that the audio
subsystem is notified before the clean up shuts down the
timing engine, and also ensures that the audio module
state is correctly updated to indicate that the session
has ended. This change will reduce the likelihood of the
audio subsystem attempting to program DP audio, and also
ensure that the state checks will correctly prevent any
attempts to program audio after the session has ended.

Change-Id: I937f894e80b55164f9700f021d852863aeb18959
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2019-07-09 17:37:52 -07:00
Nilaan Gunabalachandran
98434934c6 disp: msm: dp: filter modes based on sde resource availability
Not considering the currently available sde resources and
caps while filtering/validating a mode will report unavailable
modes and result in an atomic commit failure.
DP should calculate the number of required lms and verify
if lms/3dmux are available before a validating a mode.

Change-Id: Idadcc655c30f5a831c47cf22b60085052b5b9fcd
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2019-07-02 17:34:55 -04:00
Fuad Hossain
15bbd57eff disp: msm: dp: Improvements to dp mst simulator mode
Improve dp mst simulator mode by adding support
for up to 8 connectors, the ability to add and
remove ports dynamically, and allowing for
different EDIDs for each connector.

CRs-Fixed: 2459530
Change-Id: I945e3292a7e5150ab7a6bbe0addc4f4f46d58e82
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-06-07 15:03:05 -04:00
Samantha Tran
3be27eafcc disp: msm: snapshot of msm and sde driver
This snapshot ports changes from 4.14 to 4.19 into
the msm and sde layer. Snapshot was taken as of
commit 0f8fb25421ff ("cnss2: Add device version to
SOC info structure").

Change-Id: I59b799a78319c2db6930a2a10bc38976f8c09898
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-05-22 13:08:31 -07:00
Fuad Hossain
ac1149d273 disp: msm: dp: perform mst phy operations during suspend resume
Perform mst phy operations during suspend/resume
to allow sinks to be in a correct state. A usbpd
api must also be called before and after the phy
operations to allow the system to go into deep
suspend and resume in a timely manner.

CRs-Fixed: 2363921
Change-Id: Ie21ef9b1caf2044e598466373a6059d2a1e5e58c
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-05-15 14:39:37 -04:00
Xiaowen Wu
162fff1195 drm/msm/dp: add extra 100ms sleep when MSTM_CTRL is not cleared
Add extra sleep between SST and MST mode if MSTM_CTRL is not cleared
at hpd to make sure dongle exit from previous MST state.

CRs-Fixed: 2411911
Change-Id: I5b1785c71a91df95167bf5083e9d752a275872a8
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-05-09 13:26:08 -04:00
qctecmdr
e683dcbce3 Merge "disp: msm: Ensure clean slate when starting and stopping HDCP" 2019-05-06 21:06:29 -07:00
Christopher Braga
7e9b80092b disp: msm: Ensure clean slate when starting and stopping HDCP
The DP HDCP layer fails to wait on and clear its internal thread
upon an HDCP stop or failure. This can result in use after free
failures if a read or write over aux channel operation is already
queued.

Update the DP HDCP layer to stop and wait on kthread completion
upon HDCP failures, and clear the kthread command queue before
resuming kthread execution. Additionally, ensure the SDE HDCP
worker thread correctly starts and stops execution upon HDCP
enablement and disablement respectively.

Change-Id: I4218d7935f89416b5e5d74afd8f5d22e031b9a38
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2019-05-06 14:56:26 -04:00
qctecmdr
8c8fad0d91 Merge "disp: msm: dp: Update sink sync check to be disabled by default" 2019-05-03 11:36:05 -07:00
qctecmdr
f8090586ac Merge "disp: msm: dp: Avoid double authentication if first is still in progress" 2019-05-03 09:51:06 -07:00
qctecmdr
c0035372e5 Merge "disp: msm: dp: Prevent disconnect from stopping HDCP" 2019-05-03 02:04:49 -07:00
qctecmdr
366772ec9e Merge "disp: msm: dp: fix potential delay to start authentication" 2019-04-29 12:47:57 -07:00
qctecmdr
ea09882191 Merge "disp: msm: hdcp: force encryption for HDCP 1.3 compliance" 2019-04-29 12:20:16 -07:00
Tatenda Chipeperekwa
d113b3292e disp: msm: dp: fix potential delay to start authentication
Start authentication as soon as the stream is successfully powered
on and before the audio notification is sent. This will avoid a
potential delay in starting authentication if the audio subsystem
does not respond to the audio notification.

Change-Id: I83e5746ff521cfe8641f6e2bffd1bed953329a69
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2019-04-25 19:43:31 -07:00
Tatenda Chipeperekwa
bd8fff4f9f disp: msm: hdcp: force encryption for HDCP 1.3 compliance
Force encryption for HDCP 1.3 compliance or HDMI use cases only
since DisplayPort supports dynamic encryption enable.

Change-Id: Ice0f462188e4cc96597a4779a6daca7877e36b6c
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2019-04-25 19:43:31 -07:00
Christopher Braga
78439dfaf7 disp: msm: dp: Update sink sync check to be disabled by default
The DP standard leaves ambiguity to if sink synchronization
will be set before auxiliary protocols such as HDCP are to begin.
Update the dp_display HDCP worker  to check sink sync only if
explicitly instructed to via the new debugfs node 'hdcp_wait_sink_sync'

Change-Id: I4f4d0b14096aa3dc498e47de557de14092d37a58
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2019-04-24 17:42:15 -04:00
Christopher Braga
c24090b2c5 disp: msm: dp: Avoid double authentication if first is still in progress
In scenarios where two streams become active in a short time period, HDCP
authentication may incorrectly be kicked off twice. This occurs due to the
HDCP state machine not indicating when authentication is already in
progress.

Update the dp_dispay HDCP state machine to only transfer to the
authenticating state once authentication has begun.

Change-Id: I38211203afe5127b80353c02072032a56e518900
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2019-04-24 17:42:14 -04:00
Christopher Braga
9b4453096a disp: msm: dp: Prevent disconnect from stopping HDCP
If a DP stream is disconnected when HDCP is not fully authenticated,
authentication may not continue for remaining streams. This occurs
due to the worker thread rescheduling itself on auth fail while
disconnect cancels any pending work.

Update disconnect logic to wait for HDCP authentication to complete
before stream de-registration, and reschedule the HDCP worker if HDCP
did not fully authenticate prior to disconnect.

Change-Id: I0f8934e4f34e4f5a8015587e852131795a3dad21
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2019-04-24 17:42:13 -04:00
Christopher Braga
c828b764c8 disp: msm: dp: Avoid HDCP cleanup during system suspend
Calls to QSEECOM are disallowed when the system is heading
into a suspend to RAM state. Delay all HDCP cleanup until
after resume to ensure HDCP is properly handled.

Change-Id: I7ebf567e50c28d39fc3c99dcb5d571a5d1e8dd93
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2019-04-24 17:42:09 -04:00
Dhaval Patel
a74d2cf7fa disp: msm: add runtime_pm ops support in drm driver
Add runtime_pm ops support in drm driver instead
of direct sde_power_resource_enable/disable call.
It allows drm driver to use runtime pm refcount logic
to track the resources instead of custom implementation.
The change also removes the NRT_CLIENT support from
sde_power_handle code to simplify it further.

Change-Id: Ib14692dca5876703d0a230da2512d731b69b8ebb
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2019-04-24 13:27:48 -07:00
Narendra Muppalla
3709853456 Display drivers kernel project initial snapshot
This change brings msm display driver including sde,
dp, dsi, rotator, dsi pll and dp pll from base 4.19 kernel
project. It is first source code snapshot from base kernel project.

Change-Id: Iec864c064ce5ea04e170f24414c728684002f284
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2019-04-14 22:20:59 -07:00