[Intel-gfx] [PATCH 6/6] drm/i915/hdmi: Ignore DP++ TMDS clock limit for native HDMI ports
Jani Nikula
jani.nikula at linux.intel.com
Wed Dec 22 09:47:03 UTC 2021
On Fri, 17 Dec 2021, Ville Syrjala <ville.syrjala at linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Lots of machines these days seem to have a crappy type1 DP dual
> mode adaptor chip slapped onto the motherboard. Based on the
> DP dual mode spec we currently limit those to 165MHz max TMDS
> clock.
>
> Windows OTOH ignores DP dual mode adaptors when the VBT
> indicates that the port is not actually DP++, so we can
> perhaps assume that the vendors did intend that the 165MHz
> clock limit doesn't apply here. Though it would be much
> nicer if they actually declared an explicit limit through
> VBT, but that doesn't seem to be happening either.
>
> So in order to match Windows behaviour let's ignore the
> DP dual mode adaptor's TMDS clock limit for ports that
> don't look like DP++ in VBT.
>
> Unfortunately many older VBTs misdelcare their DP++ ports
> as just HDMI (eg. ILK Dell Latitude E5410) or DP (eg. SNB
> Lenovo ThinkPad X220). So we can't really do this universally
> without risking black screens. I suppose a sensible cutoff
> is HSW+ since that's when 4k became a thing and one might
> assume that the machines have been tested to work with higher
> TMDS clock rates.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Out of curiousity, on the machines where we are currently too strict on
the limitation, do we actually read and get a valid limit from the
adaptor in drm_dp_dual_mode_max_tmds_clock(), or is it the fallback 165
MHz that's too strict? If the latter, should the fallback policy be
moved out of drm_dp_dual_mode_max_tmds_clock() instead?
Anyway, seems that currently we're erring too far to lower limits to
avoid black screens, so seems okay to relax this a bit. ISTR we've had
quite a few bug reports about this.
Acked-by: Jani Nikula <jani.nikula at intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_hdmi.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 3b5b9e7b05b7..9f0557d9e9a5 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -2359,6 +2359,14 @@ intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
> "DP dual mode adaptor (%s) detected (max TMDS clock: %d kHz)\n",
> drm_dp_get_dual_mode_type_name(type),
> hdmi->dp_dual_mode.max_tmds_clock);
> +
> + /* Older VBTs are often buggy and can't be trusted :( Play it safe. */
> + if ((DISPLAY_VER(dev_priv) >= 8 || IS_BROADWELL(dev_priv)) &&
> + !intel_bios_is_port_dp_dual_mode(dev_priv, port)) {
> + drm_dbg_kms(&dev_priv->drm,
> + "Ignoring DP dual mode adaptor max TMDS clock for native HDMI port\n");
> + hdmi->dp_dual_mode.max_tmds_clock = 0;
> + }
> }
>
> static bool
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list