Graf commitů

366 Commity

Autor SHA1 Zpráva Datum
Sandeep Gangadharaiah
d3d3794b51 disp: msm: dp: destroy mst topology on unplug
On an MST unplug, the MST topology manager state needs to be cleared
so it can properly destroy the current topology. But since the mst
active state is cleared prematurely in the driver, this call is
skipped and on a subsequent plug-in, the topology manager ends up
using stale topology from previous configuration. Incorrect RAD 
values are used for sideband, causing them to fail.

This change fixes the order of operations, so the topology manager
state is properly updated on unplug. It also removes a duplicate
hpd notification to usermode.

Change-Id: Idcff17be113a361a0b58e54d85957f30d1d4e2d6
Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
2021-10-15 10:02:01 -04:00
Sandeep Gangadharaiah
e3927fdfaa disp: msm: dp: set drm mode clock same as clock value from EDID
Commit Ie972a2e140adfd81c4e68df8e7bc69feaaca22e1 updated the dp
driver to extract the drm mode clock from timing parameters
instead of using the clock value provided by EDID to align the
behavior with DSI driver. But this results in incorrect clock
value if the refresh rate is not an integer value. For rates
such as 59.94 or 29.97, the calculated mode clock value would
be different from what is stipulated by EDID. This change
reverts the mode clock calculation to use the clock value
from EDID.

Change-Id: I3e192ef09d2456fbb1d22a0bf9474ac25ba86c72
Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
2021-09-21 18:06:57 -04:00
qctecmdr
e5ed14f97d Merge "disp: msm: dp: disable ASSR before link training" 2021-09-21 10:25:33 -07:00
Vara Reddy
087390da0d disp: msm: dp: disable ASSR before link training
Power on reset value of DPTX_CONFIGURATION_CTRL.ASSR (alternate scrambler
seed reset) is high. Which will cause link training 2 to fail with TPS4 pattern.
Change disables this before link training starts.

Change-Id: Iee95de04625658254b242afdcbba6db24a52606d
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2021-09-21 00:02:58 -07:00
Sandeep Gangadharaiah
edd46a2a54 disp: msm: dp: retry the request to set USB mode during bootup
DP driver is requesting USB to release SS lanes very early
during bootup even before USB has fully initialized. As a
result USB driver is returning -11 which will abort DP state
machine. This change will allow DP driver to retry USB request
whenever this error code is received.

Change-Id: I144d16ef4b07016569ba9c04df15610fe3b5e6fc
Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
2021-09-20 13:03:45 -07:00
qctecmdr
0a9759ec0d Merge "disp: msm: dp: read DPCD registers using debugfs" 2021-09-17 03:46:41 -07:00
qctecmdr
7edd9e5faa Merge "disp: msm: dp: check for DP stream during audio teardown" 2021-09-17 03:46:41 -07:00
Rajkumar Subbiah
fba8d96566 disp: msm: dp: check for aux abort in sim mode
In sim mode, the dp driver is not checking for the aux state before
processing an aux request. This ends up causing the drm framework to
unnecessarily wait for 4 seconds while destroying a stream.

This change adds the check for aux state to align with the behavior
of a real sink.

Change-Id: I81900018ac1b403bb1e03fe26206e145694fefbd
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2021-09-15 13:00:58 -04:00
Alex Danila
d521b12b69 disp: msm: dp: read DPCD registers using debugfs
This change adds support for reading the byte at specific DPCD
addresses for physical monitors, similar to the way it is already done in
sim mode.

The read address is taken to be the last written address. Reads return a
single byte unless the address is 0, in which case 20 bytes are returned
to preserve the original functionality.

Change-Id: I43c44d81758c156257bd5dba6bb8f9c08ac948eb
Signed-off-by: Alex Danila <eadanila@codeaurora.org>
2021-09-10 16:36:18 -04:00
Sandeep Gangadharaiah
cda8e4b1dd disp: msm: dp: check for DP stream during audio teardown
Verify if DP stream is still active before accessing dp audio
registers. This would prevent a scenario where audio teardown
flow is trying to access dp audio config registers after dp
has completed the deinit process.

Change-Id: Icbcaa19529fc2fb34e079231c9ef24e15aa7e4f2
Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
2021-09-08 10:58:24 -04:00
qctecmdr
f04eb4120c Merge "disp: msm: dp: use 3dmux when dsc is not available" 2021-09-07 07:12:22 -07:00
Rajat Gupta
7f0f23c35f disp: msm: dp: fix to handle host ready failures
Handle host_ready failures and try to initialize host if not already.
Sometimes customizations for customers causes NOC error as host_ready
doesn't return early upon failure and the customer customization
tries to access aux register to reconfig upon aux failure while
reading EDID. Adding fix will make driver more robust to handle such
cases.

