Currently, driver hardcodes the DSC version to use
to v1.1 in DP driver even if the sink reports v1.2 in
the DPCD DSC_ALGORITHM_REVISISON register. This causes
a mismatch between the source DSC hardware programming
and the PPS packet information sent to sink.
This change sets the PPS DSC version field to the one
reported by the sink and falls back to v1.1 in case of
DPCD parsing error.
Change-Id: I76fb55b7bf9b3925ae3f408008f3257fc85cef2c
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
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>
By default use a slice height of 108 lines as it provides better
performance while maximizing compression and avoiding creating
artifacts at the slice boundary. This value is the recommended
one in VESA DSC specification and it is required for DP DSC CTS
tests with CRC validation to PASS.
Change-Id: I5c295873e4cf79f9fcf2da167a2349289118783b
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
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>
Decrease the log level for messages that are typically printed from a
real time thread execution environment (such as the display commit
thread). This can help with cases where a console lock held during the
execution of these real time threads can result in RT throttling issues.
Change-Id: I41e1e4f171b5eee9966d8a7d26d64430a81bc6fc
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
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>
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>
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>
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>
Add support for PLL programming in the DisplayPort driver.
Change-Id: I4f08a621dcae5d1f54d67bb5c34409249012cc7b
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Update colorimetry definition usage and how we access DSC information
as per changes in the upstream DRM framework code.
Change-Id: I28482380124734680e46904b8d536ebadba8cc60
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
This reverts commit eaed3221fa
which uses a downstream implementation for checksum calculation.
This will be fixed once the upstream changes to address checksum
calculation are merged.
Change-Id: I7a6ed1c4d4baf52533485d59bcdcb6dd1009d626
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Since the HDR static metadata block parsing has been moved to
the sde edid parser, replace the usage of drm_connector with
sde_connector for hdr10 so that the modifications to drm_connector
can be removed.
Change-Id: I4526cda426c46708d3689eb8b993b7a4f50d32ae
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Since the VSVDB parsing has been moved to the sde edid parser, replace
the usage of drm_connector with sde_connector for hdr10+ so that the
modifications to drm_connector can be removed.
Change-Id: I7d69aa533e71fa45bfc578db24c17bb23e499c4a
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Fix and decouple widebus-enable flag from dsc_en for dp.
Change-Id: I2d31bc367f007d4c918babc1c051492544bbb05c
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
When DP is working in MST mode, reading native EDID from MST
branch is not a valid operation.
Change-Id: I297d2b25b2c3166d68ef3eba941ca787d8bce8d3
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
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>
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>
FEC and DSC are only supported in DP 1.4 onwards.
Read FEC and DSC capabilities only if this
requirement is met. This will ensure backwards
compatibility with older DP devices.
CRs-Fixed: 2541795
Change-Id: I65a6cb903f332e896946dc3b9da4d95a14fac939
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
The sink may have limited DSC decoding support
for some BPC values. Ensure that the BPC that is
selected is within the sink's DSC capabilities.
CRs-Fixed: 2527660
Change-Id: I0692e7b606e258c3cab3de25d3b03178f4aa0294
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
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>
As per new requirements from DP 1.4a CTS, DUT (device under test)
should update the TE (test equipment) with the correct checksum
of the EDID even though the EDID is corrupted. Update the TE
with the checksum stored in the connector to meet this new
requirement.
CRs-Fixed: 2490128
Change-Id: Ib5c7bf4430c45050da3c91968716e88bd830e3e4
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Add support to pass extended capability information to the DPCD
debugfs node. This will help to validate features like VSC support
using debugfs node.
Usage will be the same as before and the change will automatically
detect the presence of extended capability field and expect
additional bytes of information.
Change-Id: If541fd8837aac4794c3db0fa3badeab4143ff9c3
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
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>
Currently a lot of information is packed into the HDR data structure of
the catalog panel making it difficult to individually control the
parameters like colorimetry and other information sent using
VSC SDP packets.
Break up the structure into individual VSC SDP colorimetry, HDR
infoframe and DHDR VSIF packets.
This makes it easier to control each of these parameters independently.
For example, when only the colorspace is changed its sufficient to
update only the VSC SDP colorimetry packets.
Also align these packets with the upstream DP helper header defines.
Change-Id: Ia208f30a480fd203192624fe4f3d99c1c89350dc
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
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>
Reset the dp sink power state during panel init.
Sinks may still be in old power states from
previous sessions, so reset the power to allow
for a clean start to the dp session.
CRs-Fixed: 2453351
Change-Id: I7e2a4c9bcdb8f69d2562ba098d80a1c7e8f9f620
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
The dp sink explicitly states the numbers of
slices it can support. When calculating the
number of slices for dsc configuration, ensure
that the sink supports the calculated number of
slices.
If the sink does not support the calculated
number of slices, keep rechecking sink support
for the subsequent slice increment, until we
reach the highest number of slices possible
according to the dp spec. If no compatible
sink slice support is found, do not enable dsc.
CRs-Fixed: 2325207
Change-Id: I485adacd258963cdec9cc52aa041373883ecadc7
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
Add configuration data to handle 10bpp 3:1
compression ratio based on hardware recommended
settings.
CRs-Fixed: 2325207
Change-Id: I7086dc235e0063a79c661fa8cee77d4e47e9c826
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
Ensure that the dp dsc peak pxl rate does not
exceed the maximum supported by the sink device.
If the mode's peak pxl rate per slice exceeds the
max, mark the mode as invalid.
CRs-Fixed: 2325207
Change-Id: Ic8904c759b8621c3aff258206599e1994f70e26e
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
The line buffer bit depth is used as part of dp
dsc calculations. Read the max supported line buf
bit depth supported by sink, and use that
restriction as part of the dsc calculations.
CRs-Fixed: 2325207
Change-Id: I4c995acad5f484edd1b438bdbf6c145b2d35ee41
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
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>
Use the EXTENDED_RECEIVER_CAPABILITY DPCD register fields,
if present, for enabling HBR3 link rate on supported targets.
CRs-Fixed: 2438457
Change-Id: I505d998f31f79162dc290fc47fd9fbba51527982
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
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>