From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH 4/6] drm/i915: Serialize all register access Date: Mon, 15 Jul 2013 20:20:07 -0700 Message-ID: <20130716032007.GA634@bwidawsk.net> References: <1373637756-11852-1-git-send-email-chris@chris-wilson.co.uk> <1373637756-11852-4-git-send-email-chris@chris-wilson.co.uk> <20130712203728.GI15384@bwidawsk.net> <20130712205246.GG23323@cantiga.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from shiva.localdomain (unknown [209.20.75.48]) by gabe.freedesktop.org (Postfix) with ESMTP id DCF08E63FB for ; Mon, 15 Jul 2013 20:16:47 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130712205246.GG23323@cantiga.alporthouse.com> 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 , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, Jul 12, 2013 at 09:52:46PM +0100, Chris Wilson wrote: > On Fri, Jul 12, 2013 at 01:37:28PM -0700, Ben Widawsky wrote: > > On Fri, Jul 12, 2013 at 03:02:34PM +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. > > > > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63914 > > > Signed-off-by: Chris Wilson > > > > You are crossing the point of no return here for doing this only on HSW > > where the bug is known to exist. As you are the resident performance > > curmudgeon I'll defer to you if that's okay or not... just pointing it > > out. > > I looked at all the extra checks we are doing in addition to just > reading/writing the register and thought it would be better to close any > races there. Hence why I think this is a correctness fix above and > beyond the hsw issue. > -Chris > > -- > Chris Wilson, Intel Open Source Technology Centre Oh, one more thing on this patch... can you please add a Wa comment marker in the code. I don't have a name for this wa, but if you can't find anything in the wa database, just call it whatever you feel like, so long as the tool will pick it up. -- Ben Widawsky, Intel Open Source Technology Center