Change-Id: Ifa5c56daa32c4ef366a0e05718495ffcb40b96b3
Signed-off-by: Rajat Gupta <rajatgu@codeaurora.org>
Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
2021-09-01 14:05:43 -04:00
qctecmdr
e8a4a92814 Merge "disp: msm: dp: move fsa init from dp probe to dp hotplug" 2021-08-26 14:23:36 -07:00
Vara Reddy
e0219f400c disp: msm: dp: move fsa init from dp probe to dp hotplug
DP driver, at probe time, checks for fsa probe completion by
registering a notifier callback. The fsa driver performs some
I2C operations at this time. But occasionally, it takes multiple
attempts to complete these I2C transactions,adding huge delays
to display driver probing.If this delay is long enough, then
display usermode services start before display driver probe completes
and as a result, it fails to enumerate any displays.

Since the fsa switch is needed only after an external display is hot
plugged,this change moves the fsa probe check to dp hotplug handler.

Change-Id: I1b592ec3921a0b406ca23142d07e1a7e8b72090e
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2021-08-25 16:36:19 -07:00
qctecmdr
4f0632e798 Merge "disp: msm: dp: check for dp link clocks before accessing dp registers" 2021-08-20 11:01:30 -07:00
Vara Reddy
c57fe2034a disp: msm: dp: check for dp link clocks before accessing dp registers
Add safety checks to check for dp link and core clocks before accessing
the main control registers during dp teardown or dp setup.

Change-Id: Ic80050b7c1cec59d7fc27a1c5f12fa1b244f86fb
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2021-08-18 22:24:32 -07:00
Rajkumar Subbiah
fd42eaf7ce disp: msm: dp: use 3dmux when dsc is not available
The mode validation logic in DP checks for 3dmux only if DSC is
not supported by the sink. It does not cover the case where the
sink supports DSC but there are not enough DSC blocks available.
In this case, it filters out all the modes even though some of
the modes can be realized with 3dmux or without 3dmux or DSC.

This change updates the logic to check for DSC first and if
that fails, disable DSC for the panel and look for other modes
that can be supported with or without 3dmux alone.

Change-Id: Ie0497333c77d8de30d126e701b5458f354897b8c
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2021-08-05 20:26:34 -04:00
Rajkumar Subbiah
eebce2ae4c disp: msm: dp: add support for 3.75:1 compression
Currently the DP driver always uses a compression ratio of 3, if
DSC is enabled. So if the sink supports 30bpp, the compressed
output is set to 10bpp. But since the hardware supports
compressing this to 8bpp, it would require less link bandwidth
than 10bpp compressed output. For compliance testing, the
test equipment limits the link bandwidth based on the most
efficient compression ratio and for some resolutions there
is not enough link bandwidth for 3:1 compression.

This change always sets the compression output to 8bpp to
minimize the link bandwidth utilization.

Change-Id: Ifa6129444c2bab4e9c357ddfe49f76efa5b04be0
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2021-08-05 20:26:34 -04:00
Rajkumar Subbiah
17997f6098 disp: msm: dp: update TU calculator for DSC and RB2 support
Updating the TU calculator to fix the formulas for the following
two use cases:
* 3.75:1 DSC compression
* Modes with RB2 (reduced blanking) timing.

Change-Id: I295e3fc252691a7fb42b610101da32c9f31d1855
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2021-08-05 20:26:34 -04:00
qctecmdr
3d45203d45 Merge "disp: msm: dp: clear mst edid cache for real monitor plugin" 2021-07-24 04:52:53 -07:00
Sudarsan Ramesh
1def76170d disp: msm: dp: clear mst edid cache for real monitor plugin
Currently edid cache is cleared only in the mst attention callback
flow i.e. if a monitor is plugged in/out of a mst dongle. If mst
dongle is plugged out directly, the edid cache is not cleared.
This change clears the edid cache also during the
connect/disconnect callback.

Change-Id: Icc4b4ca6a59f1ee32f7fe062831a3a19f4ab9f00
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
2021-07-19 10:40:22 -04:00
Rajkumar Subbiah
d1f021f411 disp: msm: dp: account for fec overhead during bpp determination
When calculating the maximum bpp that can be supported for the
link configuration and mode, currently the driver is not
accounting for the FEC overhead. When FEC is enabled, the
link bandwidth available for the video stream is reduced and
therefore it needs to be included in the calculation.

