提交 f64a28a7 编写于 作者: J Jesse Barnes 提交者: Daniel Vetter

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: NVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 586f49dc
...@@ -5319,15 +5319,22 @@ static void valleyview_init_clock_gating(struct drm_device *dev) ...@@ -5319,15 +5319,22 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
mutex_unlock(&dev_priv->rps.hw_lock); mutex_unlock(&dev_priv->rps.hw_lock);
switch ((val >> 6) & 3) { switch ((val >> 6) & 3) {
case 0: case 0:
case 1:
dev_priv->mem_freq = 800; dev_priv->mem_freq = 800;
break; break;
case 2: case 1:
dev_priv->mem_freq = 1066; dev_priv->mem_freq = 1066;
break; break;
case 3: case 2:
dev_priv->mem_freq = 1333; dev_priv->mem_freq = 1333;
break; 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); DRM_DEBUG_DRIVER("DDR speed: %d MHz", dev_priv->mem_freq);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册