From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Osipenko Subject: Re: [RFC PATCH v6 6/9] media: tegra: Add Tegra210 Video input driver Date: Fri, 10 Apr 2020 21:47:50 +0300 Message-ID: <00708f34-cf45-e248-c6b0-c3d2286671ca@gmail.com> 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> <77c88717-618f-b366-2b6a-f8b4abaa66cc@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <77c88717-618f-b366-2b6a-f8b4abaa66cc@nvidia.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Sowjanya Komatineni , thierry.reding@gmail.com, jonathanh@nvidia.com, frankc@nvidia.com, hverkuil@xs4all.nl, sakari.ailus@iki.fi, helen.koike@collabora.com Cc: sboyd@kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-tegra@vger.kernel.org 09.04.2020 21:28, Sowjanya Komatineni пишет: > > 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 пишет: >> ... >>> 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 > num_buffers. > vb2 queue min_buffers_needed was set to 3 as part of one of the issue > debug in earlier version which actually was irrelevant to that issue and > should have been removed. Will remove min_buffers_needed in v7. > > I added checking for outstanding requests by hardware just to be safer > although we may not hit this case of issuing more than 1 outstanding > frame capture to VI hardware as capture_frame() waits till it sees frame > start event through HW syncpt increment before proceeding for memory > 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 > buffers in v7. It's still not clear to me how the "pre-queued buffers" will be limited. I'll take another look at the v7.