提交图

123 次代码提交

作者 SHA1 备注 提交日期
qctecmdr
c7ec7ac299 Merge "disp: msm: dp: fix mode filtering for 4K120" 2021-03-30 02:33:20 -07:00
qctecmdr
19e9831a45 Merge "disp: msm: sde: modify SDE_DBG_DUMP to use blk_mask instead of blk_name" 2021-03-25 14:22:21 -07:00
Amine Najahi
2c98ff7194 disp: msm: dp: fix mode filtering for 4K120
Currently, 4K120 mode is being filtered by DP driver
due to invalid topology assignation. When 4 LMs are
needed, the number of DSCs must match the number of
LMs since only DSCMERGE based topologies are supported
for driving DSC capable panels.

This change fixes the topology validation logic and
aggregates LM and DSC validation functions in the topology
one since the number of LMs and DSCs must now be considered
in calculating the topology requirement.

Change-Id: I95577eabb34068cd490d23e70ffbb899d1c2d03a
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-03-24 09:48:03 -04:00
Tatenda Chipeperekwa
c6257272d4 disp: msm: fix compilation errors for dlkm compilation
Fix dlkm compilation errors that are due to the use of -Werror
flags used by the build system.

Change-Id: I5e1e9bc63c1361d73e4930aab123212717872ecb
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2021-03-22 15:25:36 -07:00
Veera Sundaram Sankaran
5bbf449148 disp: msm: sde: modify SDE_DBG_DUMP to use blk_mask instead of blk_name
Currently, SDE_DBG_DUMP takes any number of hw block names along with
few defined strings as arguments. This set of arguments is used to
determine which HW block registers needs to be dumped. Move to a
blk bitmask to avoid passing a large set of arguments. The bitmask is
split based on the clks required to access the HW block for ease of use.
The lower 0-23 bits are used for HW blocks which can be accessed by just
enabling the MDP clks. DP is kept separate as it needs DP specific
clks to be enabled. Add a debugfs node through which the mask can be
modified, which can be useful while using the debugfs dump option to
force a panic.

As part of the change, remove in-log/in-mem enable mask debugfs node
for every debugbus and use a single node to control the logging
mechanism for all the HW blocks debugbus.

Change-Id: Ibb6354b3e3265c9911104bb0f964616eb8a898c9
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-03-19 16:50:45 -07:00
Veera Sundaram Sankaran
84ec84696e disp: msm: add dp register & debugbus dump support
Add support to the dump the DP register space and debugbus information.

Change-Id: I903471b07fdd1926b0fc505a980b2a5048387b69
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-03-08 14:38:28 -08:00
qctecmdr
1269ba8e88 Merge "disp: msm: dp: fix disp_cc offsets for pixel clk dividers" 2021-03-02 13:25:08 -08:00
Sudarsan Ramesh
e66a2089f4 disp: msm: dp: update pll driver to fix clock names per target
With the change in the clock names for newer targets, this fix
updates the driver to support different clock names per target.

Change-Id: I58c35fce34356f8c79adb0ac8a907e2fb60813ae
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-03-01 11:09:15 -05:00
qctecmdr
17a3f3cbea Merge "disp: msm: dp: fix dsc resource bookkeeping for mst" 2021-02-23 07:25:38 -08:00
Xiaowen Wu
67ce55687b disp: msm: dp: optimize sim function handling in dp_debug
Remove edid/dpcd simulation function from dp_debug and calls to
sim bridge instead to simplify dp_debug module. Also add mst edid
support and mst hpd simulation from aux level.

Move selected mode from dp_debug module to dp_panel module to
simplify mst handling and decouple dp_debug from main dp driver.

Remove custom edid/dpcd mode from dp_panel and dp_aux module.
Remove mst connector list handling from dp_display module.

Change-Id: Ife1d2deb0e353f0a9695b7b90e5bf3459e1c81f7
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Karim Henain <khenain@codeaurora.org>
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-02-12 14:18:50 -05:00
Xiaowen Wu
467443d7e3 disp: msm: dp: use dp_msm_sim for dp-mst simulation
Revert changes in dp mst topology manager and use dp_msm_sim bridge
at aux layer to implement dp-mst simulation.

Change-Id: I863649f901ac918f65c9078e6a2f1b6931d19e3a
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Karim Henain <khenain@codeaurora.org>
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-02-10 22:34:33 -05:00
Xiaowen Wu
52edf46bbd disp: msm: dp: add dpcd/edid support to dp aux simulator
Add dpcd/edid support to dp aux simulator to enable below features
as options:

  skip edid read
  skip link training
  skip dpcd read
  skip dpcd write
  skip hot plug
  skip sideband message

