Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3032529imm; Thu, 24 May 2018 21:37:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp3Z6/UROanhNo1AY5gO1U9Zst3zuucM3fwgoGBkgbXTwIy3TuCKvOM/uf4OJDq2mNGuLRQ X-Received: by 2002:a17:902:7109:: with SMTP id a9-v6mr931893pll.271.1527223028980; Thu, 24 May 2018 21:37:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527223028; cv=none; d=google.com; s=arc-20160816; b=ZJMldyCpHEK1t961QtjhkEZX9BXJ6f3dGRvFg1r9D3Lj5Zi46cgCP9w8LNC+QpdrXS 68pOQpUaKsvEH1QfdGQFDBiW4ifT2xWKf4OkZjwBJqow7QqqX80+MCp6wxveRfnArCP9 uM2z/EgWkwqI2N38yzviaL6bf5ky53KWnmdi6VJxbZ9sED7+L/julhz6e9EfRhD8smyM A5aUMM8ew7erCC/7DN7EuHFXnQ/ZmRewgpAlZ0xvrLTp5GGpu5m1OVtAmuaPyEaCRn+j MaUxIeoBi6SGYNba1+kgekO+w4OpB8szxbKGWtTCFapK87SvFZLapzh6cFA+XLo5vN2L lptA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=bvMqJdZKK0sgFXYf80KRRVYZyDrHJPIPHE3T2g2Aid8=; b=j9DzSgK2DiR4m/m6KvTPoY9UGeys9/9WYlwpsXg6iERYxM2k/i/GTYq3IYdMbpwds1 Od1yuvN8Xba6Yzc/aXmyatHsQe6rcHFnJMGt4j18TBZ5TG6b2dztePDKEmhVah70YV6a YDD3yzQ6eSRKACBg7DqJKz6vSENttPhHeIagyBeQfdFYzwSYustTlLE8y2NKEyDrfkXR SQX7QL+bkC1wmzCbjHTvlT3WW4SMiMtnunuq0NgEAp07E7cvxyyJiJqp1CqPLDZy48Ql LDDXBbu1yLSehKGjubDAvhCII/YcuKMj3V/dLIOXuneM5QuVPB56U2Zhx9uuzAj3QFun AIrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=W0sEuSv5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c14-v6si1398289pgw.478.2018.05.24.21.36.54; Thu, 24 May 2018 21:37:08 -0700 (PDT) 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; dkim=pass header.i=@chromium.org header.s=google header.b=W0sEuSv5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752773AbeEYEgD (ORCPT + 99 others); Fri, 25 May 2018 00:36:03 -0400 Received: from mail-vk0-f65.google.com ([209.85.213.65]:37719 "EHLO mail-vk0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750913AbeEYEgA (ORCPT ); Fri, 25 May 2018 00:36:00 -0400 Received: by mail-vk0-f65.google.com with SMTP id m144-v6so2403658vke.4 for ; Thu, 24 May 2018 21:36:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bvMqJdZKK0sgFXYf80KRRVYZyDrHJPIPHE3T2g2Aid8=; b=W0sEuSv5/MVBncFwY3HA25oobzB9ynh1eCLWtxaS9QZ9baTCn2Gk3nbqakDuW6R7iw dD0YVHzQnx5ycq1lNxgVwHpugZO4xHNiOqn4Vx3zptjwQ7d2/DpMd6r4184HSgT3esDU DSPAoPVEwq+0pMsc5vZQAzoRLYiz8o86WBh4M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bvMqJdZKK0sgFXYf80KRRVYZyDrHJPIPHE3T2g2Aid8=; b=UakHzarb7rjmwQKrzu+k/NAbsZm5Tq4CvwXE4WNM2b+BMZZqUJfIygatOVE/JgxWuG 7IH9C2bygnwJ4U2irYbWBzv76i83DshtVGr1xkQiDErChi6qXa4hmYxElafPUX/bUYBm NObd54iBOupiTsRkAEtrwPp7vcAtq54YQmv7V1WLhzZVCVk5jYbK+96RifuAjJCM4hid CSh2v0R6MlE6fmObSl6YCdS99CKZ8ZC3tzEsF0NeAbxeXYIMyOsCBZCjAJMdvGwtEyZP bW2aeBi0gcwHQFEiye+quF5JDF6mO/dlYAgN1JNwy0nH5/o+p9bc5vUR9zoE20ZDveFU +0jQ== X-Gm-Message-State: ALKqPwecvMNKfaGUB9i0zsedxl0fFUGTbMQssezaFP2o/qqevhvQ/rcN ffNgI4ZiKyOwQ8iQMmQTzRQ61euBb7M= X-Received: by 2002:a1f:e785:: with SMTP id e127-v6mr438457vkh.53.1527222959304; Thu, 24 May 2018 21:35:59 -0700 (PDT) Received: from mail-ua0-f169.google.com (mail-ua0-f169.google.com. [209.85.217.169]) by smtp.gmail.com with ESMTPSA id s10-v6sm4328165vks.44.2018.05.24.21.35.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 May 2018 21:35:58 -0700 (PDT) Received: by mail-ua0-f169.google.com with SMTP id e8-v6so2610613uam.13 for ; Thu, 24 May 2018 21:35:57 -0700 (PDT) X-Received: by 2002:ab0:1162:: with SMTP id g34-v6mr515033uac.24.1527222957468; Thu, 24 May 2018 21:35:57 -0700 (PDT) MIME-Version: 1.0 References: <20180308094807.9443-1-jacob-chen@iotwrt.com> <20180308094807.9443-6-jacob-chen@iotwrt.com> <20180503090909.o3dyhukzs2y7em5z@tarshish> <20180507063814.vweb4p3nfgnoc3td@tarshish> <20180524113012.mt5b2f2vrhfrn3d7@tarshish> In-Reply-To: <20180524113012.mt5b2f2vrhfrn3d7@tarshish> From: Tomasz Figa Date: Fri, 25 May 2018 13:35:45 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6 05/17] media: rkisp1: add Rockchip ISP1 subdev driver To: baruch@tkos.co.il Cc: Jacob Chen , "open list:ARM/Rockchip SoC..." , Linux Kernel Mailing List , "open list:IOMMU DRIVERS" , Joerg Roedel , "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , Mauro Carvalho Chehab , Linux Media Mailing List , Sakari Ailus , Hans Verkuil , Shunqian Zheng , Laurent Pinchart , =?UTF-8?B?6ZKf5Lul5bSH?= , Eddie Cai , Jeffy , devicetree@vger.kernel.org, =?UTF-8?Q?Heiko_St=C3=BCbner?= , =?UTF-8?B?6ZmI5Z+O?= , Allon Huang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 24, 2018 at 8:30 PM Baruch Siach wrote: > Hi Tomasz, > On Mon, May 07, 2018 at 06:41:50AM +0000, Tomasz Figa wrote: > > On Mon, May 7, 2018 at 3:38 PM Baruch Siach wrote: > > > On Mon, May 07, 2018 at 06:13:27AM +0000, Tomasz Figa wrote: > > > > On Thu, May 3, 2018 at 6:09 PM Baruch Siach wrote: > > > > > On Thu, Mar 08, 2018 at 05:47:55PM +0800, Jacob Chen wrote: > > > > > > +static int rkisp1_isp_sd_s_power(struct v4l2_subdev *sd, int on) > > > > > > +{ > > > > > > + struct rkisp1_device *isp_dev = sd_to_isp_dev(sd); > > > > > > + int ret; > > > > > > + > > > > > > + v4l2_dbg(1, rkisp1_debug, &isp_dev->v4l2_dev, "s_power: %d\n", > > > > on); > > > > > > + > > > > > > + if (on) { > > > > > > + ret = pm_runtime_get_sync(isp_dev->dev); > > > > > > + if (ret < 0) > > > > > > + return ret; > > > > > > + > > > > > > + rkisp1_config_clk(isp_dev); > > > > > > + } else { > > > > > > + ret = pm_runtime_put(isp_dev->dev); > > > > > > > > > I commented this line out to make more than one STREAMON work. > > Otherwise, > > > > > the second STREAMON hangs. I guess the bug is not this driver. > > Probably > > > > > something in drivers/soc/rockchip/pm_domains.c. Just noting that in > > case > > > > > you or someone on Cc would like to investigate it further. > > > > > > > > > > I tested v4.16-rc4 on the Tinkerboard. > > > > > > > > Looks like that version doesn't include the IOMMU PM and clock handling > > > > rework [1], which should fix a lot of runtime PM issues. FWIW, > > linux-next > > > > seems to already include it. > > > > > > > > [1] https://lkml.org/lkml/2018/3/23/44 > > > > > Thanks for the reference. > > > > > It looks like the iommu driver part is in Linus' tree already. The DT > > part is > > > in the v4.18-armsoc/dts32 branch of Heiko's tree. Am I missing anything? > > > > You're right, most of the series made it in time for 4.17. However, the DT > > part (precisely, the clocks properties added to IOMMU nodes) is crucial for > > the fixes to be effective. > > > > > Anyway, I'll take a look. > > > > Thanks for testing. :) (Forgot to mention in my previous email...) > I finally got around to testing. Unfortunately, kernel v4.17-rc6 with > cherry-pick of commit c78751f91c0b (ARM: dts: rockchip: add clocks in iommu > nodes) from Heiko's tree still exhibit the same problem. STREAMON hangs on > second try. The same workaround "fixes" it. Thanks for testing. I'm out of ideas, since the same code seems to work fine for us in Chrome OS 4.4 kernel. Maybe we could have someone from RK take a look. Best regards, Tomasz