From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Workaround hang with BSD and forcewake on SandyBridge Date: Sun, 15 Jul 2012 17:05:44 +0200 Message-ID: <20120715150544.GC5184@phenom.ffwll.local> References: <1342341758-1261-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id E52089E752 for ; Sun, 15 Jul 2012 08:05:40 -0700 (PDT) Received: by weyr3 with SMTP id r3so3663960wey.36 for ; Sun, 15 Jul 2012 08:05:40 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1342341758-1261-1-git-send-email-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Sun, Jul 15, 2012 at 09:42:38AM +0100, Chris Wilson wrote: > For reasons that are not apparent to anybody, 990bbdadaba (drm/i915: > Group the GT routines together in both code and vtable) breaks the use > of the BitStream Decoder ring on SandyBridge. The active ingredient of > that patch is the conversion from a udelay(10) to a udelay(1) in the > busy-wait loop of waiting for the forcewake acknowledge. If we restore > that udelay(10) or insert another udelay(1) afterwards (or any wait > longer than 250ns) everything works again. An alternative is also to > remove any delay from the busy-wait loop. > > Given that in the atomic sections we want to complete the wait as quick > as possible to avoid blocking the CPU for too long, it makes sense to > remove the delay altogether and simply spin on the exit condition until > it completes. So we replace the udelay(1) with cpu_relax(). > > Papers over regression from > > commit 990bbdadabaa51828e475eda86ee5720a4910cc3 > Author: Chris Wilson > Date: Mon Jul 2 11:51:02 2012 -0300 > > drm/i915: Group the GT routines together in both code and vtable > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51738 > Signed-off-by: Chris Wilson Dragon, iceberg or elephant, that's the question ... Patch merged to dinq, thanks a lot for wrestling the strange things in this dungeon. -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48