drm/i915: Clamp efficient frequency to valid range
authorTom O'Rourke <Tom.O'Rourke@intel.com>
Wed, 11 Feb 2015 07:06:46 +0000 (23:06 -0800)
committerJani Nikula <jani.nikula@intel.com>
Wed, 11 Feb 2015 12:09:51 +0000 (14:09 +0200)
commit46efa4abe5712276494adbce102f46e3214632fd
treea84284678d162e82b33327e94e8d27c7c1f10431
parenta8b3d52f8bc24b1c1bf7711bcf3e21fe0aaa752c
drm/i915: Clamp efficient frequency to valid range

The efficient frequency (RPe) should stay in the range
RPn <= RPe <= RP0.  The pcode clamps the returned value
internally on Broadwell but not on Haswell.

Fix for missing range check in
commit 93ee29203f506582cca2bcec5f05041526d9ab0a
Author: Tom O'Rourke <Tom.O'Rourke@intel.com>
Date:   Wed Nov 19 14:21:52 2014 -0800

    drm/i915: Use efficient frequency for HSW/BDW

Reference: http://lists.freedesktop.org/archives/intel-gfx/2015-February/059802.html
Reported-by: Michael Auchter <a@phire.org>
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@vger.kernel.org # v3.19
Signed-off-by: Tom O'Rourke <Tom.O'Rourke@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_pm.c