نمودار کامیت

325 کامیت‌ها

مولف SHA1 پیام تاریخ
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
Rajkumar Subbiah
741ff9062f disp: msm: dp: init and deinit the lock in dp_mst_connector_list
The lock used by the dp debug driver to synchronize the maintenance
and usage of the list of mst connectors is not initialized. This
change adds the missing initialization and deinitialization calls.

Change-Id: I4c24600b47c0b90c256caff45edaea07d082908d
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-08-19 12:31:37 -04:00
Linux Build Service Account
b18fe5bc7e Merge "disp: msm: dp: enable INTF to DP drain rate matching" into display-kernel.lnx.5.4 2020-08-19 01:43:14 -07:00
Linux Build Service Account
3ee8c55695 Merge "disp: msm: dp: fix DP controller bpc configuration when DSC is enabled" into display-kernel.lnx.5.4 2020-08-19 01:42:13 -07:00
Sudarsan Ramesh
7b798deb9b disp: msm: dp: fix mst port state reporting on hpd unplug
The simulation case uses dp_mst_sim_detect_port which
calls the drm detect port function after checking
the mst state. The non simulation case calls the drm
function directly.

This leads to cases in the disconnect path where
connectors are detected while being unregistered.
This solution merges the simulation and non simulation
cases by using the same detect port function, where a
check for mst state is performed before calling the
drm function.

Change-Id: I4a93001131beda54f8146bd50edc036924c94ab1
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2020-08-18 18:11:43 -04:00
Rajkumar Subbiah
9522cd1382 disp: msm: dp: use base connector properties for mst connectors
When DRM property objects are created, the DRM framework attaches a
dellocator which can eventually free the object when the last reference
is removed from it. The framework can only do this before the driver is
registered. If a property is created after the registration then the
framework is unable to attach a deallocator causing a memory leak during
tear down.

The current DP driver creates a new colorspace property whenever a
new dp connector is initialized. It creates a base connector at probe
time prior to registration. But then it also creates new connectors,
post registration, whenever a new MST dongle is attached to the
topology, causing memory leaks.

This change limits the property creation to the base connector and
attaches the same object to MST connectors to avoid memory leak.

Change-Id: Ib97dc7aac260b4f3f96c1097f58bd276c68501f8
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-08-17 21:20:04 -04:00
Amine Najahi
ecc12cd5d2 disp: msm: dp: enable INTF to DP drain rate matching
Enable DP controller hardware feature to modulates the
data drain rate between DP and INTF to reduce chances
of MDP Underflow or DP Overflow.

Change-Id: I7214a2fff957ae35b31c660bafa1d0141eb50680
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-08-17 13:14:17 -07:00
Amine Najahi
c50713a509 disp: msm: dp: fix DP controller bpc configuration when DSC is enabled
When DSC is enabled, dp controller uses the 8bpc data format to
transfer the data irrespective of the actual input bpc to DSC.

Change-Id: I817093e9726d013f0402bfdddfbccec59a900acc
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-08-13 19:03:10 -04:00
Sankeerth Billakanti
227f33ecaf disp: msm: dp: correct the dp_usbpd driver logging
Correct the peer_usb_comm log message in dp_usbpd sub module.

Change-Id: Iafa49dedcca0d7c8fe84d839a13ed40e69a9552b
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2020-07-31 08:55:21 -07:00
qctecmdr
c425894675 Merge "disp: msm: dp: use updated pre-emphasis/voltage settings" 2020-07-29 23:42:54 -07:00
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
Tatenda Chipeperekwa
d4c2d70e14 disp: msm: dp: use updated pre-emphasis/voltage settings
Use updated settings for the DP controller versions above
v1.2.3.

Change-Id: I957071e81e0f7dfd149495df0a225301078aaf60
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-07-21 12:51:20 -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
Krishna Manikandan
47e6acb39d disp: msm: dp: fix compilation issues for dp
Add required changes to fix compilation errors
when dp driver is disabled.

Change-Id: I84de1268e5f9a892d838f35e27773566dc82ef03
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2020-07-13 18:30:14 +05:30
qctecmdr
2310f221c0 Merge "disp: msm: dp: update voltage swing and pre-emphasis" 2020-07-11 23:40:50 -07:00
Rajkumar Subbiah
202c7e55c8 disp: msm: dp: fix refcount issues on mst port disconnect
MST simulation ports can be removed either through HPD unplug, which
removes all ports on the branch device or through hpd irq, which
removed individual ports. In the current driver, the mst state
on the topology manager is being cleared prematurely. This results
in incorrect port status values being reported when the usermode
queries the status prior to disabling the corresponding displays.
So in its current state, on a HPD unplug, the display is disabled
but the port objects are not cleaned up and new ports are added
on every replug.  On hpd irq, not all references are removed on
the port object and also the connectors are prematurely being
removed from the connector list. Additionally, when the last
port is removed, the mst state is cleared on the topology manager,
which destroys the branch device. Once the branch device is
destroyed, the ports cannot be added anymore and this leaves the
MST driver in an invalid state.

This change adds a new helper to remove the port and update the
connector list. It also moves the clearing of mst state to hpd
disconnect callback where the branch device can be safely destroyed.

Change-Id: I3400006a47cc8ab5876809a19b711e3b26be857c
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-07-10 17:38:40 -04:00
Rajkumar Subbiah
322e50ae8c disp: msm: dp: check branch device when adding mst sim port
When adding a new MST sim port check if the branch device was
destroyed already to avoid dereferencing a null pointer.

