aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2013-11-04 16:07:00 -0800
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-11-05 19:29:01 +0100
commitf64a28a7c5ab2fc342326de9e126acf3cc0f91d6 (patch)
treea8449559e09c86fbb2fcf65b6952df76820a6e69 /drivers
parent586f49dc781314f1e6b1133f6d966d670c219a67 (diff)
downloadlinaro-lsk-f64a28a7c5ab2fc342326de9e126acf3cc0f91d6.tar.gz
drm/i915/vlv: fixup DDR freq detection per Punit spec
Either the docs were wrong or the values have changed since the old days before we had wheels. Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 13afd54ca6e..a5778e59cc1 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5319,15 +5319,22 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
mutex_unlock(&dev_priv->rps.hw_lock);
switch ((val >> 6) & 3) {
case 0:
- case 1:
dev_priv->mem_freq = 800;
break;
- case 2:
+ case 1:
dev_priv->mem_freq = 1066;
break;
- case 3:
+ case 2:
dev_priv->mem_freq = 1333;
break;
+ case 3:
+ /*
+ * Probably a BIOS/Punit bug, or a new platform we don't
+ * support yet.
+ */
+ WARN(1, "invalid DDR freq detected, assuming 800MHz\n");
+ dev_priv->mem_freq = 800;
+ break;
}
DRM_DEBUG_DRIVER("DDR speed: %d MHz", dev_priv->mem_freq);