Also added debugfs support to update dpcd/edid and enable/disable
above features.

Change-Id: Ifa9153f2f00442f3cd5ee3db63fa93384ebc638f
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Karim Henain <khenain@codeaurora.org>
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-02-10 22:34:33 -05:00
Xiaowen Wu
bdf97a004b disp: msm: dp: add dp aux bridge framework support
Create the framework to support external dp aux bridge device which
can handle DPCD/I2C/HPD from external.

Change-Id: Iabd0998efc8bf7134d186b1751d219c00217385c
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Karim Henain <khenain@codeaurora.org>
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-02-10 22:34:33 -05:00
Sandeep Gangadharaiah
ed103ed1ef disp: msm: dp: fix dsc resource bookkeeping for mst
DP driver maintains the number of allocated DSCs per stream for managing
the availability of DSC blocks for each stream. In the current driver,
if there are errors in the disable path, it is possible for the refcount
to go negative thereby affecting the availability of DSC blocks in
subsequent enables.

This change fixes the refcount logic by making sure the DSC count in the
context correctly reflects the usage.

Change-Id: Id595ec87c186ddb3ed300e1390384f367ef79148
Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
2021-02-10 09:54:54 -05:00
Christina Oliveira
6092206a12 disp: msm: dp: add support to request dp link clk through mmrm
This change adds the support to request the dp link clk rate
through the mmrm driver. In the case the system can not
support the rate, user space is notified of the failure and
dp is diconnected.

Change-Id: I4a074054ce42425ca940d4aec505723724736b44
Signed-off-by: Christina Oliveira <coliveir@codeaurora.org>
2021-02-08 12:55:12 -08:00
Linux Build Service Account
9f1d12098e Merge "disp: msm: dp: replace dp clock trees with single nodes" into display-kernel.lnx.5.10 2021-01-13 14:24:34 -08:00
Amine Najahi
08358fd857 disp: msm: remove use of drm_display_mode vrefresh
Use of drm_display_mode vrefresh is being deprecated in
upstream DRM framework. Downstream driver need to use
drm_mode_vrefresh API from now on.

This change removes dependency on drm_display_mode vrefresh
and replaces it with drm_mode_vrefresh API in SDE, DSI and
DP driver. In addition, it also modifies drm_display_mode clock
to align with upstream approach where an uncompressed mode clock
is required to match drm_mode_vrefresh API.

Change-Id: Ie972a2e140adfd81c4e68df8e7bc69feaaca22e1
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-01-13 16:08:27 -05:00
Yuan Zhao
600416fa77 disp: msm: dp: replace dp clock trees with single nodes
The current pll driver models the entire DP clock
hierarchy using the clock framework. This creates
unnecessary dependency between the dp driver and
the clock driver and also limits the flexibility
to dp driver when configuring the DP clocks.

This change models these clocks as single nodes
and provide full control to the dp driver and
also minimizes the dependency on the clock driver.

Change-Id: Id5221441ea33b576e7c543396a12cbeb7b44d319
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2021-01-13 01:18:08 -08:00
Samantha Tran
790eda032e disp: msm: drmP.h removed, add new headers
Commit ("drm: delete drmP.h + drm_os_linux.h") removes the
drmP header file. This changes updates the msm driver
by adding the individually required header files.

Change-Id: I360aa028c2ce75317d33da988b36164041177014
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 09:50:47 -05:00
Sankeerth Billakanti
0386ae3a6b disp: msm: dp: handle link maintenance failures
Audio off is done before handling link maintenance
requests from sink or receiver. After handling the
link maintenance, audio is enabled without
verifying the success condition of the link
maintenance. If the link maintenance fails, then the
DP link will not be established and source will
not send video data. So, there is no need to
enable audio.

This change will skip the audio enable portion of
the code whenever the link maintenance fails. The
sink may eventually issue another irq_hpd to retry
the link training.

Change-Id: I1e9aab07d6465ab1b5e6f92717ef7288dc85068f
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2020-12-07 00:07:54 -08:00
Abhinav Kumar
6db41ed532 disp: msm: dp: add support for continuous PPS command
Add support to send PPS command with every frame for DP.
This is needed to satisfy the requirement of certain bridge
chips which need the PPS to be sent every frame.

Change-Id: I8711dff41e60d8b1e1c515a5d34a370a2409ce14
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2020-11-24 18:16:28 -05:00
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
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
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
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
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
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
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
Rajkumar Subbiah
d767013a10 disp: msm: dp: update mst connector in debugfs data on replug
The debugfs api for mst control is a multi stage process where the
connector id is selected using the mst_con_id node, which is then
used on other commands such as edid_modes_mst for mode switch.
During mode switch control, the mode is set using the current id
for a display and then the switch is initiated through an unplug
and replug. But on an unplug the connector is destroyed and a new
id is assinged for that display on the subsequent plug. This
change detects this scenario and updates the cached connector id
with the id from the newly created connector.

