diff mbox

[1/5] drm/i915: check whether the pch is the soulmate of the cpu

Message ID 1351549416-2824-1-git-send-email-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter Oct. 29, 2012, 10:23 p.m. UTC
We don't really support fancy north display/pch combinations, so
put a big yelling WARN_ON in there. It /should/ be impossible, but
alas, the rumours don't stop (mostly due to really early silicon
sometimes using older PCHs).

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/i915_drv.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Paulo Zanoni Oct. 31, 2012, 5:31 p.m. UTC | #1
Hi

2012/10/29 Daniel Vetter <daniel.vetter@ffwll.ch>:
> We don't really support fancy north display/pch combinations, so
> put a big yelling WARN_ON in there. It /should/ be impossible, but
> alas, the rumours don't stop (mostly due to really early silicon
> sometimes using older PCHs).
>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/i915/i915_drv.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 6d0afc9..e09468c 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -423,19 +423,23 @@ void intel_detect_pch(struct drm_device *dev)
>                                 dev_priv->pch_type = PCH_IBX;
>                                 dev_priv->num_pch_pll = 2;
>                                 DRM_DEBUG_KMS("Found Ibex Peak PCH\n");
> +                               WARN_ON(!IS_GEN5(dev));
>                         } else if (id == INTEL_PCH_CPT_DEVICE_ID_TYPE) {
>                                 dev_priv->pch_type = PCH_CPT;
>                                 dev_priv->num_pch_pll = 2;
>                                 DRM_DEBUG_KMS("Found CougarPoint PCH\n");
> +                               WARN_ON(!IS_GEN6(dev) || IS_IVYBRIDGE(dev));

Did you mean "WARN_ON(!(IS_GEN6(dev) || IS_IVYBRIDGE(dev)));" here and
on the next check?

Also, does IVB really exist with CPT?

>                         } else if (id == INTEL_PCH_PPT_DEVICE_ID_TYPE) {
>                                 /* PantherPoint is CPT compatible */
>                                 dev_priv->pch_type = PCH_CPT;
>                                 dev_priv->num_pch_pll = 2;
>                                 DRM_DEBUG_KMS("Found PatherPoint PCH\n");
> +                               WARN_ON(!IS_GEN6(dev) || IS_IVYBRIDGE(dev));
>                         } else if (id == INTEL_PCH_LPT_DEVICE_ID_TYPE) {
>                                 dev_priv->pch_type = PCH_LPT;
>                                 dev_priv->num_pch_pll = 0;
>                                 DRM_DEBUG_KMS("Found LynxPoint PCH\n");
> +                               WARN_ON(!IS_HASWELL(dev));
>                         }
>                         BUG_ON(dev_priv->num_pch_pll > I915_NUM_PLLS);
>                 }
> --
> 1.7.11.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 6d0afc9..e09468c 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -423,19 +423,23 @@  void intel_detect_pch(struct drm_device *dev)
 				dev_priv->pch_type = PCH_IBX;
 				dev_priv->num_pch_pll = 2;
 				DRM_DEBUG_KMS("Found Ibex Peak PCH\n");
+				WARN_ON(!IS_GEN5(dev));
 			} else if (id == INTEL_PCH_CPT_DEVICE_ID_TYPE) {
 				dev_priv->pch_type = PCH_CPT;
 				dev_priv->num_pch_pll = 2;
 				DRM_DEBUG_KMS("Found CougarPoint PCH\n");
+				WARN_ON(!IS_GEN6(dev) || IS_IVYBRIDGE(dev));
 			} else if (id == INTEL_PCH_PPT_DEVICE_ID_TYPE) {
 				/* PantherPoint is CPT compatible */
 				dev_priv->pch_type = PCH_CPT;
 				dev_priv->num_pch_pll = 2;
 				DRM_DEBUG_KMS("Found PatherPoint PCH\n");
+				WARN_ON(!IS_GEN6(dev) || IS_IVYBRIDGE(dev));
 			} else if (id == INTEL_PCH_LPT_DEVICE_ID_TYPE) {
 				dev_priv->pch_type = PCH_LPT;
 				dev_priv->num_pch_pll = 0;
 				DRM_DEBUG_KMS("Found LynxPoint PCH\n");
+				WARN_ON(!IS_HASWELL(dev));
 			}
 			BUG_ON(dev_priv->num_pch_pll > I915_NUM_PLLS);
 		}