Change-Id: I8e6f82c5a6772a9b85d24feca52368da2027e96d
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-07-10 17:25:14 -04: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
e60a0a35f8 disp: msm: dp: update voltage swing and pre-emphasis
Update the voltage swing and pre-emphasis settings based on the
latest hardware programming guide.

Change-Id: If90db2833aba2bd0613276eff22f850bf34859e5
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-06-30 14:32:59 -07:00
Linux Build Service Account
1a94387741 Merge "disp: msm: dp: log the status of the uevent" into display-kernel.lnx.5.4 2020-06-26 18:54:50 -07:00
Yuan Zhao
c1c2e1ca63 disp: msm: dp: check ERR_PTR when creating a new connector
sde_connector_init will return an ERR_PTR if connector
creation failed, so need to use IS_ERR_OR_NULL to check
the return value.

Change-Id: I4fee5a624261898bbd079c54705e6eaebc71bac6
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2020-06-18 19:49:05 -07:00
qctecmdr
4ebc0e1f34 Merge "disp: msm: dp: add private state to dp_mst_bridge" 2020-06-18 16:02:54 -07:00
Sankeerth Billakanti
a0cc0eceee disp: msm: dp: add private state to dp_mst_bridge
Current dp_mst_bridge has variables that are accessed by both
check phase and commit phase, which causes racing issues. This
change will add private state to dp_mst_bridge to separate check
phase and commit phase.

Furthermore, this change is a partial rollback of commit 2446602565ec
("drm/msm/dp: add private state to dp_mst_bridge") where active_enc_cnt
is removed. In this change we retain the encoder availability check in
mode_valid.

Change-Id: I8ac05cf5f1755375e4e9f34e42dbaea1d23bac64
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2020-06-16 13:30:14 -07:00
Steve Cohen
199065f8be disp: msm: dp: take port refcount for MST sim ports
The single "port" refcount has been split in 2 on 5.4.  MST sim
layer is only getting the topology refcount but never initializes
or obtains references for the memory allocated for this port.
Add the new refcount logic required on 5.4 to MST sim layer.

Change-Id: I6e25c048fa26352c4fb718996514a1ca91432408
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-06-16 13:30:08 -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
qctecmdr
0545182f17 Merge "disp: msm: dp: skip creating dir when debugfs is disabled" 2020-06-12 08:04:21 -07:00
qctecmdr
d81410b268 Merge "disp: msm: dp: update checksum for edid corruption test 4.2.2.6" 2020-06-12 08:04:21 -07:00
qctecmdr
1bb125ecb6 Merge "disp: msm: dp: set aux initial status to abort" 2020-06-12 03:53:37 -07:00
Tatenda Chipeperekwa
11a51b0ef5 disp: msm: dp: return -ENODEV when USBPD module is not enabled
Return ERR_PTR with -ENODEV when the USBPD module is not
enabled. This allows the DP driver to handle the failure
correctly and prevents any potential NULL pointer
dereferencing in the clean up path.

Change-Id: I4fbc559276bebe770a27935243a59c10c1bb5491
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-06-11 12:53:43 -07:00
Rajat Gupta
05a35f8446 disp: msm: dp: skip creating dir when debugfs is disabled
When CONFIG_DEBUG_FS is disabled skip creating root directory.

Change-Id: I97bed925392b781b73687164ca55e6cb09f951fc
Signed-off-by: Rajat Gupta <rajatgu@codeaurora.org>
2020-06-09 14:41:09 -07:00
Amine Najahi
ed868466f5 disp: msm: dp: Extend mode filtering to support 8K
Currently DP driver determines if a mode is DSC capable
based on a DTSI entry and the required number of DSC
to support it. This approach does not scale when there
is an overlap in DSC requirement between DSI displays
and external DP display, thus causing one of the display to
report modes that cannot be supported.

This change compares the resources reserved for DP driver
calculated at initialization time and the currently available
ones to determine the correct number of resources that DP driver
can use. It also adds DSC and topology filtering logic and moves
DSC hardware specific from DP driver to SDE driver.

Change-Id: I8e601de33422b7c6d786826f7bfe152c4af8a6b5
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-06-09 09:17:38 -04:00
Dhaval Patel
83860f0642 disp: msm: pass free dsc and lm availability info to dp
Primary and secondary dsi displays are built-in displays
and they are supported during all concurrency usecases
without resource allocation failure. DP mode filter
logic should provide supported mode information based
on free mdp resources after dsi resource assignment.

Change-Id: I3a9637a91ea1ffcc31997e25caff7f13605283ac
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-06-07 22:57:26 -07:00
Yuan Zhao
8ff0c70237 disp: msm: dp: set aux initial status to abort
Set the aborted flag during module initialization so the default
behavior is to error out on aux transactions. The flag will be
reset when there is a hot plug connect and a sink device is
actually present.

Change-Id: I9e31b9293e817ed951ba5464d403e7178615418f
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2020-06-06 16:04:16 +08:00
Tatenda Chipeperekwa
64f71d1dcb disp: msm: dp: update checksum for edid corruption test 4.2.2.6
The DRM framework has added support to check for and calculate the
correct checksum for test cases in which the EDID is corrupted e.g.
test 4.2.2.6. Update the implementation to use the correct checksum
that is available as a field in the DP connector structure.

Change-Id: Ia9f65926e2c0fb3444aa87a4ac97850fbb4d70f3
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-05-29 15:09:24 -07:00
qctecmdr
d78fbd1952 Merge "disp: msm: dp: Add event logs for HDCP sessions" 2020-05-29 12:33:42 -07:00