Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp592791imu; Wed, 23 Jan 2019 02:03:52 -0800 (PST) X-Google-Smtp-Source: ALg8bN6nXvRPyA6gGFJCNqjSKt4JyirB9jR5zXs6FbfNzzaoLbvTqosabRYNbotXoOqHfOQODDMH X-Received: by 2002:a17:902:12b:: with SMTP id 40mr1592997plb.72.1548237832628; Wed, 23 Jan 2019 02:03:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548237832; cv=none; d=google.com; s=arc-20160816; b=dnEBDyQDz5JInKBawkQUq99kTLmdcbt7n6x9o1LIe6v5l6HLn9f6/Zf/9YVzffTVFn II2+YZjnGYbrF55jg6l9YkkQx8ceRU50JHCBMXCw0MD3nrLz4KY6SUkq0oeFGFaYtQF9 wrinF3e/p/CEug74c7u31nhudVT/ftGRqwo3bXIQQQQneY4YcuzbjdofvfhqvB1haRJD ziwFQv4kuc+mbMq6Ba4PO7PUE+6Ti+92Ik4nx1rUeZWVEZqCq4Xo8SnVkRCrIWfJEnUL iMGCyqFIpLvLSzKESppi0lYHW5+FHoY8HTm/UfX+oyNqkhPx2b1fIRQRPvb1dSXqf/S2 qt1A== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=IHRz0QY5CZdQdoIc8komNLLlrqiTiPWXxllEMlAtARM=; b=UPZRREXklRVqnKK3SMVZRGO+dnFQfGSy9YwJYUqE/aMvHxJ4ksAl190tbNNBO+WN1v fUAC8Kwu0PjVRMCgaWDHPrkMYf6mCQVdtOKCRqoEDdD3/0N/4kVl1rnDFMVYftXe/Y8A Kal+sz/UcPQpyaU2WaSLCN4HPAtmC4M4sKsduQNXcsdvl8uTp6Um9NbQHRGfRrFUbi/8 RBgqsz0uvKyuxWH5OvhWh8tkyo/5/9yXSurvlwl9wWXJ1Ovkv1Y3O0N2aGNqJfxWalDF 1KcpmE6vAGNFzgIFOyYt186xwH/xOqfh2/t2Xo7wZTKe925sJcxlQ0NktVXy0zMlulyK WtUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="G/Jj4jtn"; 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 91si19006257ply.214.2019.01.23.02.03.37; Wed, 23 Jan 2019 02:03:52 -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=@chromium.org header.s=google header.b="G/Jj4jtn"; 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 S1727323AbfAWKCg (ORCPT + 99 others); Wed, 23 Jan 2019 05:02:36 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:37062 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727090AbfAWKCf (ORCPT ); Wed, 23 Jan 2019 05:02:35 -0500 Received: by mail-ot1-f65.google.com with SMTP id s13so1405497otq.4 for ; Wed, 23 Jan 2019 02:02:35 -0800 (PST) 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:content-transfer-encoding; bh=IHRz0QY5CZdQdoIc8komNLLlrqiTiPWXxllEMlAtARM=; b=G/Jj4jtnKEpWTpEANW8y1CoH2U7MVFQE4/JJokkOHiGo4RSdztEqc6Yfgozx4nGkCC e28o9RqZJhkPGmowb1WxKMgHlFPIlumm4KFp7ct9QR56npU3mTR1FNzSBz6AcTGbKcs6 lbh45MItOkxJS7teB2fmWDpKVD5WpThu2wlqI= 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:content-transfer-encoding; bh=IHRz0QY5CZdQdoIc8komNLLlrqiTiPWXxllEMlAtARM=; b=Fqqh1yzl9oTMpRPNMm1Hs7IKhcTlHZ38f29aTfJppoQQYT0xRJHCNDkj+LtBjr/fV9 WU/wdMEz/4lC4W5E1CMTG4qs7ldaTTmrFogz4gMTu1yATLWErf4DZJEzcgWZHvngKzlH YsHvH36WYI6dsqrUiHbp3DtU9upFPLc4ROGCeguVY8FweUUkDUcqEag3rujViszGId9N FtMh4aAcHvMnir3hmxMb7MF/wbmnsQhzja6ibYZ0VuLQIlim6sc36iAz9mYDvvqYhZ4a naq+kFIMu9lbElG3BgmDZ+zehi293C2a+tHMqsIQm2LF8o36BAoiOhHTY2E/U2+KJWkN ow2g== X-Gm-Message-State: AJcUukdyB5qAHFFudZdPqw2GO8dbcvvGAtYgSxmTfJM+svrxP051y8Ay 9n0IUO6BwdiQYa39GBNphDAXErQZ6cw= X-Received: by 2002:a9d:d83:: with SMTP id 3mr935928ots.361.1548237754333; Wed, 23 Jan 2019 02:02:34 -0800 (PST) Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com. [209.85.167.175]) by smtp.gmail.com with ESMTPSA id m129sm8740546oif.50.2019.01.23.02.02.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jan 2019 02:02:33 -0800 (PST) Received: by mail-oi1-f175.google.com with SMTP id u18so1290709oie.10 for ; Wed, 23 Jan 2019 02:02:32 -0800 (PST) X-Received: by 2002:aca:5a88:: with SMTP id o130mr1024574oib.275.1548237752296; Wed, 23 Jan 2019 02:02:32 -0800 (PST) MIME-Version: 1.0 References: <20181022144901.113852-1-tfiga@chromium.org> <20181022144901.113852-3-tfiga@chromium.org> <4cd223f0-b09c-da07-f26c-3b3f7a8868d7@xs4all.nl> <5fb0f2db44ba7aa3788b61f2aa9a30d4f4984de5.camel@ndufresne.ca> In-Reply-To: From: Tomasz Figa Date: Wed, 23 Jan 2019 19:02:21 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/2] media: docs-rst: Document memory-to-memory video encoder interface To: Nicolas Dufresne Cc: Hans Verkuil , Linux Media Mailing List , Linux Kernel Mailing List , Mauro Carvalho Chehab , =?UTF-8?B?UGF3ZcWCIE/Fm2NpYWs=?= , Alexandre Courbot , Kamil Debski , Andrzej Hajda , Kyungmin Park , Jeongtae Park , Philipp Zabel , Tiffany Lin , Andrew-CT Chen , Stanimir Varbanov , Todor Tomov , Paul Kocialkowski , Laurent Pinchart , dave.stevenson@raspberrypi.org, Ezequiel Garcia , Maxime Jourdan Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 18, 2018 at 10:34 AM Nicolas Dufresne wr= ote: > > Le samedi 17 novembre 2018 =C3=A0 12:37 +0100, Hans Verkuil a =C3=A9crit = : > > > > Does V4L2_CID_MIN_BUFFERS_FOR_CAPTURE make any sense for encoders? > > > > > > We do account for it in GStreamer (the capture/output handling is > > > generic), but I don't know if it's being used anywhere. > > > > Do you use this value directly for REQBUFS, or do you use it as the min= imum > > value but in practice use more buffers? > > We add more buffers to that value. We assume this value is what will be > held by the driver, hence without adding some buffers, the driver would > go idle as soon as one is dequeued. We also need to allocate for the > importing driver. > > In general, if we have a pipeline with Driver A sending to Driver B, > both driver will require a certain amount of buffers to operate. E.g. > with DRM display, the driver will hold on 1 buffer (the scannout > buffer). > > In GStreamer, it's implemented generically, so we do: > > MIN_BUFFERS_FOR + remote_min + 1 > > If only MIN_BUFFERS_FOR was allocated, ignoring remote driver > requirement, the streaming will likely get stuck. What happens if the driver doesn't report it? Best regards, Tomasz