Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp364963ybi; Tue, 2 Jul 2019 21:59:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQ2dRPfdhquY9CPSYKG8jTXQWamOSv+qsEH8TZuUNHzXt51N1llOGnlKO3fkOXPhaajEtL X-Received: by 2002:a17:902:2865:: with SMTP id e92mr39218648plb.264.1562129967850; Tue, 02 Jul 2019 21:59:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562129967; cv=none; d=google.com; s=arc-20160816; b=UDNpeUNxXWC+jk5B+SYa6crxkQEsoSO1MBLKeP0FBsFHWbXRD4CNNRDD0d7ujIPnkB dr6g5tBe2+NoElsbe6NjY/yQ1kD9Xx00vLlIo5xBxE6CYhhyJlPTYHY5aTlOTzYN9BRh 930H0Ye58BXI92Y6X3qXHeEMCgWdHagcJw0p7+AaWQAF+E4PnpHNF390aeXRN9KEa0hi dHhAc++FJC01T1M2iu5AgjU/LRiRPfeVbnivHuXo2yBTjQyzih0ruB3yZ5Qq14skHGLr 5i82PxwhkUKzK5nD8cX8BX4VfVZv88qCJlffCqol87RKVHLS84GRa7bLYFxDBjpAqJ2J 9Ngw== 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=uf5aCU6aY5t/9fyL90O/cqUCzIfpNsCzgBmR7PWCe0Y=; b=ml1js99mGZgfeIYxUk85DRIPJTZr+p1x5uDqjoiLJPQW3NFV71FrvMFsusTdqFsVVS P3n2qRKNwRM6nkARFg2csD37DwetQW2Ol8Sp3j2gu//lbU5P4GenCqIh58e78LADYX5F 7em0gN7UgHHAHolfQE3MSneaakTvXZIfBxxRbd92z0YiXrxMLJTnAa5zjF8l8K8mt6uA XfNZ4fNNuUzcmOhHw9zesP5lHWr3nvs2g+VLqg7Z48K5Mr/2HAL9ZOr2gHivzIBUlYGp 6PUoZmFr6bSozyFaPjBFrqOZIyr8eE9jfmp7RSXtaQUk5lTmvE2jxmTWTBF++tn4BKKC 9u0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kJASSwao; 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 a2si1111635pgq.298.2019.07.02.21.59.12; Tue, 02 Jul 2019 21:59:27 -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=kJASSwao; 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 S1726327AbfGCE6y (ORCPT + 99 others); Wed, 3 Jul 2019 00:58:54 -0400 Received: from mail-ed1-f44.google.com ([209.85.208.44]:46172 "EHLO mail-ed1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725828AbfGCE6y (ORCPT ); Wed, 3 Jul 2019 00:58:54 -0400 Received: by mail-ed1-f44.google.com with SMTP id d4so670090edr.13 for ; Tue, 02 Jul 2019 21:58:53 -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:content-transfer-encoding; bh=uf5aCU6aY5t/9fyL90O/cqUCzIfpNsCzgBmR7PWCe0Y=; b=kJASSwao08QQ12P0yrheKoob6wHDYCL0MeriSYWmYAymiP4LABpOrMNoNyF/wCA3kr uYFEqJKV4aZsU7s8nJUFIWjf5HHdnAlnZ3xEyNpTUvFXTHaVcbC79gezsNkfl80hnR/g fu07wEe13+Ad9Xzpx+1j3p/HXJlP2X2+GVKE0= 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=uf5aCU6aY5t/9fyL90O/cqUCzIfpNsCzgBmR7PWCe0Y=; b=Sy0T8pGUMHt1fpG19BLJ4rUm2JZigiwAowBvh7E8Qpdn3rHw14ErgXdpilTDpGDyVr E/pvHGsZhKlRlWr/bc8eYdq0C5axjWz7kEMqqf3/9MGQHvOexbDldjmAMty0orpLHJy1 i0PIfB90c0U1GkbcTm7bsJL3MAJFB7fR3iWPZ98JZWWqT2hwqiqpjI484udAjOKc4t2G utjk4xGYlCxXjq4mBcvSAXo3JawloO17EsidfNZ7Wr5imvViIVectY4RjLtgV+F7moV4 c3oQRtTGONS4sy47HLNjBar8eSG3D3x473E+YnUab3T/VNLt1tyRrdw51p9XlCCvfDAx CqEQ== X-Gm-Message-State: APjAAAVX/qs4YSSOxAsdJ+8/MWZWFi5U439lyPpQ1rbmm0w7MweqhYO8 zUbn36ilO1+2wtnxnE17tQIlG5Oq/sI2cg== X-Received: by 2002:a17:906:80cc:: with SMTP id a12mr32156288ejx.132.1562129932245; Tue, 02 Jul 2019 21:58:52 -0700 (PDT) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com. [209.85.221.41]) by smtp.gmail.com with ESMTPSA id b25sm335222eda.38.2019.07.02.21.58.50 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jul 2019 21:58:50 -0700 (PDT) Received: by mail-wr1-f41.google.com with SMTP id x4so1078957wrt.6 for ; Tue, 02 Jul 2019 21:58:50 -0700 (PDT) X-Received: by 2002:a05:6000:1150:: with SMTP id d16mr2514295wrx.48.1562129929689; Tue, 02 Jul 2019 21:58:49 -0700 (PDT) MIME-Version: 1.0 References: <20190603112835.19661-1-hverkuil-cisco@xs4all.nl> <20190603112835.19661-2-hverkuil-cisco@xs4all.nl> In-Reply-To: <20190603112835.19661-2-hverkuil-cisco@xs4all.nl> From: Tomasz Figa Date: Wed, 3 Jul 2019 13:58:38 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCHv4 1/2] media: docs-rst: Document memory-to-memory video decoder interface To: Hans Verkuil Cc: Linux Media Mailing List , Linux Kernel Mailing List , Alexandre Courbot , Philipp Zabel , Stanimir Varbanov , Andrew-CT Chen , Tiffany Lin , Pawel Osciak 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 Hi Hans, On Mon, Jun 3, 2019 at 8:28 PM Hans Verkuil wrot= e: > > From: Tomasz Figa > > Due to complexity of the video decoding process, the V4L2 drivers of > stateful decoder hardware require specific sequences of V4L2 API calls > to be followed. These include capability enumeration, initialization, > decoding, seek, pause, dynamic resolution change, drain and end of > stream. > > Specifics of the above have been discussed during Media Workshops at > LinuxCon Europe 2012 in Barcelona and then later Embedded Linux > Conference Europe 2014 in D=C3=BCsseldorf. The de facto Codec API that > originated at those events was later implemented by the drivers we alread= y > have merged in mainline, such as s5p-mfc or coda. > > The only thing missing was the real specification included as a part of > Linux Media documentation. Fix it now and document the decoder part of > the Codec API. > > Signed-off-by: Tomasz Figa > Signed-off-by: Hans Verkuil > --- > Documentation/media/uapi/v4l/dev-decoder.rst | 1084 +++++++++++++++++ > Documentation/media/uapi/v4l/dev-mem2mem.rst | 8 +- > Documentation/media/uapi/v4l/pixfmt-v4l2.rst | 5 + > Documentation/media/uapi/v4l/v4l2.rst | 10 +- > .../media/uapi/v4l/vidioc-decoder-cmd.rst | 41 +- > 5 files changed, 1132 insertions(+), 16 deletions(-) > create mode 100644 Documentation/media/uapi/v4l/dev-decoder.rst > Thanks a lot for helping with remaining changes. Just one thing inline our team member found recently. [snip] > +Capture setup > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + [snip] > +4. **Optional.** Set the ``CAPTURE`` format via :c:func:`VIDIOC_S_FMT` = on the > + ``CAPTURE`` queue. The client may choose a different format than > + selected/suggested by the decoder in :c:func:`VIDIOC_G_FMT`. > + > + * **Required fields:** > + > + ``type`` > + a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. > + > + ``pixelformat`` > + a raw pixel format. The client should be able to set the width and height as well. It's a quite frequent case, especially in DMA-buf import mode, that the buffers are actually bigger (e.g. more alignment) than what we could get from the decoder by default. For sane hardware platforms it's reasonable to expect that such bigger buffers could be handled as well, as long as we update the width and height here. It's more like a clarification anyway, so if you think it would be better to just merge the current revision, I could send a follow up patch. Regardless of that and FWIW: Reviewed-by: Tomasz Figa Best regards, Tomasz