Change-Id: Ib51566ac9e334d4a0b145b6ae549c59c537cb0cd
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-07-28 12:54:05 -07:00
Rajkumar Subbiah
65534be8da disp: msm: dp: update hpd handling for mst
On hpd low signaling, if MST is enabled, then the dp driver should
send the uevent to usermode and wait for the displays to be turned
off before destroying the connectors. In the current mst driver,
hpd low handling is a monolithic step. This change breaks this
into two separate callbacks into the mst driver so the display
driver can wait for usermode completion between these two steps.

When processing hpd low in sim mode, the mst driver uses the drm
framework's the port detection function. When hpd unplug is signaled
to the usermode, it checks the port status before disabling it. But
since the port hasn't been destroyed yet, the framework reports that
the port as still connected. This causes the driver to timeout while
waiting for the the displays to be disabled. This change adds a
wrapper which will report the port status as disconnected when hpd
low is signaled.

Change-Id: I1c59a4878018a300f258bd67c36d1cf4eaf5f67b
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-07-28 12:53:56 -07:00
qctecmdr
b41ee8cf11 Merge "disp: msm: dp: ensure display is disabled before deinit" 2020-07-23 16:20:44 -07:00
qctecmdr
de02324782 Merge "disp: msm: dp: remove check for peer_usb_comm" 2020-07-15 15:11:45 -07:00
Rajkumar Subbiah
853e959f4d disp: msm: dp: ensure display is disabled before deinit
When hpd disconnect is received, the dp driver sends an uevent to
usermode and waits for the usermode to tear down all external displays
before turning off the dp link. If the wait for uevent completion
times out or exits prematurely due to a race condition with the
connect path, it is possible for the dp link to be turned off
prematurely, with displays still in enabled state. On a subsequent
hpd disconnect, the driver attempts to disable the display causing
this issue since the link has been already turned off.

This change adds a check for display status after uevent handling and
before turning off dp link, to make sure the displays are always
cleaned up before the link is turned off. Any future attempts to
disable from usermode will be ignored.

Change-Id: I404ad90b037fede9c9469a2fd16ca1fbdbd36b7c
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-07-15 09:45:31 -04:00
Rajkumar Subbiah
2ba9bd9434 disp: msm: dp: skip dp disconnect if already in progress
When dp disconnect is triggered, as part of the teardown process, the
driver sends a notification to audio driver and waits for the audio
driver to complete before proceeding. When back to back disconnects
are triggered currently there is no check if a disconnect is already
in progress. So the driver ends up reinitializing the signal
completion that the previous disconnect thread is waiting on causing
this issue.

This change adds a check at the beginning of disconnect handling and
bail out if a disconnect is already in progress.

Change-Id: I2eaee339408d9dbc120f8efc14d86fca0ebb0758
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-07-15 09:44:36 -04:00
qctecmdr
a995ee8ca1 Merge "disp: msm: dp: cleanup in GKI module unload path" 2020-07-15 04:44:36 -07:00
Tatenda Chipeperekwa
5ed32bb41f disp: msm: dp: remove check for peer_usb_comm
Reset the QMP PHY into DP-only mode only when the adapter/cable
connected is not multi-function capable. We remove the
peer_usb_comm check since this flag is not being updated when
the cable is connected.

Change-Id: Iafbdf73b3ef827b757b51bfadfa6fa16b840ac27
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-07-13 18:14:17 -07:00
Tatenda Chipeperekwa
91fbf98537 disp: msm: dp: fix potential NULL pointer dereference
Fix the potential NULL pointer dereference in the callback function
for HDCP status updates.

Change-Id: I57ffc480cc6a8f89db0d18151a07876aeeb8c236
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-07-08 12:02:39 -07:00
Orion Brody
7abc2b5b81 disp: msm: dp: cleanup in GKI module unload path
Adds null check to address segmentation faults.

Change-Id: Iafb073b88f6b52d1409b3c745bd95c69ea72ec92
Signed-off-by: Orion Brody <obrody@codeaurora.org>
2020-07-01 17:25:19 -07:00
Tatenda Chipeperekwa
3efe89facb disp: msm: dp: log the status of the uevent
Log the status of the call to kobject_uevent_env so we know
whether the uevent was sent successfully to the userspace.

Change-Id: I4fd5f9b51d9771dab399e322d678411f824c8aba
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-06-12 13:56:39 -07:00