From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [Intel-gfx] [PATCH 1/6] drm/i915: Serialize almost all register access Date: Sat, 20 Jul 2013 10:55:24 +0200 Message-ID: <20130720085524.GT5615@phenom.ffwll.local> References: <1374262616-2099-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1374262616-2099-1-git-send-email-chris@chris-wilson.co.uk> Sender: stable-owner@vger.kernel.org To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org List-Id: intel-gfx@lists.freedesktop.org On Fri, Jul 19, 2013 at 08:36:51PM +0100, Chris Wilson wrote: > In theory, the different register blocks were meant to be only ever > touched when holding either the struct_mutex, mode_config.lock or even a > specific localised lock. This does not seem to be the case, and the > hardware reacts extremely badly if we attempt to concurrently access two > registers within the same cacheline. > > The HSD suggests that we only need to do this workaround for display > range registers. However, upon review we need to serialize the multiple > stages in our register write functions - if only for preemption > protection. > > Irrespective of the hardware requirements, the current io functions are > a little too loose with respect to the combination of pre- and > post-condition testing that we do in conjunction with the actual io. As > a result, we may be pre-empted and generate both false-postive and > false-negative errors. > > Note well that this is a "90%" solution, there remains a few direct > users of ioread/iowrite which will be fixed up in the next few patches. > Since they are more invasive and that this simple change will prevent > almost all lockups on Haswell, we kept this patch simple to facilitate > backporting to stable. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63914 > Signed-off-by: Chris Wilson > Cc: stable@vger.kernel.org Picked up for -fixes, thanks for the patch. For the others I need to backmerge first before I can slurp them in. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch