Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2266858imm; Sun, 9 Sep 2018 20:37:37 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda0iAnbZfcfgAfmSXyTlnghlRQD4h166w7c6BQ+brrvCWUUACNPVpl5VE+1BI6M8DteQ2zL X-Received: by 2002:a62:1605:: with SMTP id 5-v6mr21390599pfw.11.1536550657926; Sun, 09 Sep 2018 20:37:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536550657; cv=none; d=google.com; s=arc-20160816; b=AoBrlHYXVnZsar2+LuWXNt4OVxKQjovO3qyT3xs8SwNK1mIgf7iqZrtQ2lJ89PfgV3 PVk6IyaqKafOiM5EHJcuo1edNTLguRSUylFqw2cqH3C5lEDM5c0JgxvX3MAO6YaTLAdA 4JADpYuxvk2NtZ5fBdldAGhPUQ2q9GtHKABNzT/WI+ErMuuZtWj/ljDUl0E/R/fQWb4Q 9GvAZgbEc4fa/eAZgYeZD89thJnaHwIKiW3Mh940y/m1alhwdBE0bYlEYEek3Owk/ttX In/5rsT+ljgR061bS1JAFxp3PKPpFB90dgFfX+bwULFNHme2YdU7aZycxPskVRn/TLaV C8Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+coeGVmDd/qtnalfNXmUNK2ofGpnOtfPUFXqaO04+fU=; b=KV1nrKMgvMhWSCKB05PVTXXU1V9Utr89cTJDqCsbLt7p+1QRuKNc+uuhtr0ZMcB5bS 6dVHAzZkJdTw9euQG7AqcQF3IZYVumXq7mfhli9C32ltzERgA4d80hy9nz82ybT/8c51 t5oIwy4Fv/iOsf7KhBj4MLYpDnf2y03O3dGAGzcZ1qkAvr0/UBz/3rA0HQ5efjlrakf3 L1FeMyFuoiamH3Hd7IEOpAF+1APHyP6ziXIq3wMNqnMbXNjvj7Gwvv5qO7eiFUzTWews 9piUO9BzocAy6OGRIB6wIaG0bH/LuJ4P6UMyCM58uPbpB6GfDnwwKD9sRg/qB/0fhGNM +dng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=OXA8K7bt; 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 c17-v6si14826274pgp.299.2018.09.09.20.37.22; Sun, 09 Sep 2018 20:37:37 -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=@chromium.org header.s=google header.b=OXA8K7bt; 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 S1726547AbeIJI0x (ORCPT + 99 others); Mon, 10 Sep 2018 04:26:53 -0400 Received: from mail-yw1-f66.google.com ([209.85.161.66]:41236 "EHLO mail-yw1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbeIJI0x (ORCPT ); Mon, 10 Sep 2018 04:26:53 -0400 Received: by mail-yw1-f66.google.com with SMTP id q129-v6so7350660ywg.8 for ; Sun, 09 Sep 2018 20:34:59 -0700 (PDT) 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; bh=+coeGVmDd/qtnalfNXmUNK2ofGpnOtfPUFXqaO04+fU=; b=OXA8K7btg+U/KqqOufL2Xea3TsfYcJCm3x6lbqXKe8bmqqPK7AmTypFL9AQ2ccTHV9 hyDdEe/gY/OFGepjOY/jdWpGWX2AbM27wD+Z03D5a+HLofBx4SmQhs3b38blQ+aD4ZED CBoubzNqASHI2TuCwsYl0WiY6yerLNIlQTOnc= 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; bh=+coeGVmDd/qtnalfNXmUNK2ofGpnOtfPUFXqaO04+fU=; b=Yz9fHZdBWcpFrppFDXBHJHIklASaI8a+HnJJ7WBUfvJsLb9jmknHb3Qf9yF/SF/Qj2 9ZwG6GKDQ4qMtiZtR3Y26+XsQpcQtZys2deje4QCSlka7qNS4owSEriRcvQsTC6NhVme YuRuqCid51myXi4Nl8gc+kqMSKR73B0ZZc8y/rSgwfPax6gEZFalRCt1r7xsD7W1vtmG cLOdsduxnxZouv8TEf9BZL3aJnHeH5baTWi/39dbMpiXvbsXzz+sPSm6Vvdktf2F2LAp K9W41SMnKdKuBFQOdgohdgGt1rNe6cmgrTMB2GLdy8B+RtFE1tUBlRszVOzL9+Wh1eNH qqFw== X-Gm-Message-State: APzg51CvEWo4YzvOuD5/uaHBJJSFC4rWCd7GJIHG8eWThcn0x4w3jASV Fz7NqkBnTnkIz5bCh9FLtoo4SEzIBYA= X-Received: by 2002:a81:7b08:: with SMTP id w8-v6mr9368147ywc.249.1536550498629; Sun, 09 Sep 2018 20:34:58 -0700 (PDT) Received: from mail-yw1-f48.google.com (mail-yw1-f48.google.com. [209.85.161.48]) by smtp.gmail.com with ESMTPSA id f5-v6sm5116059ywd.53.2018.09.09.20.34.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Sep 2018 20:34:57 -0700 (PDT) Received: by mail-yw1-f48.google.com with SMTP id y134-v6so7364993ywg.1 for ; Sun, 09 Sep 2018 20:34:57 -0700 (PDT) X-Received: by 2002:a81:6ec5:: with SMTP id j188-v6mr8887284ywc.92.1536550497025; Sun, 09 Sep 2018 20:34:57 -0700 (PDT) MIME-Version: 1.0 References: <20180724140621.59624-1-tfiga@chromium.org> <20180724140621.59624-3-tfiga@chromium.org> <19062a24c3aa2cb9e0410cf2884b4589e44c263b.camel@collabora.com> In-Reply-To: <19062a24c3aa2cb9e0410cf2884b4589e44c263b.camel@collabora.com> From: Tomasz Figa Date: Mon, 10 Sep 2018 12:34:45 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] media: docs-rst: Document memory-to-memory video encoder interface To: Ezequiel Garcia Cc: Linux Media Mailing List , Linux Kernel Mailing List , Stanimir Varbanov , Mauro Carvalho Chehab , Hans Verkuil , Pawel Osciak , Alexandre Courbot , kamil@wypas.org, a.hajda@samsung.com, Kyungmin Park , jtp.park@samsung.com, Philipp Zabel , =?UTF-8?B?VGlmZmFueSBMaW4gKOael+aFp+ePiik=?= , =?UTF-8?B?QW5kcmV3LUNUIENoZW4gKOmZs+aZuui/qik=?= , todor.tomov@linaro.org, nicolas@ndufresne.ca, Paul Kocialkowski , Laurent Pinchart , dave.stevenson@raspberrypi.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 8, 2018 at 5:17 AM Ezequiel Garcia wrote: > > On Tue, 2018-07-24 at 23:06 +0900, Tomasz Figa wrote: [snip] > > +Querying capabilities > > +===================== > > + > > +1. To enumerate the set of coded formats supported by the driver, the > > + client may call :c:func:`VIDIOC_ENUM_FMT` on ``CAPTURE``. > > + > > + * The driver must always return the full set of supported formats, > > + irrespective of the format set on the ``OUTPUT`` queue. > > + > > +2. To enumerate the set of supported raw formats, the client may call > > + :c:func:`VIDIOC_ENUM_FMT` on ``OUTPUT``. > > + > > + * The driver must return only the formats supported for the format > > + currently active on ``CAPTURE``. > > + > > Paul and I where discussing about the default active format on CAPTURE > and OUTPUT queues. That is, the format that is active (if any) right > after driver probes. > > Currently, the v4l2-compliance tool tests the default active format, > by requiring drivers to support: > > fmt = g_fmt() > s_fmt(fmt) > > Is this actually required? Should we also require this for stateful > and stateless codecs? If yes, should it be documented? The general V4L2 principle is that drivers must maintain some sane default state right from when they are exposed to the userspace. I'd try to stick to the common V4L2 semantics, unless there is a very good reason not to do so. Note that we actually diverged from it on CAPTURE state for stateful decoders, because we return an error, if any format-related ioctl is called on CAPTURE queue before OUTPUT queue is initialized with a valid coded format, either explicitly by the client or implicitly via bitstream parsing. The reason was backwards compatibility with clients which don't handle source change events. If that wasn't the case, we could have made the CAPTURE queue completely independent and have the format there reset with source change event, whenever it becomes invalid due to things like resolution change or speculative initialization miss, which would make things much more symmetrical. Best regards, Tomasz