diff mbox

[RFC] drm/i915: downclock support

Message ID 20090724010342.GA6948@srcf.ucam.org (mailing list archive)
State Superseded
Headers show

Commit Message

Matthew Garrett July 24, 2009, 1:03 a.m. UTC
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 <mjg@redhat.com>
diff mbox

Patch

From f45ba3685d6aaf1f754d5dfc5b1ffea761f1d2c8 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg59@2510p.(none)>
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