From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFE7EC2BA2B for ; Fri, 10 Apr 2020 14:02:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8BB9220A8B for ; Fri, 10 Apr 2020 14:02:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8BB9220A8B Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=etezian.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3896B6E0E5; Fri, 10 Apr 2020 14:02:49 +0000 (UTC) X-Greylist: delayed 2148 seconds by postgrey-1.36 at gabe; Fri, 10 Apr 2020 14:02:47 UTC Received: from 20.mo5.mail-out.ovh.net (20.mo5.mail-out.ovh.net [91.121.55.239]) by gabe.freedesktop.org (Postfix) with ESMTPS id 81B766E0E5 for ; Fri, 10 Apr 2020 14:02:47 +0000 (UTC) Received: from player716.ha.ovh.net (unknown [10.110.115.178]) by mo5.mail-out.ovh.net (Postfix) with ESMTP id E443E273708 for ; Fri, 10 Apr 2020 15:47:11 +0200 (CEST) Received: from etezian.org (213-243-141-64.bb.dnainternet.fi [213.243.141.64]) (Authenticated sender: andi@etezian.org) by player716.ha.ovh.net (Postfix) with ESMTPSA id 634EA113C45CA; Fri, 10 Apr 2020 13:47:08 +0000 (UTC) Date: Fri, 10 Apr 2020 16:47:02 +0300 From: Andi Shyti To: Chris Wilson Message-ID: <20200410134702.GA264232@jack.zhora.eu> References: <20200410083347.25128-1-chris@chris-wilson.co.uk> <20200410083535.25464-1-chris@chris-wilson.co.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200410083535.25464-1-chris@chris-wilson.co.uk> X-Ovh-Tracer-Id: 8709680207301296649 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduhedrvddvgdejtdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughiucfuhhihthhiuceorghnughisegvthgviihirghnrdhorhhgqeenucfkpheptddrtddrtddrtddpvddufedrvdegfedrudeguddrieegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpqdhouhhtpdhhvghlohepphhlrgihvghrjeduiedrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpegrnhguihesvghtvgiiihgrnhdrohhrghdprhgtphhtthhopehinhhtvghlqdhgfhigsehlihhsthhsrdhfrhgvvgguvghskhhtohhprdhorhhg Subject: Re: [Intel-gfx] [PATCH] agp/intel: Reinforce the barrier after GTT updates X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Hi Chris, > After changing the timing between GTT updates and execution on the GPU, > we started seeing sporadic failures on Ironlake. These were narrowed > down to being an insufficiently strong enough barrier/delay after > updating the GTT and scheduling execution on the GPU. By forcing the > uncached read, and adding the missing barrier for the singular > insert_page (relocation paths), the sporadic failures go away. > > Fixes: 983d308cb8f6 ("agp/intel: Serialise after GTT updates") > Signed-off-by: Chris Wilson > Cc: stable@vger.kernel.org # v4.0+ Acked-by: Andi Shyti Andi > --- > drivers/char/agp/intel-gtt.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c > index 66a62d17a3f5..3d42fc4290bc 100644 > --- a/drivers/char/agp/intel-gtt.c > +++ b/drivers/char/agp/intel-gtt.c > @@ -846,6 +846,7 @@ void intel_gtt_insert_page(dma_addr_t addr, > unsigned int flags) > { > intel_private.driver->write_entry(addr, pg, flags); > + readl(intel_private.gtt + pg); > if (intel_private.driver->chipset_flush) > intel_private.driver->chipset_flush(); > } > @@ -871,7 +872,7 @@ void intel_gtt_insert_sg_entries(struct sg_table *st, > j++; > } > } > - wmb(); > + readl(intel_private.gtt + j - 1); > if (intel_private.driver->chipset_flush) > intel_private.driver->chipset_flush(); > } > @@ -1105,6 +1106,7 @@ static void i9xx_cleanup(void) > > static void i9xx_chipset_flush(void) > { > + wmb(); > if (intel_private.i9xx_flush_page) > writel(1, intel_private.i9xx_flush_page); > } _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4693DC2BA2B for ; Fri, 10 Apr 2020 15:04:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 220442082D for ; Fri, 10 Apr 2020 15:04:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726203AbgDJPE5 (ORCPT ); Fri, 10 Apr 2020 11:04:57 -0400 Received: from 9.mo178.mail-out.ovh.net ([46.105.75.45]:39734 "EHLO 9.mo178.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726049AbgDJPE4 (ORCPT ); Fri, 10 Apr 2020 11:04:56 -0400 X-Greylist: delayed 4197 seconds by postgrey-1.27 at vger.kernel.org; Fri, 10 Apr 2020 11:04:55 EDT Received: from player716.ha.ovh.net (unknown [10.110.171.131]) by mo178.mail-out.ovh.net (Postfix) with ESMTP id D69349A618 for ; Fri, 10 Apr 2020 15:47:11 +0200 (CEST) Received: from etezian.org (213-243-141-64.bb.dnainternet.fi [213.243.141.64]) (Authenticated sender: andi@etezian.org) by player716.ha.ovh.net (Postfix) with ESMTPSA id 634EA113C45CA; Fri, 10 Apr 2020 13:47:08 +0000 (UTC) Date: Fri, 10 Apr 2020 16:47:02 +0300 From: Andi Shyti To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org Subject: Re: [Intel-gfx] [PATCH] agp/intel: Reinforce the barrier after GTT updates Message-ID: <20200410134702.GA264232@jack.zhora.eu> References: <20200410083347.25128-1-chris@chris-wilson.co.uk> <20200410083535.25464-1-chris@chris-wilson.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200410083535.25464-1-chris@chris-wilson.co.uk> X-Ovh-Tracer-Id: 8709680207301296649 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduhedrvddvgdejtdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughiucfuhhihthhiuceorghnughisegvthgviihirghnrdhorhhgqeenucfkpheptddrtddrtddrtddpvddufedrvdegfedrudeguddrieegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpqdhouhhtpdhhvghlohepphhlrgihvghrjeduiedrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpegrnhguihesvghtvgiiihgrnhdrohhrghdprhgtphhtthhopehsthgrsghlvgesvhhgvghrrdhkvghrnhgvlhdrohhrgh Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Hi Chris, > After changing the timing between GTT updates and execution on the GPU, > we started seeing sporadic failures on Ironlake. These were narrowed > down to being an insufficiently strong enough barrier/delay after > updating the GTT and scheduling execution on the GPU. By forcing the > uncached read, and adding the missing barrier for the singular > insert_page (relocation paths), the sporadic failures go away. > > Fixes: 983d308cb8f6 ("agp/intel: Serialise after GTT updates") > Signed-off-by: Chris Wilson > Cc: stable@vger.kernel.org # v4.0+ Acked-by: Andi Shyti Andi > --- > drivers/char/agp/intel-gtt.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c > index 66a62d17a3f5..3d42fc4290bc 100644 > --- a/drivers/char/agp/intel-gtt.c > +++ b/drivers/char/agp/intel-gtt.c > @@ -846,6 +846,7 @@ void intel_gtt_insert_page(dma_addr_t addr, > unsigned int flags) > { > intel_private.driver->write_entry(addr, pg, flags); > + readl(intel_private.gtt + pg); > if (intel_private.driver->chipset_flush) > intel_private.driver->chipset_flush(); > } > @@ -871,7 +872,7 @@ void intel_gtt_insert_sg_entries(struct sg_table *st, > j++; > } > } > - wmb(); > + readl(intel_private.gtt + j - 1); > if (intel_private.driver->chipset_flush) > intel_private.driver->chipset_flush(); > } > @@ -1105,6 +1106,7 @@ static void i9xx_cleanup(void) > > static void i9xx_chipset_flush(void) > { > + wmb(); > if (intel_private.i9xx_flush_page) > writel(1, intel_private.i9xx_flush_page); > }