[02/10] drm/i915: Don't register CRT connectro when DDI E can't be used

Submitted by Ville Syrjälä on Dec. 1, 2015, 1:08 p.m.

Details

Message ID 1448975321-20192-3-git-send-email-ville.syrjala@linux.intel.com
State New
Headers show
Series "HSW/BDW PCH modeset fixes and stuff" ( rev: 3 2 1 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Ville Syrjälä Dec. 1, 2015, 1:08 p.m.
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

On HSW/BDW DDI A and E share 2 lanes, so when DDI A requires the
shared lanes DDI E can't be used. The lanes are not suppsoed to
be dynamically switched between the two uses, so there's no point
in registering the CRT connector when DDI E has no lanes.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index c3d5a7319ef4..e80387dd6582 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14259,6 +14259,10 @@  static bool intel_crt_present(struct drm_device *dev)
 	if (HAS_PCH_LPT(dev) && I915_READ(SFUSE_STRAP) & SFUSE_STRAP_CRT_DISABLED)
 		return false;
 
+	/* DDI E can't be used if DDI A requires 4 lanes */
+	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)
 		return false;
 

Comments

2015-12-01 11:08 GMT-02:00  <ville.syrjala@linux.intel.com>:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Subject: s/connectro/connector/

>
> On HSW/BDW DDI A and E share 2 lanes, so when DDI A requires the
> shared lanes DDI E can't be used. The lanes are not suppsoed to

s/suppsoed/supposed/

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

> be dynamically switched between the two uses, so there's no point
> in registering the CRT connector when DDI E has no lanes.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index c3d5a7319ef4..e80387dd6582 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14259,6 +14259,10 @@ static bool intel_crt_present(struct drm_device *dev)
>         if (HAS_PCH_LPT(dev) && I915_READ(SFUSE_STRAP) & SFUSE_STRAP_CRT_DISABLED)
>                 return false;
>
> +       /* DDI E can't be used if DDI A requires 4 lanes */
> +       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)
>                 return false;
>
> --
> 2.4.10
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx