public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 03/10] drm/i915: Check VBT for CRT port presence on HSW/BDW
Date: Tue, 1 Dec 2015 20:15:20 +0200	[thread overview]
Message-ID: <20151201181520.GL4437@intel.com> (raw)
In-Reply-To: <1448986029-31302-1-git-send-email-ville.syrjala@linux.intel.com>

On Tue, Dec 01, 2015 at 06:07:09PM +0200, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Unfortunatey there appear to quite a few HSW/BDW machines (eg.
> NUCs, Brix Pro) in the wild with LPT/WPT-H but non-working FDI.
> FDI training fails every single time on these machines. Dunno,
> maybe they just didn't bother wiring it up or something?
> 
> Unfortunately all the fuse bits and whatnot are telling us that
> the CRT connector is present. And so what we get from this is tons
> of false positives from the CI systems due to VGA connector forcing.
> 
> I've not found any way to detect this purely from hardware, so we
> have to resort to looking at the VBT int_crt_support bit. We used
> to check this bit on all platforms, but that broke all the old
> machines, so the check was then restricted to VLV only in
> commit 84b4e042c470 ("drm/i915: only apply crt_present check on VLV")
> 
> Considering HSW and VLV VBT probably got defined around the same time,
> it should be reasonably safe to assume that the bits is sane for
> HSW/BDW as well. At least I have one copy of some VBT spec here that
> says it's meant for both VLV and HSW, and it knows about the bit
> (lists it being valid from version 155 onwards). Also I have two
> desktop machines with actual CRT ports and both have
> int_crt_support==1 in their VBTs.
> 
> v2: Move the platform checks into the VBT parsing code
>     Also check that the VBT version is at least 155
> 
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93190

