Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp411672ybl; Fri, 31 Jan 2020 01:03:40 -0800 (PST) X-Google-Smtp-Source: APXvYqyhZ1f+hOzUI1u3yLkgvf/3//H6vEM9oqJyPaITX3Ow4Hxbnqg0jgaRWj52G7785a88kCBX X-Received: by 2002:a9d:760e:: with SMTP id k14mr6571147otl.344.1580461420126; Fri, 31 Jan 2020 01:03:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580461420; cv=none; d=google.com; s=arc-20160816; b=WHeaUc2MUmf0xhfIWnJ6Se1L0XYWs3NsMczDURYxtDRBt5zbQZEtcBHRrYNtP75336 +YiMu/nSAdQcrGtzL1Dg2eQYpVtIGUD6YKPguyVeTG+5A0LBdOnMfSRcoJt5yAsfuQD4 CRyIrlYO+2iotBpqEfscTPetxyBWcDX4WFt7wYJ14kim5NAFb6p7/VaxOZXrmuisTE6Z gdrVwkSbAtB3oYjTboDte1V5jjeGEPBeF9Ymp4tYEThip7E/d0OgWvMCpIuv1+Fj8fTF JmW9KWw+4WMd5UFly3qrswQWMI5cpVhwMZQXKWWkV/eqG+/TE3TgKpz6xMqQyI7r/BbG n1GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Nk8oL5vCVqBnXjso+RrvQFAoO6KnCVKaJeZz6xzsl/8=; b=fvVIMzX3kA6oKFUTfbs9kTWXDS/3vedJOBEeh+2MQmTDQnqVc6NgDOOBKOQJpdNe6J jDbUy4CMLx5C2X3Looh71L1NVrUVh1pMM6xrjSCCquwxRzS8t5zgl/FbQ3nJe2rvCMu2 RytM47cuSiwRsWyjpuNYugVhi+KB4LvMTImPKLo6gJAEfjwGhY1Ff4vGd1K2dj27Qxn6 Ldp7QQxOYTSJk4YfSnbrcrJROHLECIee7rjVNPCNsGOKTjYlbW64lPvQ07K7nm2ooSbu wKTU1/To5S0EyXqB94y/VInZVGoYuFfNE+tTDejeJK+mc5o8pacODBlMsllGA1oE4tKn eT6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=qwbWlB+g; 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=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u3si4068896oif.167.2020.01.31.01.03.27; Fri, 31 Jan 2020 01:03:40 -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; dkim=pass header.i=@nvidia.com header.s=n1 header.b=qwbWlB+g; 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=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728214AbgAaJCe (ORCPT + 99 others); Fri, 31 Jan 2020 04:02:34 -0500 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:3532 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728151AbgAaJCd (ORCPT ); Fri, 31 Jan 2020 04:02:33 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 31 Jan 2020 01:02:12 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Fri, 31 Jan 2020 01:02:33 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 31 Jan 2020 01:02:33 -0800 Received: from [10.21.133.51] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 31 Jan 2020 09:02:30 +0000 Subject: Re: [PATCH v6 11/16] dmaengine: tegra-apb: Keep clock enabled only during of DMA transfer To: Dmitry Osipenko , Laxman Dewangan , Vinod Koul , Dan Williams , Thierry Reding , =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= CC: , , References: <20200130043804.32243-1-digetx@gmail.com> <20200130043804.32243-12-digetx@gmail.com> <2442aee7-2c2a-bacc-7be9-8eed17498928@nvidia.com> <0c766352-700a-68bf-cf7b-9b1686ba9ca9@gmail.com> From: Jon Hunter Message-ID: <315241b5-f5a2-aaa0-7327-24055ff306c7@nvidia.com> Date: Fri, 31 Jan 2020 09:02:28 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1580461332; bh=Nk8oL5vCVqBnXjso+RrvQFAoO6KnCVKaJeZz6xzsl/8=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=qwbWlB+gnELGMmzJ3pe37/TS2E+2LuhUkCNcL2NaqwxRWPmyf0QOxcCDraC4TSeph 2OwXztiZS6lHCux/v7HxJml83AnYTVuRtM8iwSs20T8IttrgRmOadQ3yolR8JrncQW Nl6bEub3LzAAdS5zTBgW+F+YF1Nf4HUHZ4ai4JXCaREK6gvA0nqZGp0itxIKNuPkn/ Fv89ucRjsykm+QCN/WyuUtv6i6jnq82zNI9qER0NvVauq/ycUrterl4c5/OckFzbwB Bl33XCYMzOHkkjeseXmMqimSW0RATB3T40SVn4o7QrriUpQlIlOTiI0khQaMwBmFNz ceIBhl8RhUEbQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/01/2020 20:04, Dmitry Osipenko wrote: ... >>> The tegra_dma_stop() should put RPM anyways, which is missed in yours >>> sample. Please see handle_continuous_head_request(). >> >> Yes and that is deliberate. The cyclic transfers the transfers *should* >> not stop until terminate_all is called. The tegra_dma_stop in >> handle_continuous_head_request() is an error condition and so I am not >> sure it is actually necessary to call pm_runtime_put() here. > > But then tegra_dma_stop() shouldn't unset the "busy" mark. True. >>> I'm also finding the explicit get/put a bit easier to follow in the >>> code, don't you think so? >> >> I can see that, but I was thinking that in the case of cyclic transfers, >> it should only really be necessary to call the get/put at the beginning >> and end. So in my mind there should only be two exit points which are >> the ISR handler for SG and terminate_all for SG and cyclic. > > Alright, I'll update this patch. Hmmm ... I am wondering if we should not mess with that and leave how you have it. -- nvpublic