drm/i915: protect HSW power well check with IS_HASWELL in redisable_vga
authorJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 25 Nov 2013 15:15:32 +0000 (17:15 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 26 Nov 2013 19:06:43 +0000 (20:06 +0100)
This may need work if other platforms do the same thing, but in the
meantime we should avoid looking at HSW specific bits in this generic
function.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
[added IS_BROADWELL too as that needs the same handling (Imre)]
Signed-off-by: Imre Deak <imre.deak@intel.com>
[danvet: Add Imre's missing sob.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index aa1a6c1e90eaac3f7e06b639dc6ff7573a7eb6f3..22b7b141a22fc2d9c6543663d2c2bc6136377b91 100644 (file)
@@ -11032,7 +11032,7 @@ void i915_redisable_vga(struct drm_device *dev)
         * level, just check if the power well is enabled instead of trying to
         * follow the "don't touch the power well if we don't need it" policy
         * the rest of the driver uses. */
-       if (HAS_POWER_WELL(dev) &&
+       if ((IS_HASWELL(dev) || IS_BROADWELL(dev)) &&
            (I915_READ(HSW_PWR_WELL_DRIVER) & HSW_PWR_WELL_STATE_ENABLED) == 0)
                return;