Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1921830ybb; Thu, 9 Apr 2020 11:29:22 -0700 (PDT) X-Google-Smtp-Source: APiQypLoEWEtBB+scmYKjbMhmTbn50zGx9P6jThtUnmYZ2rzGbKMfzjDEDx5+pXmuUdV14/n0uaY X-Received: by 2002:a37:490:: with SMTP id 138mr190878qke.378.1586456961924; Thu, 09 Apr 2020 11:29:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586456961; cv=none; d=google.com; s=arc-20160816; b=GogUMvrdtBxwZxfFjjOCxZxmWd2lZgYxd8QA/yqNWgR4TjSL0sgZSsziPyB/Eg1uUi vSyO9cZmjPeQqn6pzcRGQ869I1YJcyh/VIArbMZhFOlfkeAv93QFjDjuq3GQ6e+xBsxX Ub5nVVEqobTXI3G3i/C8CHNvEtFRHGK0UVHpO7GiEq5MRkQCkZiQNXjQyOs3Lpp5CP1L kxlCZvdmjW/44nMudqoVd3ybsjzTh1UXESyRSNn6rUrJueymf/wpgR3OMEwUzNk/zNCt UbWY6UGws3zuHZT7rftdGr3t/vBc4+itTAMFPZQBlz7zgLL4MHWQfoIijBZeAq0LVVMh xQSQ== 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-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=J/aG9q8CC/oWgBUBz0DhAt3fXvAn/5D8wg8H/6egt/k=; b=plrpHgWo/eNRGPk/dGDuZPkDJgUrAdixCcxd8IYLKPP7cJLRm48FSG/ZgYRWViLr/K h/26jbx02EhCZnfFnsfmvgiuU9Gz77DDdNQCQ5hwDnY7rvEQpMcq8MvtfZZ7RA8UdbFy 7c6dZoLSi6qNerKdaXRujLS12Ys8UmAG8A5Y+ancWmMOVjsY7x5cOXYqxB2318+i3Z06 RSyj79m/dAqVwNpBNp1lyHJ1qYNEQeyLqHrZmHE86qxhPJEe/vSU/QD4i8Ixkz0vrHVY hrqy1xRzoRqsXzzUkce6ZkDLGWER/7aSxjRZVJc/MIzG+6log/F7bLoi8Duu4d96gKQd dQvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=YPzLgxQA; 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 d205si6754701qke.279.2020.04.09.11.29.02; Thu, 09 Apr 2020 11:29:21 -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=@nvidia.com header.s=n1 header.b=YPzLgxQA; 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 S1726646AbgDIS2S (ORCPT + 99 others); Thu, 9 Apr 2020 14:28:18 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:9757 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726595AbgDIS2S (ORCPT ); Thu, 9 Apr 2020 14:28:18 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 09 Apr 2020 11:27:24 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Thu, 09 Apr 2020 11:28:18 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Thu, 09 Apr 2020 11:28:18 -0700 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 9 Apr 2020 18:28:17 +0000 Received: from [10.2.171.241] (10.124.1.5) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 9 Apr 2020 18:28:16 +0000 Subject: Re: [RFC PATCH v6 6/9] media: tegra: Add Tegra210 Video input driver To: Dmitry Osipenko , , , , , , CC: , , , , , References: <1585963507-12610-1-git-send-email-skomatineni@nvidia.com> <760d071e-0cbc-b3eb-9231-fb9f9ecb44a6@nvidia.com> <9e317f65-8a02-3b15-cfec-8e0d8374130e@gmail.com> <97b35910-4c93-123a-43a0-eb14476ed0f3@nvidia.com> <84ad4e2d-6ac1-e1f4-1c55-5edaae850631@nvidia.com> <15a879b3-8fb9-6821-3cdc-104ba583ac12@gmail.com> <0c425505-347f-7418-af7e-d121fe0d06dc@nvidia.com> <1a31cd60-739f-0660-1c45-31487d2f2128@nvidia.com> <603084a5-249a-4fe2-3646-e9335ef9ab43@nvidia.com> <7895b9c6-f27d-8939-73d7-67d785e1a8b7@nvidia.com> <15d8b525-67b5-b437-f7fd-89f80cd0d9f6@nvidia.com> <7288cacd-badc-cb01-1f4c-286dd024ca10@gmail.com> From: Sowjanya Komatineni Message-ID: <77c88717-618f-b366-2b6a-f8b4abaa66cc@nvidia.com> Date: Thu, 9 Apr 2020 11:28:15 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <7288cacd-badc-cb01-1f4c-286dd024ca10@gmail.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To DRHQMAIL107.nvidia.com (10.27.9.16) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1586456844; bh=J/aG9q8CC/oWgBUBz0DhAt3fXvAn/5D8wg8H/6egt/k=; 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-Transfer-Encoding: Content-Language; b=YPzLgxQABUqO8OPEPQuriGTYqhWKxRFVQrPN++BwMsEhM6J9i6K8noQnvD0TY2Knu RiBq8AfHissKuS2udec8T94gBVNUEIdF49dfKr0zhbfzVMgl+IgneaUjB6vIlJqvow qK8v9s3lxrmlKiTI9Ow6XuZsKHp6Ig4oSqJJCnziLNupWfqC/z3kUSbkdKRPLlIDNO h/vRsMsyimqOCe6d1PfptFD6mGbK3Z174Gwhdgp3Fdwy2I4ZxkXFgkEgzO57j1hE+g kqtVlEcahsvxGcs8vH+QZvais40AOL7k/7vszJlqJ4A1IxGLDp9UXAY+qMWoNJvvOM vX53TCKI0iRcg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/9/20 7:50 AM, Dmitry Osipenko wrote: > External email: Use caution opening links or attachments > > > 09.04.2020 06:38, Sowjanya Komatineni =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > ... >> Tested with 3 buffers and by checking outstanding buffers in process by >> VI hw and holding to start capture till one outstanding buffer in >> process by HW. >> Also tested with 2 buffers without checking for outstanding buffers. >> >> In both cases, I see same %CPU for the kthreads and is < 1% >> > I don't see where buffers queue max limit is set to 3 in the code, but > should be okay if CPU isn't getting hogged. Looking forward to v7. Sorry, correction I meant to say pre-queued buffers before streaming not=20 num_buffers. vb2 queue min_buffers_needed was set to 3 as part of one of the issue=20 debug in earlier version which actually was irrelevant to that issue and=20 should have been removed. Will remove min_buffers_needed in v7. I added checking for outstanding requests by hardware just to be safer=20 although we may not hit this case of issuing more than 1 outstanding=20 frame capture to VI hardware as capture_frame() waits till it sees frame=20 start event through HW syncpt increment before proceeding for memory=20 write and issuing next frame capture. So issuing frame captures are synchronized with frame start and frame end. Will remove min_buffers_needed and also explicit check for outstanding=20 buffers in v7.