From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [Intel-gfx] [PATCH] drm/i915: fix long-standing SNB regression in power consumption after resume Date: Tue, 16 Jul 2013 13:19:25 -0700 Message-ID: <20130716131925.7997a7ed@jbarnes-desktop> References: <20130714163009.22374.22100.stgit@zurg> <51E2E65D.5050803@openvz.org> <20130716063101.GK5784@phenom.ffwll.local> <20130716100654.1185c031@jbarnes-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130716100654.1185c031@jbarnes-desktop> Sender: linux-kernel-owner@vger.kernel.org To: Jesse Barnes Cc: Konstantin Khlebnikov , David Airlie , Daniel Vetter , intel-gfx , Linux Kernel Mailing List , dri-devel , Alexander Kaltsas , rocko List-Id: dri-devel@lists.freedesktop.org On Tue, 16 Jul 2013 10:06:54 -0700 Jesse Barnes wrote: > On Tue, 16 Jul 2013 11:34:25 +0400 > Konstantin Khlebnikov wrote: > > I've tested that patch and it really works for me. If you want change > > something for other hardware or > > extend range where forcewake is held prease do it in a separate patch. > > This will be good for bisecting new bugs in the future. > > Thanks a ton for finding this Konstantin, it puts us on the right > track. > > Can I ask you to test this patch? The theory is that having RC6 > enabled messes with the initial programming sequence, so it's probably > best to just shut it off at init until we're done, rather than trying > to forcewake around everywhere we need it. Oops, last one triggers a warn about IRQs. This one doesn't and still works for me. Testing welcome. Thanks, -- Jesse Barnes, Intel Open Source Technology Center diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index c9d9d20..d962ec0 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -4112,6 +4112,9 @@ i915_gem_init_hw(struct drm_device *dev) drm_i915_private_t *dev_priv = dev->dev_private; int ret; + /* BIOS often leaves RC6 enabled, but disable it for hw init */ + intel_disable_gt_powersave(dev); + if (INTEL_INFO(dev)->gen < 6 && !intel_enable_gtt()) return -EIO;