Skip to content

Commit

Permalink
drm/i915/vlv: fixup DDR freq detection per Punit spec
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jesse Barnes authored and Daniel Vetter committed Nov 5, 2013
1 parent 586f49d commit f64a28a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions drivers/gpu/drm/i915/intel_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit f64a28a

Please sign in to comment.