~proton1980/ubuntu/+source/linux/+git/mirror-drm-intel:topic/dp-hdmi-2.1-pcon

Last commit made on 2020-12-22
Get this branch:
git clone -b topic/dp-hdmi-2.1-pcon https://git.launchpad.net/~proton1980/ubuntu/+source/linux/+git/mirror-drm-intel
Only Ghz can upload to this branch. If you are Ghz please log in for upload directions.

Branch merges

Branch information

Name:
topic/dp-hdmi-2.1-pcon
Repository:
lp:~proton1980/ubuntu/+source/linux/+git/mirror-drm-intel

Recent commits

522508b... by Ankit Nautiyal <email address hidden>

drm/i915/display: Let PCON convert from RGB to YCbCr if it can

If PCON has capability to convert RGB->YCbCr colorspace and also
to 444->420 downsampling then for any YUV420 only mode, we can
let the PCON do all the conversion. If the PCON supports
RGB->YCbCr conversion for all BT2020, BT709, BT601, choose
the one that is selected by userspace via connector colorspace
property, otherwise default to BT601.

v2: As suggested by Uma Shankar, considered case for colorspace
BT709 and BT2020, and default to BT601. Also appended dir
'display' in commit message.

v3: Fixed typo in condition for printing one of the error msg.

v4: As suggested by Uma Shankar:
-Fixed bug in determining the colorspace for RGB->YCbCr conversion.
-Fixed minor formatting issues
Also updated the commit message as per latest changes.

Reviewed-by: Uma Shankar <email address hidden>
Signed-off-by: Ankit Nautiyal <email address hidden>
[Jani: Fixed checkpatch PARENTHESIS_ALIGNMENT.]
Signed-off-by: Jani Nikula <email address hidden>
Link: https://patchwork.freedesktop<email address hidden>

10fec80... by Ankit Nautiyal <email address hidden>

drm/i915/display: Configure PCON for DSC1.1 to DSC1.2 encoding

When a source supporting DSC1.1 is connected to DSC1.2 HDMI2.1 sink
via DP HDMI2.1 PCON, the PCON can be configured to decode the
DSC1.1 compressed stream and encode to DSC1.2. It then sends the
DSC1.2 compressed stream to the HDMI2.1 sink.

This patch configures the PCON for DSC1.1 to DSC1.2 encoding, based
on the PCON's DSC encoder capablities and HDMI2.1 sink's DSC decoder
capabilities.

v2: Addressed review comments from Uma Shankar:
-fixed the error in packing pps parameter values
-added check for pcon in the pcon related function
-appended display in commit message

v3: Only consider non-zero DSC FRL b/w for determining max FRL b/w
supported by sink.

Signed-off-by: Ankit Nautiyal <email address hidden>
Reviewed-by: Uma Shankar <email address hidden>
[Jani: Fixed checkpatch BRACES, LINE_SPACING, PARENTHESIS_ALIGNMENT.]
Signed-off-by: Jani Nikula <email address hidden>
Link: https://patchwork.freedesktop<email address hidden>

6e6cb75... by Ankit Nautiyal <email address hidden>

drm/i915: Add helper functions for calculating DSC parameters for HDMI2.1

The DP-HDMI2.1 PCON spec provides way for a source to set PPS
parameters: slice height, slice width and bits_per_pixel, based on
the HDMI2.1 sink capabilities. The DSC encoder of the PCON will
respect these parameters, while preparing the 128 byte PPS.

This patch adds helper functions to calculate these PPS paremeters as
per the HDMI2.1 specification.

v2: Addressed review comments given by Uma Shankar:
-added documentation for functions
-fixed typos and errors

Signed-off-by: Ankit Nautiyal <email address hidden>
Reviewed-by: Uma Shankar <email address hidden>
[Jani: Fixed checkpatch SUSPECT_CODE_INDENT, TYPO_SPELLING]
Signed-off-by: Jani Nikula <email address hidden>
Link: https://patchwork.freedesktop<email address hidden>

b9d96da... by Ankit Nautiyal <email address hidden>

drm/i915: Read DSC capabilities of the HDMI2.1 PCON encoder

This patch adds support to read and store the DSC capabilities of the
HDMI2.1 PCon encoder. It also adds a new field to store these caps,
The caps are read during dfp update and can later be used to get the
PPS parameters for PCON-HDMI2.1 sink pair. Which inturn will be used
to take a call to override the existing PPS-metadata, by either
writing the entire new PPS metadata, or by writing only the
PPS override parameters.

v2: Restructured the code to read all capability DPCDs at once and store
in an array in intel_dp structure.

v3: rebase

Signed-off-by: Ankit Nautiyal <email address hidden>
Reviewed-by: Uma Shankar <email address hidden>
[Jani: Fixed checkpatch PARENTHESIS_ALIGNMENT.]
Signed-off-by: Jani Nikula <email address hidden>
Link: https://patchwork.freedesktop<email address hidden>

9488a03... by Swati Sharma <email address hidden>

drm/i915: Add support for enabling link status and recovery

In this patch enables support for detecting link failures between
PCON and HDMI sink in i915 driver. HDMI link loss indication to
upstream DP source is indicated via IRQ_HPD. This is followed by
reading of HDMI link configuration status (HDMI_TX_LINK_ACTIVE_STATUS).
If the PCON → HDMI 2.1 link status is off; reinitiate frl link
training to recover. Also, report HDMI FRL link error count range for
each individual FRL active lane is indicated by
DOWNSTREAM_HDMI_ERROR_STATUS_LN registers.

