From patchwork Mon Mar 21 09:27:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenyu Wang X-Patchwork-Id: 647421 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 p2L9UFH6021077 for ; Mon, 21 Mar 2011 09:30:37 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DB03D9E959 for ; Mon, 21 Mar 2011 02:30:15 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id CD3149E8D1 for ; Mon, 21 Mar 2011 02:27:24 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 21 Mar 2011 02:27:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.63,218,1299484800"; d="scan'208";a="669413534" Received: from ubuntu-hp.sh.intel.com ([10.239.36.56]) by fmsmga002.fm.intel.com with ESMTP; 21 Mar 2011 02:27:24 -0700 From: Zhenyu Wang To: intel-gfx@lists.freedesktop.org Date: Mon, 21 Mar 2011 17:27:17 +0800 Message-Id: <1300699639-23996-7-git-send-email-zhenyuw@linux.intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1300699639-23996-1-git-send-email-zhenyuw@linux.intel.com> References: <1300699639-23996-1-git-send-email-zhenyuw@linux.intel.com> Subject: [Intel-gfx] [PATCH 6/8] drm/i915: change force wake order for GT read 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]); Mon, 21 Mar 2011 09:30:37 +0000 (UTC) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index dd8bd5c..a55b71d 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -264,10 +264,6 @@ void __gen6_gt_force_wake_get(struct drm_i915_private *dev_priv) { int count; - count = 0; - while (count++ < 50 && (I915_READ_NOTRACE(FORCEWAKE_ACK) & 1)) - udelay(10); - I915_WRITE_NOTRACE(FORCEWAKE, 1); POSTING_READ(FORCEWAKE); @@ -278,8 +274,15 @@ void __gen6_gt_force_wake_get(struct drm_i915_private *dev_priv) void __gen6_gt_force_wake_put(struct drm_i915_private *dev_priv) { + int count; + I915_WRITE_NOTRACE(FORCEWAKE, 0); POSTING_READ(FORCEWAKE); + + count = 0; + while (count++ < 50 && (I915_READ_NOTRACE(FORCEWAKE_ACK) & 1)) + udelay(10); + } void __gen6_gt_wait_for_fifo(struct drm_i915_private *dev_priv)