diff mbox

drm/i915: Ignore TMDS clock limit for DP++ when EDID override is set

Message ID 20171214082446.5039-1-abdiel.janulgue@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Abdiel Janulgue Dec. 14, 2017, 8:24 a.m. UTC
4K modes testing by using dummy EDID data has never been working
properly on boxes with DP++ (dual-mode) adaptors. The reason for
this is that  those modes got pruned during hdmi mode validation.
intel_hdmi_mode_valid returns CLOCK_HIGH  because the pixel clock
reported by the 4k mode is higher than dual port TMDS clock limit.

However 4k injection does work properly on machines that don't have
DP++ adapters because the mode is never validated against the DP++
TMDS clock limit.

Ignore the limits when we're testing using overriden EDIDs.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101649
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jani Nikula Dec. 14, 2017, 9:19 a.m. UTC | #1
On Thu, 14 Dec 2017, Abdiel Janulgue <abdiel.janulgue@linux.intel.com> wrote:
> 4K modes testing by using dummy EDID data has never been working
> properly on boxes with DP++ (dual-mode) adaptors. The reason for
> this is that  those modes got pruned during hdmi mode validation.
> intel_hdmi_mode_valid returns CLOCK_HIGH  because the pixel clock
> reported by the 4k mode is higher than dual port TMDS clock limit.
>
> However 4k injection does work properly on machines that don't have
> DP++ adapters because the mode is never validated against the DP++
> TMDS clock limit.
>
> Ignore the limits when we're testing using overriden EDIDs.

What you're actually doing is *not* detecting dual mode adaptors when
you're using an override EDID. Which means, with this patch, you can't
use override EDID with dual mode adaptors, at all. (By proxy this means
you of course ignore the limits too...)

Slightly less damage would be changing the has_edid check above your
change to (has_edid && !connector->override_edid). Still not great, but
better than this. Oh, and deserves a comment in code.

The question is, how do you decide which ports to use for override EDID
testing? Why does the VBT on these machines say those ports presumably
have a dual mode adaptor?

BR,
Jani.

>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101649
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_hdmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index bced7b9..d133353 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -1576,7 +1576,7 @@ intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
>  		}
>  	}
>  
> -	if (type == DRM_DP_DUAL_MODE_NONE)
> +	if (type == DRM_DP_DUAL_MODE_NONE || connector->override_edid)
>  		return;
>  
>  	hdmi->dp_dual_mode.type = type;
Saarinen, Jani Jan. 11, 2018, 2:48 p.m. UTC | #2
HI, 
> -----Original Message-----

> From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf

> Of Petri Latvala

> Sent: torstai 11. tammikuuta 2018 12.02

> To: intel-gfx@lists.freedesktop.org

> Subject: Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Ignore TMDS clock

> limit for DP++ when EDID override is set (rev2)

> 

> On Thu, Jan 11, 2018 at 09:54:02AM +0000, Patchwork wrote:

> > == Series Details ==

> >

> > Series: drm/i915: Ignore TMDS clock limit for DP++ when EDID override is

> set (rev2)

> > URL   : https://patchwork.freedesktop.org/series/35338/

> > State : failure

> >

> > == Summary ==

> >

> > Warning: bzip CI_DRM_3609/shard-glkb6/results32.json.bz2 wasn't in

> > correct JSON format Test kms_cursor_crc:

> >         Subgroup cursor-64x21-onscreen:

> >                 skip       -> PASS       (shard-hsw)

> >         Subgroup cursor-64x64-suspend:

> >                 skip       -> PASS       (shard-snb) fdo#102365

> >                 skip       -> PASS       (shard-hsw) fdo#103540

> > Test drv_suspend:

> >         Subgroup debugfs-reader:

> >                 pass       -> SKIP       (shard-snb)

> > Test kms_frontbuffer_tracking:

> >         Subgroup fbc-1p-offscren-pri-shrfb-draw-render:

> >                 fail       -> PASS       (shard-snb) fdo#101623

> > Test kms_flip:

> >         Subgroup vblank-vs-modeset-suspend:

> >                 pass       -> INCOMPLETE (shard-hsw)

> >

> > fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365

> > fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540

> > fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623

> >

> > shard-hsw        total:2681 pass:1521 dwarn:1   dfail:0   fail:10  skip:1148

> time:8681s

> > shard-snb        total:2713 pass:1310 dwarn:1   dfail:0   fail:10  skip:1392

> time:7926s

> > Blacklisted hosts:

> > shard-apl        total:2713 pass:1684 dwarn:1   dfail:0   fail:25  skip:1002

> time:13555s

> > shard-kbl        total:2713 pass:1808 dwarn:1   dfail:0   fail:24  skip:880

> time:10569s

> >

> > == Logs ==

> >

> > For more details see:

> > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7628/shards.html

> 

> kbl results now shown in the text diff but this page shows:

> 

> igt@kms_hdmi_inject@inject-4k  fail -> PASS

This was expected here. Jani N, how do you patch in general?

> 

> 

> --

> Petri Latvala
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index bced7b9..d133353 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1576,7 +1576,7 @@  intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
 		}
 	}
 
-	if (type == DRM_DP_DUAL_MODE_NONE)
+	if (type == DRM_DP_DUAL_MODE_NONE || connector->override_edid)
 		return;
 
 	hdmi->dp_dual_mode.type = type;