Change-Id: I41a664d739f369b17cff2ced7f88f5e90ee196f4
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2021-07-08 17:49:03 -04:00
Rajkumar Subbiah
07b0a4d81a disp: msm: dp: enable fec only for the first stream
FEC is a link specific configuration and should be configured before
the MST streams are enabled. Currently, the driver is configuring FEC
for each stream and in a case where the first stream is compressed and
the second stream is uncompressed, it enables FEC before the first
stream is enabled but ends up disabling FEC when the second stream is
enabled.

This change splits FEC/DSC configuration into separate functions and
skips FEC configuration for the second stream.

Change-Id: Ic1bab321dc77da7ec5c0253c93bb69735a217fd6
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2021-07-08 17:41:16 -04:00
Sudarsan Ramesh
65f1c136ea disp: msm: dp: change the detect callback to detect_ctx
The connector detect function is currently implemented as a
callback from the framework, and creates a context before
calling the detect_port_ctx MST callback. This change updates
the callflow so that the framework calls the new detect_ctx
function in the MST case. This removes the need for creating a
new context before calling further downstream functions.

In addition, references to the mst_connector_get_info
function were replaced by connector_get_info to avoid
redundancy.

Change-Id: I224d09e77fad4b6925a42b1bc912a05e3e4d060a
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-06-16 15:57:54 -04:00
qctecmdr
4a9b41b801 Merge "disp: msm: dp: check for pixel1 rcg only for mst supported platforms" 2021-06-05 08:40:10 -07:00
Sankeerth Billakanti
4cfef504ab disp: msm: dp: log the dp mst connector id information
Logging connector id will help debug the issues related to
DP MST stability and pre-merge tests. This change will log
the DP MST connector IDs modified during stability tests.

Change-Id: Ifaf8e319697a809b02c24c473acec8da521286e2
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2021-05-27 17:48:13 -04:00
Rajat Gupta
4aec38e6b3 disp: msm: dp: check for pixel1 rcg only for mst supported platforms
Check for pixel1 rcg only for mst supported platforms. On sst only
devices bind gets failed.

Change-Id: I73cc4a572d4d0791205c342f57618b226eb91fef
Signed-off-by: Rajat Gupta <rajatgu@codeaurora.org>
2021-05-27 17:36:12 -04:00
Sudarsan Ramesh
71a264056d disp: msm: dp: add support for voltage swing level 3
Currently, the max voltage swing supported is level 2. This change
adds support for voltage swing level 3 in the dp driver.

Change-Id: Idf1dbb4e74edff924067130a5edea869f392bf38
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-05-25 11:22:41 -04:00
Yashwanth
7e03fb61fd disp: msm: add support for seamless dsc switch
This change adds logic to determine dsc switch based on
the connector property "CONNECTOR_PROP_DSC_MODE" and
performs seamless DSC switch if there is any change in
DSC configuration. The connector property is populated
in msm_sub_mode based on which suitable mode is selected.

Change-Id: Ifc4931f16dfb814781bc1d72b103e09103e6bfee
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-05-20 21:34:27 -07:00
Yu Wu
55340a43c3 disp: msm: add physical address info when dumping display registers
In dumping display registers, physical address will be appended after
each block name. This is to support register compare between kernel
and UEFI.

Change-Id: Ic20d3e2bd4c95aa7c71c4b646a149f7e83ad731a
Signed-off-by: Yu Wu <zwy@codeaurora.org>
2021-05-06 02:59:16 -07:00
qctecmdr
d242e029cb Merge "disp: msm: dp: fix reset edid segment and address during read" 2021-05-05 13:36:07 -07:00
Sudarsan Ramesh
4195c3b5e0 disp: msm: dp: fix reset edid segment and address during read
This change fixes a regression related to resetting the edid
segment and address when reading port edid introduced by 
896cf4fd01 (disp: msm: dp: reset
edid segment and address when reading port edid).

Change-Id: Ie39fb9558d9f3206e4ded17b97018a966aab3a7c
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-05-04 15:15:29 -04:00
Sudarsan Ramesh
8339221ace disp: msm: dp: add support to dump dpcd from debugfs node
Current debugfs dpcd node only dumps last written dpcd
string in dpsim mode. This change adds support to dump
dpcd information in real monitor use case.

Change-Id: I8a716f30df72feadf9012c65f5a56fe7194d91d2
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-05-04 14:12:49 -04:00
Sudarsan Ramesh
896cf4fd01 disp: msm: dp: reset edid segment and address when reading port edid
Currently, edid read failures are seen when transitioning from a
resolution with larger edid size to a resolution with smaller
edid size. Edid segment and address values are not getting reset,
and any edid read after switching to a lower resolution
reads the incorrect segment.

