Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1882699ima; Sun, 21 Oct 2018 23:40:12 -0700 (PDT) X-Google-Smtp-Source: ACcGV60yg3njPFhoZcUUf2K6UtLr7KEXIFX19ypoyEJOOaa+4qJeTkg5e0IN/+G0AxhxWe5DMvyJ X-Received: by 2002:a63:fe44:: with SMTP id x4-v6mr41967746pgj.152.1540190412430; Sun, 21 Oct 2018 23:40:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540190412; cv=none; d=google.com; s=arc-20160816; b=Iu6xL0YnKiNh9rJRaFlGHQxC3j0X5Zjup0TXjNtsGUjJtbSvkJ1XkQhZHAMaZsGFmA gTgHAkrucyvI0oy0W8DyrIbhpxT9mzzEwdoJBeXlkagcG3sTlbNCXIOowlxPaknwTf5k n44S7d6P1hk2g+ZGCbZUw5eZuWtw1MUgU4Tg7MGTUiRzj5fqEuq3qLzPzUu+trnHC++q qucOXke+qG92NKKbGaqyAe0jbBt6JwypctGNUo15/s4frX959Qt1PEfkroYOPIyy+2p3 5z3jVVCodzzJT3q6YU74j52mhGaQLMQ+oewKRCxbZl6xN5E7nd4Z5E6u6gjbVX8qHEfz JctQ== 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=OstAVuDEpivPIV9hXGb9UqRs+TZke7Mfv4BadOxYPt8=; b=A1TGc1lxaF4Vk5LhTX0oHx91DWxLRY0NrdOZVm3l0njO43qIWSM3V4uM5h4Y3XyyNL Xm5uqYPKOgGHmbPQjyQGLV3a9s5uQO6W2Egrmb5cBLYO/xri7jZLNiEPizz4WT/5UMI2 +qPOhev9MD1Q/GMQaxBjMwRC3I6M1Tf9iBYaDZmyF8k74sKthwo6mm5qlzIlyisILHa5 8t8YYpaYZsiaSOogQo9e5MssxAprK+UYIwsZwZakxmEPDUlQ8LAjDoBHQYKBOKucL2jz /kHcTs4sIVhxdgOyskpbPM5ZIwMwunXdhyl/cvJhBVtUftaRL7q0fuxBNEN5gs0yxEXV LcoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CapiZL2X; 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 g27-v6si34998176pfj.37.2018.10.21.23.39.44; Sun, 21 Oct 2018 23:40:12 -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=CapiZL2X; 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 S1727584AbeJVOjq (ORCPT + 99 others); Mon, 22 Oct 2018 10:39:46 -0400 Received: from mail-yb1-f195.google.com ([209.85.219.195]:34219 "EHLO mail-yb1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727227AbeJVOjq (ORCPT ); Mon, 22 Oct 2018 10:39:46 -0400 Received: by mail-yb1-f195.google.com with SMTP id n140-v6so837051yba.1 for ; Sun, 21 Oct 2018 23:22:38 -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=OstAVuDEpivPIV9hXGb9UqRs+TZke7Mfv4BadOxYPt8=; b=CapiZL2XAl9qIDcmMXBVZiXDy3smIHECHkTkrYiFUtYCTbn1rFM3ykTSvLxnGezNMl /Y37RdLZL0gLjeMfXvZEZmIBs4eqYRsP48NRws5YFzQFKCpd8sH6GuoqarQ5OV0NPw7x egjfxqD0ViSG1uvw9WXH5k05N5mQeBC9OySkI= 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=OstAVuDEpivPIV9hXGb9UqRs+TZke7Mfv4BadOxYPt8=; b=aUup9Y7J89l8DLNuX0wMf63UA+QIBOA0ww1rEHjrdn8Sbn8WzyH7RI4B4g0bw/lPZr QelNMZ6/3S6RRgfX6RSJmMOBE1YsSwRl/BNmCM+d6ityYCocxmfHXAyoX928ncGUBqdZ FGmEEI0u2/WQ5whq1GVRyw1AiHgE6Y5Y2D8qrIBWKHbNN1APZPMKIwFZIc71tfF3iXuY mh7Rj3JNWb7jjUNyPTeyBpyRh9GW/dGsuXlbxunp2Qm6PKGtiLLrkAEGGihPgD1GP5OF ybZONwYJP2spxkNtAruKmDekHz/GI7KPki7cerGuEu8zrLGOXe8PT7BWE7wEj+ZpOjhG fKzg== X-Gm-Message-State: ABuFfog9WZgzk3+z1lmOctsh8L/BrsLw/71pKw1+J0fUyQcXVuvoFBXb Setg/0TAL+sCWzx+BzYXF+qpL+p/NkE= X-Received: by 2002:a25:be85:: with SMTP id i5-v6mr32409735ybk.138.1540189357808; Sun, 21 Oct 2018 23:22:37 -0700 (PDT) Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com. [209.85.219.177]) by smtp.gmail.com with ESMTPSA id k2-v6sm8671977ywh.52.2018.10.21.23.22.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Oct 2018 23:22:36 -0700 (PDT) Received: by mail-yb1-f177.google.com with SMTP id x5-v6so15685932ybl.11 for ; Sun, 21 Oct 2018 23:22:36 -0700 (PDT) X-Received: by 2002:a25:103:: with SMTP id 3-v6mr18577930ybb.114.1540189356338; Sun, 21 Oct 2018 23:22:36 -0700 (PDT) MIME-Version: 1.0 References: <20181019080928.208446-1-acourbot@chromium.org> <9375d854-2be5-4f69-2516-a3349fa5b50d@xs4all.nl> In-Reply-To: From: Tomasz Figa Date: Mon, 22 Oct 2018 15:22:25 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v3] media: docs-rst: Document m2m stateless video decoder interface To: Alexandre Courbot Cc: Hans Verkuil , Paul Kocialkowski , Mauro Carvalho Chehab , Pawel Osciak , Linux Media Mailing List , Linux Kernel Mailing List 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 Mon, Oct 22, 2018 at 3:05 PM Alexandre Courbot wrote: > > On Fri, Oct 19, 2018 at 5:44 PM Hans Verkuil wrote: > > > > On 10/19/18 10:09, Alexandre Courbot wrote: > > > Thanks everyone for the feedback on v2! I have not replied to all the > > > individual emails but hope this v3 will address some of the problems > > > raised and become a continuation point for the topics still in > > > discussion (probably during the ELCE Media Summit). > > > > > > This patch documents the protocol that user-space should follow when > > > communicating with stateless video decoders. It is based on the > > > following references: > > > > > > * The current protocol used by Chromium (converted from config store to > > > request API) > > > > > > * The submitted Cedrus VPU driver > > > > > > As such, some things may not be entirely consistent with the current > > > state of drivers, so it would be great if all stakeholders could point > > > out these inconsistencies. :) > > > > > > This patch is supposed to be applied on top of the Request API V18 as > > > well as the memory-to-memory video decoder interface series by Tomasz > > > Figa. > > > > > > Changes since v2: > > > > > > * Specify that the frame header controls should be set prior to > > > enumerating the CAPTURE queue, instead of the profile which as Paul > > > and Tomasz pointed out is not enough to know which raw formats will be > > > usable. > > > * Change V4L2_CID_MPEG_VIDEO_H264_SLICE_PARAM to > > > V4L2_CID_MPEG_VIDEO_H264_SLICE_PARAMS. > > > * Various rewording and rephrasing > > > > > > Two points being currently discussed have not been changed in this > > > revision due to lack of better idea. Of course this is open to change: > > > > > > * The restriction of having to send full frames for each input buffer is > > > kept as-is. As Hans pointed, we currently have a hard limit of 32 > > > buffers per queue, and it may be non-trivial to lift. Also some codecs > > > (at least Venus AFAIK) do have this restriction in hardware, so unless > > > we want to do some buffer-rearranging in-kernel, it is probably better > > > to keep the default behavior as-is. Finally, relaxing the rule should > > > be easy enough if we add one extra control to query whether the > > > hardware can work with slice units, as opposed to frame units. > > > > Makes sense, as long as the restriction can be lifted in the future. > > Lifting this limitation once we support more than 32 buffers should > not be an issue. Just add a new capability control and process things > in slice units. Right now we have hardware that can only work with > whole frames (venus) Note that venus is a stateful hardware and the restriction might just come from the firmware. > but I suspect that some slice-only hardware must > exist, so it may actually become a necessity at some point (lest > drivers do some splitting themselves). > The drivers could do it trivially, because the UAPI will include the array of slices, with offsets and sizes. It would just run the same OUTPUT buffer multiple time, once for each slice. The primary use case I personally see for splitting slices into multiple buffers would be lowering the latency, as Hans mentioned earlier and we should be able to do it easily later. Best regards, Tomasz