> ---
>  drivers/gpu/drm/i915/intel_bios.c    | 5 ++++-
>  drivers/gpu/drm/i915/intel_display.c | 2 +-
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index ce82f9c7df24..070470fe9a91 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -356,7 +356,10 @@ parse_general_features(struct drm_i915_private *dev_priv,
>  	general = find_section(bdb, BDB_GENERAL_FEATURES);
>  	if (general) {
>  		dev_priv->vbt.int_tv_support = general->int_tv_support;
> -		dev_priv->vbt.int_crt_support = general->int_crt_support;
> +		/* int_crt_support can't be trusted on earlier platforms */
> +		if (bdb->version >= 155 &&
> +		    (HAS_DDI(dev_priv) || IS_VALLEYVIEW(dev_priv)))
> +			dev_priv->vbt.int_crt_support = general->int_crt_support;
>  		dev_priv->vbt.lvds_use_ssc = general->enable_ssc;
>  		dev_priv->vbt.lvds_ssc_freq =
>  			intel_bios_ssc_frequency(dev, general->ssc_freq);
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index e80387dd6582..68822395914b 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14263,7 +14263,7 @@ static bool intel_crt_present(struct drm_device *dev)
>  	if (HAS_DDI(dev) && I915_READ(DDI_BUF_CTL(PORT_A)) & DDI_A_4_LANES)
>  		return false;
>  
> -	if (IS_VALLEYVIEW(dev) && !dev_priv->vbt.int_crt_support)
> +	if (!dev_priv->vbt.int_crt_support)
>  		return false;
>  
>  	return true;
> -- 
> 2.4.10
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-12-01 18:15 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01 13:08 [PATCH 00/10] HSW/BDW PCH modeset fixes and stuff ville.syrjala
2015-12-01 13:08 ` [PATCH 01/10] drm/i915: Don't register the CRT connector when it's fused off ville.syrjala
2015-12-01 19:05   ` Paulo Zanoni
2015-12-01 19:18     ` Ville Syrjälä
2015-12-01 21:28   ` [PATCH v2 01/10] drm/i915: Don't register the CRT connector when it's fused off on LPT-H ville.syrjala
2015-12-01 13:08 ` [PATCH 02/10] drm/i915: Don't register CRT connectro when DDI E can't be used ville.syrjala
2015-12-01 19:13   ` Paulo Zanoni
2015-12-01 21:29   ` [PATCH v2 02/10] drm/i915: Don't register CRT connector " ville.syrjala
2015-12-01 13:08 ` [PATCH 03/10] drm/i915: Check VBT for CRT port presence on HSW/BDW ville.syrjala
2015-12-01 13:41   ` Chris Wilson
2015-12-01 13:57     ` Ville Syrjälä
2015-12-01 14:06       ` Chris Wilson
2015-12-01 14:19         ` Ville Syrjälä
2015-12-01 16:07   ` [PATCH v2 " ville.syrjala
2015-12-01 18:15     ` Ville Syrjälä [this message]
2015-12-01 19:28     ` Paulo Zanoni
2015-12-01 19:40       ` Ville Syrjälä
2015-12-01 21:31     ` [PATCH v3 " ville.syrjala
2015-12-01 13:08 ` [PATCH 04/10] drm/i915: Add "missing" break to haswell_get_ddi_pll() ville.syrjala
2015-12-01 19:34   ` Paulo Zanoni
2015-12-01 19:45     ` Ville Syrjälä
2015-12-01 21:32   ` [PATCH v2 " ville.syrjala
2015-12-02  9:29     ` Ville Syrjälä
2015-12-01 13:08 ` [PATCH 05/10] drm/i915: Disable CLKOUT_DP bending on LPT/WPT as needed ville.syrjala
2015-12-02 13:35   ` Paulo Zanoni
2015-12-03 10:03     ` Ville Syrjälä
2015-12-03 11:16       ` Paulo Zanoni
2015-12-04 20:19   ` [PATCH v2 " ville.syrjala
2015-12-07 16:54     ` Paulo Zanoni
2015-12-01 13:08 ` [PATCH 06/10] drm/i915: Round to closest when computing the VGA dotclock for LPT-H ville.syrjala
2015-12-02 13:45   ` Paulo Zanoni
2015-12-04 20:20   ` [PATCH v2 " ville.syrjala
2015-12-01 13:08 ` [PATCH 07/10] drm/i915: Disable FDI after the CRT port on LPT-H ville.syrjala
2015-12-02 14:01   ` Paulo Zanoni
2015-12-03 10:14     ` Ville Syrjälä
2015-12-04 20:20   ` [PATCH v2 " ville.syrjala
2015-12-07 17:51     ` Paulo Zanoni
2015-12-07 18:57       ` Ville Syrjälä
2015-12-08 14:04         ` Ville Syrjälä
2015-12-08 14:05     ` [PATCH] " ville.syrjala
2015-12-01 13:08 ` [PATCH 08/10] drm/i915: Refactor LPT-H VGA dotclock disabling ville.syrjala
2015-12-02 16:56   ` Paulo Zanoni
2015-12-03 10:15     ` Ville Syrjälä
2015-12-04 20:21   ` [PATCH v2 " ville.syrjala
2015-12-01 13:08 ` [PATCH 09/10] drm/i915: Disable LPT-H VGA dotclock during crtc disable ville.syrjala
2015-12-02 17:02   ` Paulo Zanoni
2015-12-03 10:29     ` Ville Syrjälä
2015-12-04 20:22   ` [PATCH v2 " ville.syrjala
2015-12-01 13:08 ` [PATCH 10/10] drm/i915: Leave FDI running after failed link training on LPT-H ville.syrjala
2015-12-02 17:16   ` Paulo Zanoni
2015-12-03 10:30     ` Ville Syrjälä
2015-12-04 10:09   ` Daniel Vetter
2015-12-04 11:59     ` Ville Syrjälä
2015-12-04 20:22   ` [PATCH v2 " ville.syrjala
2015-12-08 14:32 ` [PATCH 00/10] HSW/BDW PCH modeset fixes and stuff Ville Syrjälä

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151201181520.GL4437@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox