From patchwork Thu Feb 24 04:00:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Widawsky X-Patchwork-Id: 586241 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1O41F5T017932 for ; Thu, 24 Feb 2011 04:01:35 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B05AD9F035 for ; Wed, 23 Feb 2011 20:01:14 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-yi0-f49.google.com (mail-yi0-f49.google.com [209.85.218.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 0B0C39E7FA for ; Wed, 23 Feb 2011 20:00:55 -0800 (PST) Received: by yic15 with SMTP id 15so85765yic.36 for ; Wed, 23 Feb 2011 20:00:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=QSUI2R798Z2UE4dZ4cEH3qt3XQFWx2jZRe8lP6ttXn8=; b=EI6f3G0lH7nlIwHuF+hGpEu4NMfGSaHD1vRYnCPJzu/C7HZqrCH/HMfHBAw1uNsDCL SWVRtlFt99CaYvviQnN1SuD2zALncPeJCQHCtyx3uESeVCSCBArdIQebQFENqA29/zGZ k01HAcQVaHU7O6O+WZ47OGWMza65O/qDUmM4Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=qetBg3/SvgW99D199ZfU+gs8bBzNVhHDLVmCBtvBRhnaMaNw4kbRHlu+ulMIWQ+Dih xbJn4JVYp4DYvkSOKgiAYzTjUPO6OE0uS6P4/yPBxarY6fYFTzDsybEqKKQ3U8blkWKn XqugTk4OdMdisKjlHcCan9J6hF4q1says9LLE= Received: by 10.150.189.9 with SMTP id m9mr1184736ybf.318.1298520055399; Wed, 23 Feb 2011 20:00:55 -0800 (PST) Received: from localhost.localdomain ([67.208.96.87]) by mx.google.com with ESMTPS id g29sm5311695yhh.36.2011.02.23.20.00.54 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Feb 2011 20:00:54 -0800 (PST) From: Ben Widawsky To: intel-gfx@lists.freedesktop.org Date: Wed, 23 Feb 2011 20:00:47 -0800 Message-Id: <1298520047-3160-1-git-send-email-bwidawsk@gmail.com> X-Mailer: git-send-email 1.7.3.4 Subject: [Intel-gfx] [PATCH] drm/i915/display: stop potential rc6 disable infinite retries X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 24 Feb 2011 04:01:35 +0000 (UTC) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 94622e3..32ac4f1 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -6483,6 +6483,7 @@ static void ironlake_teardown_rc6(struct drm_device *dev) static void ironlake_disable_rc6(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; + static int max_tries = 100; if (I915_READ(PWRCTXA)) { /* Wake the GPU, prevent RC6, then restore RSTDBYCTL */ @@ -6496,8 +6497,10 @@ static void ironlake_disable_rc6(struct drm_device *dev) I915_WRITE(RSTDBYCTL, I915_READ(RSTDBYCTL) & ~RCX_SW_EXIT); POSTING_READ(RSTDBYCTL); } - - ironlake_disable_rc6(dev); + if (max_tries--) + ironlake_disable_rc6(dev); + else + DRM_DEBUG_DRIVER("Failed to disable RC6\n"); } static int ironlake_setup_rc6(struct drm_device *dev)