Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7199910imu; Tue, 22 Jan 2019 01:59:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN5R/sfjVt6rN0O0JHOmNsJUpTK/BAWqjIuc/kzzye/AgcsiTQFeeXYMxwuxfnnJ6wUcU5ne X-Received: by 2002:a17:902:e18d:: with SMTP id cd13mr33619812plb.262.1548151190548; Tue, 22 Jan 2019 01:59:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548151190; cv=none; d=google.com; s=arc-20160816; b=FqkTAiTU7XW1qFe+mIcyMN59mzw9G1UxamsnfnQ/MAhGk2Xw0da0XxDNxDfOMIUibL nAeKWxKlf6PmhakY5EV2wXjn/6JJ7HMAiis9TPOOiksFZ05h9obeFkBrXFaU08KudjDa ryU5N5YUmarLdxSs0ttwQFHzTYPgPzMLAz5klAw6dhoZMB9ibWkJb3WbjTH4soel6wJY bpswMRrvpn64iVT/z7muoDWENIk0EDuighzlW+R+qTAsxjSoYqrGNi40Xz9sjI5QIXdx Uf4Gv5ilx0iM35lQ1tVL+O45Z0WtJVb737jGyNywWJ4JQ2FiZBR9sg4pi/8+IE4ApLDV UDRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=fFbxiuZKNV0oAUoUcMbzpxyqYHTHWxG6aTW/U5DyhXQ=; b=lrTZX2VIV/E5x7RwoD7kaz5V8j5wayHR7qbPtUHkne8xHlVqbRFS1aZlIM58JfVLm8 BEeaCUr0g4PlAcXBZqGQWtSnf2Inz51xBhRiNBj/b2lUFys+rdxQFstN+v1nlTYZVzb9 Gc/3hNNr+UuE2UiFEHP6OM+wENMEGr99CIJJjfBQYLPUakYR8bhc45kyS3MGtVsFA6uK WzC0HXSkPMSRtIkp1dvEqpQ4HOIqyLYzaC3apx2wfVP7Tp1QrCQn3ieyJYeqoPh4gamG +KrW08VYb+/0A1TUwjFcZ+MKZRQL4LPpa4+dT0+cJgtYVFe493NGOQQbB1EhlXCrGt/d K3nA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i2si15680296pgl.153.2019.01.22.01.59.34; Tue, 22 Jan 2019 01:59:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727817AbfAVJ6Y (ORCPT + 99 others); Tue, 22 Jan 2019 04:58:24 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:55711 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727601AbfAVJ6X (ORCPT ); Tue, 22 Jan 2019 04:58:23 -0500 Received: from lupine.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:1a17] helo=lupine) by metis.ext.pengutronix.de with esmtp (Exim 4.89) (envelope-from ) id 1glsoz-00081s-Ab; Tue, 22 Jan 2019 10:58:17 +0100 Message-ID: <1548151096.3929.1.camel@pengutronix.de> Subject: Re: [PATCH v3 1/2] media: imx: csi: Disable SMFC before disabling IDMA channel From: Philipp Zabel To: Steve Longerbeam , linux-media@vger.kernel.org Cc: Gael PORTAY , Peter Seiderer , stable@vger.kernel.org, Mauro Carvalho Chehab , Greg Kroah-Hartman , "open list:STAGING SUBSYSTEM" , open list Date: Tue, 22 Jan 2019 10:58:16 +0100 In-Reply-To: <12937f2b-e25e-6cc5-0727-59a5e6224fd9@gmail.com> References: <20190119010457.2623-1-slongerbeam@gmail.com> <20190119010457.2623-2-slongerbeam@gmail.com> <1548071350.3287.3.camel@pengutronix.de> <7432d18b-12fc-34c6-832f-576fc1b8e2e8@gmail.com> <12937f2b-e25e-6cc5-0727-59a5e6224fd9@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2019-01-21 at 10:46 -0800, Steve Longerbeam wrote: > > On 1/21/19 10:43 AM, Steve Longerbeam wrote: > > > > > > On 1/21/19 3:49 AM, Philipp Zabel wrote: > > > Also ipu_smfc_disable is refcounted, so if the other CSI is capturing > > > simultaneously, this change has no effect. > > > > Sigh, you're right. Let me go back to disabling the CSI before the > > channel, the CSI enable/disable is not refcounted (it doesn't need to > > be since it is single use) so it doesn't have this problem. > > > > Should we drop this patch or keep it (with a big comment)? By only > > changing the disable order to "CSI then channel", the hang is reliably > > fixed from my and Gael's testing, but my concern is that by not > > disabling the SMFC before the channel, the SMFC could still empty its > > FIFO to the channel's internal FIFO and still create a hang. > > Well, as you said it will have no effect if both CSI's are streaming > with the SMFC, in which case the danger would still exist. Perhaps it > would be best to just drop this patch. Hm, if we can't guarantee the intended effect with this patch, and stopping the CSI first helps reliably, it's indeed better to just do that instead. regards Philipp