drm/i915: Initialise min/max frequencies before updating RPS registers
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 6 Nov 2013 15:56:26 +0000 (13:56 -0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 7 Nov 2013 18:13:07 +0000 (19:13 +0100)
commit6917c7b9d9083272ddf7e64f5482e8820a31fb3c
treec083fc280b8265d9d213511206b047c1bf93862a
parentc5bd2bf61d487cd0125433aeaadd8bb87a11ccff
drm/i915: Initialise min/max frequencies before updating RPS registers

The RPS register writing routines use the current value of min/max to
set certain limits and interrupt gating. If we set those afterwards, we
risk setting up the hw incorrectly and losing power management events,
and worse, trigger some internal assertions.

Reorder the calling sequences to be correct, and remove the then
unrequired clamping from inside set_rps(). And for a bonus, fix the bug
of calling gen6_set_rps() from Valleyview.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
CC: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_sysfs.c
drivers/gpu/drm/i915/intel_pm.c