mbox series

[v2,00/18] drm/i915: Pimp DP DFP handling

Message ID 20200904115354.25336-1-ville.syrjala@linux.intel.com (mailing list archive)
Headers show
Series drm/i915: Pimp DP DFP handling | expand

Message

Ville Syrjälä Sept. 4, 2020, 11:53 a.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Attempt to deal with DP downstream facing ports (DFP) more
thoroughly. This involves reading more of the port caps
and dealing with various clock/bpc limitations.

And we try to enable YCbCr 444->420 conversion for HDMI DFPs
which could allow some 4k displays to actually use 4k on
pre-icl hardware (which doesn't have native 420 output),
assuming we don't run into some other hardware limits.

I dropped my earlier patches to also hook in the DP dual mode
adapter probing since sadly I've not actually seen a DP->DP++
dongle that passes through the i2c traffic for those.

Only pimped the SST side of things. Not sure what would
be required to get it all working for MST.

Ville Syrjälä (18):
  drm/dp: Dump downstream facing port caps
  drm/i915/lspcon: Do not send infoframes to non-HDMI sinks
  drm/dp: Define protocol converter DPCD registers
  drm/dp: Define more downstream facing port caps
  drm/i915: Reworkd DFP max bpc handling
  drm/dp: Add helpers to identify downstream facing port types
  drm/dp: Pimp drm_dp_downstream_max_bpc()
  drm/dp: Redo drm_dp_downstream_max_clock() as
    drm_dp_downstream_max_dotclock()
  drm/i915: Reworkd DP DFP clock handling
  drm/dp: Add drm_dp_downstream_{min,max}_tmds_clock()
  drm/i915: Deal with TMDS DFP clock limits
  drm/i915: Configure DP 1.3+ protocol converted HDMI mode
  drm/dp: Add drm_dp_downstream_mode()
  drm/i915: Handle downstream facing ports w/o EDID
  drm/i915: Extract intel_hdmi_has_audio()
  drm/i915: DP->HDMI TMDS clock limits vs. deep color
  drm/dp: Add helpers for DFP YCbCr 4:2:0 handling
  drm/i915: Do YCbCr 444->420 conversion via DP protocol converters

 drivers/gpu/drm/drm_dp_helper.c               | 382 +++++++++++++++---
 drivers/gpu/drm/drm_edid.c                    |  19 +
 drivers/gpu/drm/i915/display/intel_ddi.c      |  11 +-
 .../drm/i915/display/intel_display_debugfs.c  |   3 +-
 .../drm/i915/display/intel_display_types.h    |   9 +
 drivers/gpu/drm/i915/display/intel_dp.c       | 304 +++++++++++---
 drivers/gpu/drm/i915/display/intel_dp.h       |   1 +
 drivers/gpu/drm/i915/display/intel_hdmi.c     |  82 ++--
 drivers/gpu/drm/i915/display/intel_hdmi.h     |   2 +
 include/drm/drm_dp_helper.h                   |  63 ++-
 include/drm/drm_edid.h                        |   4 +
 11 files changed, 738 insertions(+), 142 deletions(-)

Comments

Lyude Paul Sept. 4, 2020, 8:09 p.m. UTC | #1
Will try to look at this today, if I don't have the time though I'll definitely
have the time on Tuesday

On Fri, 2020-09-04 at 14:53 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Attempt to deal with DP downstream facing ports (DFP) more
> thoroughly. This involves reading more of the port caps
> and dealing with various clock/bpc limitations.
> 
> And we try to enable YCbCr 444->420 conversion for HDMI DFPs
> which could allow some 4k displays to actually use 4k on
> pre-icl hardware (which doesn't have native 420 output),
> assuming we don't run into some other hardware limits.
> 
> I dropped my earlier patches to also hook in the DP dual mode
> adapter probing since sadly I've not actually seen a DP->DP++
> dongle that passes through the i2c traffic for those.
> 
> Only pimped the SST side of things. Not sure what would
> be required to get it all working for MST.
> 
> Ville Syrjälä (18):
>   drm/dp: Dump downstream facing port caps
>   drm/i915/lspcon: Do not send infoframes to non-HDMI sinks
>   drm/dp: Define protocol converter DPCD registers
>   drm/dp: Define more downstream facing port caps
>   drm/i915: Reworkd DFP max bpc handling
>   drm/dp: Add helpers to identify downstream facing port types
>   drm/dp: Pimp drm_dp_downstream_max_bpc()
>   drm/dp: Redo drm_dp_downstream_max_clock() as
>     drm_dp_downstream_max_dotclock()
>   drm/i915: Reworkd DP DFP clock handling
>   drm/dp: Add drm_dp_downstream_{min,max}_tmds_clock()
>   drm/i915: Deal with TMDS DFP clock limits
>   drm/i915: Configure DP 1.3+ protocol converted HDMI mode
>   drm/dp: Add drm_dp_downstream_mode()
>   drm/i915: Handle downstream facing ports w/o EDID
>   drm/i915: Extract intel_hdmi_has_audio()
>   drm/i915: DP->HDMI TMDS clock limits vs. deep color
>   drm/dp: Add helpers for DFP YCbCr 4:2:0 handling
>   drm/i915: Do YCbCr 444->420 conversion via DP protocol converters
> 
>  drivers/gpu/drm/drm_dp_helper.c               | 382 +++++++++++++++---
>  drivers/gpu/drm/drm_edid.c                    |  19 +
>  drivers/gpu/drm/i915/display/intel_ddi.c      |  11 +-
>  .../drm/i915/display/intel_display_debugfs.c  |   3 +-
>  .../drm/i915/display/intel_display_types.h    |   9 +
>  drivers/gpu/drm/i915/display/intel_dp.c       | 304 +++++++++++---
>  drivers/gpu/drm/i915/display/intel_dp.h       |   1 +
>  drivers/gpu/drm/i915/display/intel_hdmi.c     |  82 ++--
>  drivers/gpu/drm/i915/display/intel_hdmi.h     |   2 +
>  include/drm/drm_dp_helper.h                   |  63 ++-
>  include/drm/drm_edid.h                        |   4 +
>  11 files changed, 738 insertions(+), 142 deletions(-)
>
Lyude Paul Sept. 8, 2020, 6:34 p.m. UTC | #2
With the nitpicks addressed (note there were a couple of other spots where we
wanted to use Return: in the kdocs, but I didn't bother pointing all of them
out), all but patch 07 is:

Reviewed-by: Lyude Paul <lyude@redhat.com>

On Fri, 2020-09-04 at 14:53 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Attempt to deal with DP downstream facing ports (DFP) more
> thoroughly. This involves reading more of the port caps
> and dealing with various clock/bpc limitations.
> 
> And we try to enable YCbCr 444->420 conversion for HDMI DFPs
> which could allow some 4k displays to actually use 4k on
> pre-icl hardware (which doesn't have native 420 output),
> assuming we don't run into some other hardware limits.
> 
> I dropped my earlier patches to also hook in the DP dual mode
> adapter probing since sadly I've not actually seen a DP->DP++
> dongle that passes through the i2c traffic for those.
> 
> Only pimped the SST side of things. Not sure what would
> be required to get it all working for MST.
> 
> Ville Syrjälä (18):
>   drm/dp: Dump downstream facing port caps
>   drm/i915/lspcon: Do not send infoframes to non-HDMI sinks
>   drm/dp: Define protocol converter DPCD registers
>   drm/dp: Define more downstream facing port caps
>   drm/i915: Reworkd DFP max bpc handling
>   drm/dp: Add helpers to identify downstream facing port types
>   drm/dp: Pimp drm_dp_downstream_max_bpc()
>   drm/dp: Redo drm_dp_downstream_max_clock() as
>     drm_dp_downstream_max_dotclock()
>   drm/i915: Reworkd DP DFP clock handling
>   drm/dp: Add drm_dp_downstream_{min,max}_tmds_clock()
>   drm/i915: Deal with TMDS DFP clock limits
>   drm/i915: Configure DP 1.3+ protocol converted HDMI mode
>   drm/dp: Add drm_dp_downstream_mode()
>   drm/i915: Handle downstream facing ports w/o EDID
>   drm/i915: Extract intel_hdmi_has_audio()
>   drm/i915: DP->HDMI TMDS clock limits vs. deep color
>   drm/dp: Add helpers for DFP YCbCr 4:2:0 handling
>   drm/i915: Do YCbCr 444->420 conversion via DP protocol converters
> 
>  drivers/gpu/drm/drm_dp_helper.c               | 382 +++++++++++++++---
>  drivers/gpu/drm/drm_edid.c                    |  19 +
>  drivers/gpu/drm/i915/display/intel_ddi.c      |  11 +-
>  .../drm/i915/display/intel_display_debugfs.c  |   3 +-
>  .../drm/i915/display/intel_display_types.h    |   9 +
>  drivers/gpu/drm/i915/display/intel_dp.c       | 304 +++++++++++---
>  drivers/gpu/drm/i915/display/intel_dp.h       |   1 +
>  drivers/gpu/drm/i915/display/intel_hdmi.c     |  82 ++--
>  drivers/gpu/drm/i915/display/intel_hdmi.h     |   2 +
>  include/drm/drm_dp_helper.h                   |  63 ++-
>  include/drm/drm_edid.h                        |   4 +
>  11 files changed, 738 insertions(+), 142 deletions(-)
>
Ville Syrjälä Sept. 17, 2020, 4:11 p.m. UTC | #3
On Tue, Sep 08, 2020 at 02:34:24PM -0400, Lyude Paul wrote:
> With the nitpicks addressed (note there were a couple of other spots where we
> wanted to use Return: in the kdocs, but I didn't bother pointing all of them
> out), all but patch 07 is:
> 
> Reviewed-by: Lyude Paul <lyude@redhat.com>

Thanks for the review. I fixed up the missing/bad docs and 
pushed the lot to drm-intel-next-queued (with Daniel's irc ack).

PS.
Had to s/drm_dp_downstream_max_clock/drm_dp_downstream_max_dotclock/
in nouveau_dp.c to keep it in a buildable shape. I hope I didn't step
on too many toes with this...