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=-7.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS 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 ACB21C04EB8 for ; Thu, 6 Dec 2018 16:57:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C8FF20838 for ; Thu, 6 Dec 2018 16:57:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nextdimension.cc header.i=@nextdimension.cc header.b="tbJv1UP1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C8FF20838 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=nextdimension.cc Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-media-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725907AbeLFQ5H (ORCPT ); Thu, 6 Dec 2018 11:57:07 -0500 Received: from bonobo.maple.relay.mailchannels.net ([23.83.214.22]:7831 "EHLO bonobo.maple.relay.mailchannels.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbeLFQ5H (ORCPT ); Thu, 6 Dec 2018 11:57:07 -0500 X-Greylist: delayed 600 seconds by postgrey-1.27 at vger.kernel.org; Thu, 06 Dec 2018 11:57:05 EST X-Sender-Id: dreamhost|x-authsender|brad@b-rad.cc Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id CC58D4306D; Thu, 6 Dec 2018 16:37:29 +0000 (UTC) Received: from pdx1-sub0-mail-a35.g.dreamhost.com (unknown [100.96.20.98]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 6C7BA42E88; Thu, 6 Dec 2018 16:37:29 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|brad@b-rad.cc Received: from pdx1-sub0-mail-a35.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Thu, 06 Dec 2018 16:37:29 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|brad@b-rad.cc X-MailChannels-Auth-Id: dreamhost X-Abortive-Average: 1581caa076dc917d_1544114249680_264752358 X-MC-Loop-Signature: 1544114249680:3376876583 X-MC-Ingress-Time: 1544114249679 Received: from pdx1-sub0-mail-a35.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a35.g.dreamhost.com (Postfix) with ESMTP id 073347F5D7; Thu, 6 Dec 2018 08:37:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=nextdimension.cc; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s= nextdimension.cc; bh=kkrO0ztESSLLBfdCu8Q8KgYrI74=; b=tbJv1UP18dB +qD0PPqKYfEiWqLfsAssKkk4lFnTq9jLhRYjf+a9akYxVeFhw1/SAsgAymG2BT5a bE6k2+Npq8X1x6g1lWc/a9v19EUyxuQ6sdjW+osujg5y5HiSeRDfjM6xcqk7tk3J F5orpofMqyHAYFHvFE6QL0+QyrIKfGBc= Received: from [192.168.0.21] (66-90-189-166.dyn.grandenetworks.net [66.90.189.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: brad@b-rad.cc) by pdx1-sub0-mail-a35.g.dreamhost.com (Postfix) with ESMTPSA id C5AB17F5CC; Thu, 6 Dec 2018 08:37:27 -0800 (PST) Subject: Re: [PATCH] Revert 95f408bb Ryzen DMA related RiSC engine stall fixes To: Mauro Carvalho Chehab , Markus Dobel , Brad Love Cc: linux-media@vger.kernel.org References: <3d7393a6287db137a69c4d05785522d5@gmx.de> <20181205090721.43e7f36c@coco.lan> X-DH-BACKEND: pdx1-sub0-mail-a35 From: Brad Love Openpgp: preference=signencrypt Autocrypt: addr=brad@nextdimension.cc; prefer-encrypt=mutual; keydata= xsFNBFjBn7UBEADLu822UvzHuo/b/8T+oTBQ7qLGq8OAb/GFDdttJSMreILjzfZvt6Zs8hRO PsUZ3djhOQB5pxrDA+wQgFsQ3T7jSC14bPq/IrKsb7WOaD12SozhgcgkMjoV/R4p9WciBU39 an5AU6WGBRUE5+Q1Yul20x1R9N9wciFCxVDAh1ibFfBqNbPLTAjd1PGj5Hqoa4oV6OaFDFj9 Qu1Xfu7TVq5mwrBgstsQtkJwug2adNjqN8eqJ3U8Fkrb7LDE7qbozKunlLQzr+YeiSLpu4SQ Li88JvKqVqLbQAOoGFb9lVHnbBSVU+XX8mSqhU1rh/NYJ4PdToFS7BpL+JeEFOmVlU20LwvD aJ8SpJrbT5bSQS12GXKp4MvKvVMfsdu+18kodTLxxFMhWRUFpZ1kh6NLfeAXRulmMQjxhJHp yZRJ2aSzNugOT18xBI25N/leOKfrcGgTDaFnL80MrwTs5b0sNvCqYzx1SObfkWkDPaejbWxu JEtQbtqeBSfi9R+DxRIqWIY8hODB9H6T2OINor+flABE1ucQ+dRzKyrJio8Ec2QIatFdymgw stPjDO/EYENf7oHhQW8GHfdN2exZ+V+2IGNpMKe20DHGEm96/GoEVVe/5u5T52k5e5dqrgTo k1HvhjYmfJGxDfilx2om2nHOQ4zP1bitgNZ8rLzAkJQ5U/2mZwARAQABzSdCcmFkIExvdmUg KE9TUykgPGJyYWRAbmV4dGRpbWVuc2lvbi5jYz7CwXcEEwEIACEFAljBn7UCGwMFCwkIBwIG FQgJCgsC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-5249-1b17-a8046493b383@nextdimension.cc> Date: Thu, 6 Dec 2018 10:37:26 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181205090721.43e7f36c@coco.lan> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-GB X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -70 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudefjedgledtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdlfedtmdenucfjughrpefuvfhfhffkffgfgggjtgfgsehtqhertddtfeejnecuhfhrohhmpeeurhgrugcunfhovhgvuceosghrrggusehnvgigthguihhmvghnshhiohhnrdgttgeqnecukfhppeeiiedrledtrddukeelrdduieeinecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopegludelvddrudeikedrtddrvddungdpihhnvghtpeeiiedrledtrddukeelrdduieeipdhrvghtuhhrnhdqphgrthhhpeeurhgrugcunfhovhgvuceosghrrggusehnvgigthguihhmvghnshhiohhnrdgttgeqpdhmrghilhhfrhhomhepsghrrggusehnvgigthguihhmvghnshhiohhnrdgttgdpnhhrtghpthhtohepmhgthhgvhhgrsgeskhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi Mauro & Markus, On 05/12/2018 05.07, Mauro Carvalho Chehab wrote: > Em Sun, 21 Oct 2018 15:45:39 +0200 > Markus Dobel escreveu: > >> The original commit (the one reverted in this patch) introduced a=20 >> regression, >> making a previously flawless adapter unresponsive after running a few = >> hours >> to days. Since I never experienced the problems that the original comm= it=20 >> is >> supposed to fix, I propose to revert the change until a regression-fre= e >> variant is found. >> >> Before submitting this, I've been running a system 24x7 with this reve= rt=20 >> for >> several weeks now, and it's running stable again. >> >> It's not a pure revert, as the original commit does not revert cleanly= >> anymore due to other changes, but content-wise it is. >> >> Signed-off-by: Markus Dobel >> --- >> drivers/media/pci/cx23885/cx23885-core.c | 60 ----------------------= -- >> drivers/media/pci/cx23885/cx23885-reg.h | 14 ------ >> 2 files changed, 74 deletions(-) >> >> diff --git a/drivers/media/pci/cx23885/cx23885-core.c=20 >> b/drivers/media/pci/cx23885/cx23885-core.c >> index 39804d830305..606f6fc0e68b 100644 >> --- a/drivers/media/pci/cx23885/cx23885-core.c >> +++ b/drivers/media/pci/cx23885/cx23885-core.c >> @@ -601,25 +601,6 @@ static void cx23885_risc_disasm(struct=20 >> cx23885_tsport *port, > Patch was mangled by your e-mailer: it broke longer lines, causing > it to not apply. > > Also, before just reverting the entire thing, could you please check > if the enclosed hack would solve it? > > If so, it should be easy to add a quirk at drivers/pci/quirks.c > in order to detect the Ryzen models with a bad DMA engine that > require periodic resets, and then make cx23885 to use it. > > We did similar tricks before with some broken DMA engines, at > the time we had overlay support on drivers and AMD controllers > didn't support PCI2PCI DMA transfers. > > Brad, > > Could you please address this issue? I'll try to address this today or tomorrow. Since the original patch was applied I have not received any complaints from ryzen users, but we have accumulated a few reports from Intel users with a variety of motherboards that do now encounter issue. Strangely system load affects the repro; low/no load exhibits the error condition, high system load everything is fine. I'll do my best to send in a ryzen specific patch by the weekend. Regards, Brad > > > diff --git a/drivers/media/pci/cx23885/cx23885-core.c b/drivers/media/p= ci/cx23885/cx23885-core.c > index 39804d830305..8b012bee6b32 100644 > --- a/drivers/media/pci/cx23885/cx23885-core.c > +++ b/drivers/media/pci/cx23885/cx23885-core.c > @@ -603,8 +603,14 @@ static void cx23885_risc_disasm(struct cx23885_tsp= ort *port, > =20 > static void cx23885_clear_bridge_error(struct cx23885_dev *dev) > { > - uint32_t reg1_val =3D cx_read(TC_REQ); /* read-only */ > - uint32_t reg2_val =3D cx_read(TC_REQ_SET); > + uint32_t reg1_val, reg2_val; > + > + /* TODO: check for Ryzen quirk */ > + if (1) > + return; > + > + reg1_val =3D cx_read(TC_REQ); /* read-only */ > + reg2_val =3D cx_read(TC_REQ_SET); > =20 > if (reg1_val && reg2_val) { > cx_write(TC_REQ, reg1_val); > > > > Thanks, > Mauro