Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1142636imu; Sat, 17 Nov 2018 17:35:04 -0800 (PST) X-Google-Smtp-Source: AJdET5dkSs6dY2shTckZexQhtotctCgLXGsj7DRW43pY2J0cqSCAGdzX22+nfK8MhOrBEjTx1jZi X-Received: by 2002:a63:2b01:: with SMTP id r1mr15140207pgr.432.1542504904275; Sat, 17 Nov 2018 17:35:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542504904; cv=none; d=google.com; s=arc-20160816; b=Sq+K30C1QaxhjLOCoHfJBUQKccvMUrJpX0x/IzI/Yf2HkgNUJ58rRmZElYgGFz40tf iXO/coX3+PjiGS9nlhWMOiByPIMoTe7TaWxdjn5jHESRhx3lj2kpuGixFYnbrRKel7IV 3mVse64AwOC5kn2MlR6tTuhkQLU9ZXyyvp9sPmavWDuzy+MoZEPcyXPwOdS1gghCUkX+ 8v5c7OiHHLDHJTCpFrs8hx005fpG6xJ2tnrFnLlWircga4978dIowxoePhGprQZNCxjc 4t/HdkjUiPSb7od4xrxKmIz/BLCLd4hg6QBEHUVTQlkytGsL6KeKNoQbx7RgGKzQKOAm briw== 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:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=OUuuLVKQmpzTRzbDcGUkrYelcoT1vhEiVcG0jYik4hI=; b=l6Vn/ahydXHhl6roBQvPIr1xI5pKb6XgjOSseCrZAJ4aW6YKx/IdP8zWQiHCL59sRg E5144lHkuOnoNO8UGm8wlUGF2co52wxJRH3cmv0KdOFvAAb2Tz2FBY+ntfD48lbgyfXs RPccwGTdr7si52+Oaf63B1A1vbtKXWUFWbfMWe/BMESlRVZeJQi+RpmcbeG8yuPD1WXH +Hd4FTqgEUSmm/VQP1xziq3fn7uv3vxzBS3BTeXB8rE7tc3PFkLhhjiCL1DNqtZ4fg/A wgjTNTUBPfurPZo1PeNzCrA3a7es6RKxxvSaRn67YEYtDI0Xxwt1GiKUTuoj0Ue7tz2P Rkww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b=KrqGIiI6; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q8si2030530pgc.580.2018.11.17.17.34.48; Sat, 17 Nov 2018 17:35:04 -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=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b=KrqGIiI6; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725942AbeKRLwt (ORCPT + 99 others); Sun, 18 Nov 2018 06:52:49 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:38293 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725807AbeKRLwt (ORCPT ); Sun, 18 Nov 2018 06:52:49 -0500 Received: by mail-qk1-f194.google.com with SMTP id d19so43575244qkg.5 for ; Sat, 17 Nov 2018 17:34:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ndufresne-ca.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=OUuuLVKQmpzTRzbDcGUkrYelcoT1vhEiVcG0jYik4hI=; b=KrqGIiI6p1tXZa6hYaFyAQOohtHENWbzzXo3jUQZtFAvcKTAiqFZ4dYP+4ncrW9OA8 +AYsMCDtOcHTYsl4kPp6k57YRnqpLaAlYX+OuZb7zkhrOVBMYMew45/7WfWUwCPoljNL qxsOooGwONEE/MPe5fC7LNQRBc+SOyVoqBq7Kj2yQw93sq8l1yAUZEwbqUF1UCVAIUR+ SKJ+rrDt/s2WRKPhV8OUau1TCwt21oSVD4VU9tnIx5DCSuv/IGU3CNmcNFTWiTG0HEQK Ad0rGl4AdGDWYuoeNUVVb+Y3xmfrXij/WfqcqtohH0qLZZDtFnrJyycD7jLSsJunmhSK vAfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=OUuuLVKQmpzTRzbDcGUkrYelcoT1vhEiVcG0jYik4hI=; b=jrKm3ySgQimJSfJKUR5cyNhRfsmgIFe333PKjrPmxTPINa7wGzXy4QVq3ezIqS0Mi1 pJvTwFKJzDs2lYmjfd0nH8tYBucdetZ3mI6S69EWNyEKhQpri1FZhPNXLvWX41oAOEGp 4Ez6nMoOVz/Vn6zuUjy4ooLor2KsTrfpExR/15KDOHuAxV4T5tQ8fp1o1U3COu9FEqg9 UGmZMUDAWBlNBmfOk8N5Tq1SMk4/M4F5KgMSH9F7GnJIclDRjrb3wbye2+HHl/kxc0F5 j8CEXLBNiNeUH7l53L/rg4lb/f3YuzU8I/fHoxtTwDzMoaku5svtAOgChz4OSJligpqh 1E3Q== X-Gm-Message-State: AGRZ1gI45CODq1QuSWBdwzCTCsa5sl6YctGlVA1ps7vURY6tsEXQDYqt vBabtCyVSNqxvjXfxCJfTpunWQ== X-Received: by 2002:aed:3ff0:: with SMTP id w45mr15667187qth.214.1542504851129; Sat, 17 Nov 2018 17:34:11 -0800 (PST) Received: from skullcanyon (cable-192.222.193.21.electronicbox.net. [192.222.193.21]) by smtp.gmail.com with ESMTPSA id r142sm15606468qke.27.2018.11.17.17.34.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 17 Nov 2018 17:34:10 -0800 (PST) Message-ID: Subject: Re: [PATCH v2 2/2] media: docs-rst: Document memory-to-memory video encoder interface From: Nicolas Dufresne To: Hans Verkuil , Tomasz Figa , linux-media@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , =?UTF-8?Q?Pawe=C5=82_O=C5=9Bciak?= , 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 Date: Sat, 17 Nov 2018 20:34:08 -0500 In-Reply-To: References: <20181022144901.113852-1-tfiga@chromium.org> <20181022144901.113852-3-tfiga@chromium.org> <4cd223f0-b09c-da07-f26c-3b3f7a8868d7@xs4all.nl> <5fb0f2db44ba7aa3788b61f2aa9a30d4f4984de5.camel@ndufresne.ca> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.2 (3.30.2-2.fc29) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le samedi 17 novembre 2018 à 12:37 +0100, Hans Verkuil a écrit : > > > 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 minimum > 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. regards, Nicolas