From: Jesse Barnes Subject: [PATCH 1/2] drm/i915: check for power well in redisable VGA with generic fn Date: Fri, 11 Oct 2013 12:41:03 -0700 Message-ID: <1381520464-12521-1-git-send-email-jbarnes@virtuousgeek.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from outbound-ss-1017.hostmonster.com (outbound-ss-1017.hostmonster.com [74.220.214.63]) by gabe.freedesktop.org (Postfix) with SMTP id 603EEE832C for ; Fri, 11 Oct 2013 12:41:07 -0700 (PDT) Received: from [67.161.37.189] (port=57072 helo=localhost.localdomain) by box514.bluehost.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.80) (envelope-from ) id 1VUiaA-0004uk-TB for intel-gfx@lists.freedesktop.org; Fri, 11 Oct 2013 13:41:07 -0600 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org Rather than using a HSW specific check. Signed-off-by: Jesse Barnes --- drivers/gpu/drm/i915/intel_display.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 53c4ea8..5452b34 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -10667,8 +10667,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) && - (I915_READ(HSW_PWR_WELL_DRIVER) & HSW_PWR_WELL_STATE_ENABLED) == 0) + if (!intel_display_power_enabled(dev, POWER_DOMAIN_VGA)) return; if (I915_READ(vga_reg) != VGA_DISP_DISABLE) { -- 1.8.3.1