This change clears edid segment and resets edid address in the
read_edid function so that the affected values are cleared every
time edid is read.

Change-Id: Iedb231c877b85d645ca74071f9c663393a204ff7
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-04-27 16:53:28 -04:00
qctecmdr
8a3abf2cdf Merge "disp: msm: dp: update number of lanes used to usb driver" 2021-04-23 10:13:11 -07:00
qctecmdr
62d167dfb1 Merge "disp: msm: dp: clear cache upon writing to edid debugfs node" 2021-04-23 09:21:58 -07:00
Vara Reddy
396c3acc01 disp: msm: dp: update number of lanes used to usb driver
This change fixes issue, where USB driver was not properly updated
with the number of dp lanes being used for altmode usecase.

Change-Id: Ic93d3e3b37aa8ad2d664e006ede3cf6c27d7133a
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2021-04-19 10:34:39 -07:00
Sudarsan Ramesh
d914d696bf disp: msm: dp: change dp driver to align with usb changes
Originally, a call is made to dwc3_msm_release_ss_lane to
notify the USB driver that DP 4 lane is in use. This was
cleared on USB disconnect. Combined with the autosuspend
timeout and UCSI notifying that USB was not needed, this
caused issues in bringing up the monitors.

This change implements a new api call from the USB driver,
dwc3_msm_set_dp_mode. DP driver makes a call to this api to
notify USB driver for 2 lane, 4 lane, and disconnected states.

Change-Id: I051e5424c518ca84e2cc6dc27c114715dc287ac0
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-04-16 13:09:28 -07:00
Sudarsan Ramesh
45877a3be6 disp: msm: dp: clear cache upon writing to edid debugfs node
Currently, any edids read by the driver are cached in the
sde_connector object. In the event that subsequent edids are written,
the cached edid is used instead of the newly written edid.

In the event a new edid is written to the edid debugfs node over
dpsim, this change clears the current cached edid before overwriting
the new one.

Change-Id: I53f870e97c3b9ac5954d193f74e4b272386f67a8
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-04-16 16:08:50 -04:00
Sudarsan Ramesh
0bc54faad9 disp: msm: dp: update dp phy settings for waipio
This change updates the DP PHY swing/preemphasis values
for Waipio.

Change-Id: I52d6b461f10f5680d62e26ff3f5978e9b90fc0b1
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-04-06 14:07:29 -04:00
Sudarsan Ramesh
3bb21d12c2 disp: msm: dp: pass correct vdo value to the simulate_attention cb
In DPSIM, while calling the hpd callback from dp_sim_host_hpd_irq,
the hpd argument is passed in as false. In the hpd callback, both
the hpd_irq and hpd arguments need to be encoded into the vdo
parameter. Currently, MST DPSIM testcases are broken because this
is not implemented properly.

This change sets the hpd argument to true in the hpd_irq callback, and
encodes the hpd and hpd_irq parameter in the vdo object before passing
it to the simulate_attention callback.

Change-Id: I07155716699aad8554b6e08b446139bcd0d7fa74
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-04-01 12:28:44 -04:00
qctecmdr
c7ec7ac299 Merge "disp: msm: dp: fix mode filtering for 4K120" 2021-03-30 02:33:20 -07:00
Rajkumar Subbiah
efea534641 disp: msm: dp: avoid setting multi_func when pin value is zero
During dp altmode driver initialization, the dp altmode driver is called
with a null data packet. Even though this callback indicates a disconnect,
the multi function flag is incorrectly set to true. If the DP is enabled
later using simulation mode, the multi function flag is not cleared thereby
limiting the lane count to 2 irrespective of capability applied through
DPCD.

This change checks for the zero pin value while setting the multi function
flag.

Change-Id: I974fbf1630eed26f406ac9e4c99140b27f0cb635
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2021-03-29 17:57:08 -04:00
Sudarsan Ramesh
a89e5da1c9 disp: msm: dp: copy sink_dsc_caps object in mst connector install
In an MST DSC setup, the sink_dsc_caps object is read into the base
panel. In the process of creating different connectors and panel
objects, the sink_dsc_caps panel object is not copied correctly to
the new panel objects. This causes an error where a fallback DSC
version is used.

This change correctly copies the sink_dsc_caps object over to the
panel for the MST connector from the base connector.

Change-Id: I66af823bbe08c8b1fbd68d628e759416162e9d53
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-03-29 17:31:26 -04: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
qctecmdr
95acc8bbab Merge "disp: msm: add dp register & debugbus dump support" 2021-03-14 21:10:39 -07:00
qctecmdr
685a464505 Merge "disp: msm: add check for null pointer dereferencing" 2021-03-10 02:49:06 -08:00