From patchwork Fri Jul 24 01:03:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Garrett X-Patchwork-Id: 37048 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6O13lDo007562 for ; Fri, 24 Jul 2009 01:03:47 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E60769E8F9; Thu, 23 Jul 2009 18:03:46 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from cavan.codon.org.uk (cavan.codon.org.uk [93.93.128.6]) by gabe.freedesktop.org (Postfix) with ESMTP id A68CF9E74C for ; Thu, 23 Jul 2009 18:03:44 -0700 (PDT) Received: from mjg59 by cavan.codon.org.uk with local (Exim 4.69) (envelope-from ) id 1MU9CI-0001oF-Ip; Fri, 24 Jul 2009 02:03:42 +0100 Date: Fri, 24 Jul 2009 02:03:42 +0100 From: Matthew Garrett To: Jesse Barnes Message-ID: <20090724010342.GA6948@srcf.ucam.org> References: <20090722121607.29042660@jbarnes-g45> <20090723132723.5c1bf3e3@jbarnes-g45> <20090723141840.2993a31f@jbarnes-g45> <20090723143202.672558c9@jbarnes-g45> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20090723143202.672558c9@jbarnes-g45> User-Agent: Mutt/1.5.18 (2008-05-17) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: mjg59@cavan.codon.org.uk X-SA-Exim-Scanned: No (on cavan.codon.org.uk); SAEximRunCond expanded to false Cc: intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] [RFC] drm/i915: downclock support X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Here's three minor cleanups. The first cleans up the render clock code and ensures that the hardware isn't driven out of spec. The second restores the gpu clock on module exit. The third avoids reading card registers except when necessary. Signed-off-by: Matthew Garrett From f45ba3685d6aaf1f754d5dfc5b1ffea761f1d2c8 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Fri, 24 Jul 2009 01:00:33 +0100 Subject: [PATCH 3/3] Don't call downclock for CRTCs that are already busy --- drivers/gpu/drm/i915/intel_display.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index c663bad..e2f8743 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3186,8 +3186,9 @@ void intel_mark_busy(struct drm_device *dev, struct drm_gem_object *obj) intel_crtc = to_intel_crtc(crtc); intel_fb = to_intel_framebuffer(crtc->fb); if (intel_fb->obj == obj) { + if (!intel_crtc->busy) + intel_increase_displayclock(crtc, true); intel_crtc->busy = true; - intel_increase_displayclock(crtc, true); mod_timer(&intel_crtc->idle_timer, jiffies + msecs_to_jiffies(CRTC_IDLE_TIMEOUT)); } -- 1.6.3.3