From patchwork Tue Jul 16 20:19:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barnes X-Patchwork-Id: 2828307 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 969089F967 for ; Tue, 16 Jul 2013 20:19:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 54FBA20145 for ; Tue, 16 Jul 2013 20:19:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id BB3E52015D for ; Tue, 16 Jul 2013 20:19:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 93587E6B9E for ; Tue, 16 Jul 2013 13:19:45 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from oproxy12-pub.bluehost.com (oproxy12-pub.bluehost.com [50.87.16.10]) by gabe.freedesktop.org (Postfix) with SMTP id 254DFE5C5C for ; Tue, 16 Jul 2013 13:19:31 -0700 (PDT) Received: (qmail 23484 invoked by uid 0); 16 Jul 2013 20:19:30 -0000 Received: from unknown (HELO box514.bluehost.com) (74.220.219.114) by oproxy12.bluehost.com with SMTP; 16 Jul 2013 20:19:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuousgeek.org; s=default; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=tBhPUpViMO70t74tRqK+xf5liHEeqLF0BcWCPRVnpIU=; b=YVQvdwxuJl3PaCEeuBCKiHlrDVUX5POqTsngCVMDMWG4AygJUQJOHggNJRmHAaRodaJO6eNArQzi7RM+oAIdbk/GsXktt5B59ai3GkKmC16amGEEa40o3j2B7FV5RD1c; Received: from [67.161.37.189] (port=52068 helo=jbarnes-desktop) by box514.bluehost.com with esmtpsa (TLSv1:CAMELLIA128-SHA:128) (Exim 4.80) (envelope-from ) id 1UzBia-00017s-GM; Tue, 16 Jul 2013 14:19:28 -0600 Date: Tue, 16 Jul 2013 13:19:25 -0700 From: Jesse Barnes To: Jesse Barnes Subject: Re: [Intel-gfx] [PATCH] drm/i915: fix long-standing SNB regression in power consumption after resume Message-ID: <20130716131925.7997a7ed@jbarnes-desktop> In-Reply-To: <20130716100654.1185c031@jbarnes-desktop> References: <20130714163009.22374.22100.stgit@zurg> <51E2E65D.5050803@openvz.org> <20130716063101.GK5784@phenom.ffwll.local> <20130716100654.1185c031@jbarnes-desktop> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 67.161.37.189 authed with jbarnes@virtuousgeek.org} Cc: Daniel Vetter , intel-gfx , Linux Kernel Mailing List , dri-devel , Alexander Kaltsas , Konstantin Khlebnikov , rocko X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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, 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;