v2: Checked for dpcd read and write failures and added debug message.
(Uma Shankar)

v3: Rearranged code to re-start FRL link training or fall back to
TMDS mode.

v4: Resused function to check frl which inturn restarts FRL and
fallback to TMDS mode.

Signed-off-by: Swati Sharma <email address hidden>
Signed-off-by: Ankit Nautiyal <email address hidden>
Reviewed-by: Uma Shankar <email address hidden> (v2)
Signed-off-by: Jani Nikula <email address hidden>
Link: https://patchwork.freedesktop<email address hidden>

4f3dd47... by Ankit Nautiyal <email address hidden>

drm/i915: Check for FRL training before DP Link training

This patch calls functions to check FRL training requirements
for an HDMI2.1 sink, when connected through PCON.
The call is made before the DP link training. In case FRL is not
required or failure during FRL training, the TMDS mode is selected
for the pcon.

v2: moved check_frl_training() just after FEC READY, before
starting DP link training.

v3: rebase

Signed-off-by: Ankit Nautiyal <email address hidden>
Reviewed-by: Uma Shankar <email address hidden>
Signed-off-by: Jani Nikula <email address hidden>
Link: https://patchwork.freedesktop<email address hidden>

ced42f2... by Ankit Nautiyal <email address hidden>

drm/i915: Add support for starting FRL training for HDMI2.1 via PCON

This patch adds functions to start FRL training for an HDMI2.1 sink,
connected via a PCON as a DP branch device.
This patch also adds a new structure for storing frl training related
data, when FRL training is completed.

v2: As suggested by Uma Shankar:
-renamed couple of variables for better clarity
-tweaked the macros used for correct semantics for true/false
-fixed other styling issues.

v3: Completed the TODO for condition for going to FRL mode.
Modified the condition to determine the required FRL b/w
based only on the Pcon and Sink's max FRL values.
Moved the frl structure initialization to intel_dp_init_connector().

v4: Fixed typo in initialization of frl structure.

v5: Always use FRL if its possible, instead of enabling only for
higher modes as done in v3.

Signed-off-by: Ankit Nautiyal <email address hidden>
Reviewed-by: Uma Shankar <email address hidden> (v2)
[Jani: Fixed checkpatch BRACES, CONSTANT_COMPARISON.]
Signed-off-by: Jani Nikula <email address hidden>
Link: https://patchwork.freedesktop<email address hidden>

2f78347... by Ankit Nautiyal <email address hidden>

drm/i915: Capture max frl rate for PCON in dfp cap structure

HDMI2.1 PCON advertises Max FRL bandwidth supported by the PCON.

This patch captures this in dfp cap structure in intel_dp and uses
this to prune connector modes that cannot be supported by the PCON
and FRL bandwidth.

v2: Addressed review comments from Uma Shankar:
-tweaked the comparison of target bw and pcon frl bw to avoid roundup errors.
-minor modification of field names and comments.

Signed-off-by: Ankit Nautiyal <email address hidden>
Reviewed-by: Uma Shankar <email address hidden>
Signed-off-by: Jani Nikula <email address hidden>
Link: https://patchwork.freedesktop<email address hidden>

07c9b86... by Ankit Nautiyal <email address hidden>

drm/dp_helper: Add helpers to configure PCONs RGB-YCbCr Conversion

DP Specification for DP2.0 to HDMI2.1 Pcon specifies support for conversion
of colorspace from RGB to YCbCr.
https://groups.vesa.org/wg/DP/document/previewpdf/15651

This patch adds the relavant registers and helper functions to
get the capability and set the color conversion bits for rgb->ycbcr
conversion through PCON.

v2: As suggested in review comments:
-Fixed bug in the check condition in a drm_helper as reported by
 Dan Carpenter and Kernel test robot. (Dan Carepenter)
-Modified the color-conversion cap helper function, to accommodate
 BT709 and BT2020 colorspace. (Uma Shankar)
-Added spec details for the new cap for color conversion. (Uma Shankar)

Signed-off-by: Ankit Nautiyal <email address hidden>
Reviewed-by: Uma Shankar <email address hidden>
Signed-off-by: Jani Nikula <email address hidden>
Link: https://patchwork.freedesktop<email address hidden>

e2e16da... by Ankit Nautiyal <email address hidden>

drm/dp_helper: Add support for Configuring DSC for HDMI2.1 Pcon

This patch adds registers for getting DSC encoder capability for
a HDMI2.1 PCon. It also addes helper functions to configure
DSC between the PCON and HDMI2.1 sink.

v2: Corrected offset for DSC encoder bpc and minor changes.
Also added helper functions for getting pcon dsc encoder capabilities
as suggested by Uma Shankar.

v3: Only setting the DSC bits for the Protocol Converter control
registers, avoiding overwritining color conversion bits.

Signed-off-by: Ankit Nautiyal <email address hidden>
Reviewed-by: Uma Shankar <email address hidden> (v2)
[Jani: Fixed checkpatch BLOCK_COMMENT_STYLE.]
Signed-off-by: Jani Nikula <email address hidden>
Link: https://patchwork.freedesktop<email address hidden>