Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5469885imm; Sun, 26 Aug 2018 21:10:41 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ54TzaemEGrwL/zU3ulvuTgxURg/2ecG9hOR+93RLcQ1SPApZItcsHenbsyiLwjecUo/OI X-Received: by 2002:a63:c702:: with SMTP id n2-v6mr10828798pgg.108.1535343041456; Sun, 26 Aug 2018 21:10:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535343041; cv=none; d=google.com; s=arc-20160816; b=TBUlZNGYRR5dYWEaTBh2PU2q3wN5JNvpbd9cclk540qJ7CH7QqmhfaE/uDEqhqjbsS dmyiMOLrhO+GrJ9W4aQR6Pz00xLSanWd1DfuT+H8C+qieHu/Qzw9oIYG3OLgu/QY0FoR evc+Fy9KIJV9bqn0UuE9Oun5Mhl8wEyBMJt0LCS7kfb4LiGXiQJubo2huK0hxmP+rwvd c3C4oHbRlJtGb6YRPxr2zm94BiKU/yslO5KXdrLRoXHG9n0qBNEMD0zeHf2BSLyI1RY9 GALHdAOc9MbiXFLJ0+eVONioQ6R1uEKhmF8RSl4YNvUlhcR0c63G+x3NIolQ5OyWzprP 7wXQ== 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 :arc-authentication-results; bh=OmTBuW/bSAbmuYJgadsh/FjHeD8xf9g4Gf+TfKj8leM=; b=ol4ip3Aqi/Sjmy2HvBouKN1eVMO0opi7TA7lsAtH7j6mv7kYnPsuC6tI+310Izx58f aOEHhHAjV5pEWBpiv2checI3stCCGFVA8Shw6fgx715aVugLL5pZh1f0stJKQVblvUBw 1mZycbA7GLHE0sBRWW+5sA+5R1+grcvO8bzxAkrfruzKlzieRtJDht6V8em5UXiiG+P5 2rl5WmboWk0Z1OyTietaP29mKe+YP7bFIbWkP2QOqADB2TcetwCEtXa2YokJdBmBpe8b 36brtengPKnx8bTWkyek6kD0L3wsSAFZYNz6hly+0x4TYWp5Knkad9Wqgu4/ZlRBF7g6 P4qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="eyrAH/T5"; 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 l12-v6si12625689plt.440.2018.08.26.21.10.25; Sun, 26 Aug 2018 21:10:41 -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="eyrAH/T5"; 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 S1726971AbeH0HyM (ORCPT + 99 others); Mon, 27 Aug 2018 03:54:12 -0400 Received: from mail-yb0-f194.google.com ([209.85.213.194]:39490 "EHLO mail-yb0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726753AbeH0HyM (ORCPT ); Mon, 27 Aug 2018 03:54:12 -0400 Received: by mail-yb0-f194.google.com with SMTP id c4-v6so5564016ybl.6 for ; Sun, 26 Aug 2018 21:09:21 -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=OmTBuW/bSAbmuYJgadsh/FjHeD8xf9g4Gf+TfKj8leM=; b=eyrAH/T5wuvRVAzP1ITMZ3KL8Yne2Erjwu84dP+jL2WaM5u+cXV9iLe9q/XLH7X2x6 cgR22kA+Anca+6pT4lSaP0H513MxuubXhe5phcNLPYr8I+Kdk0viQr233QBpdpENWs1F z7zFFFHkzv3pelNc+pQksTFx6KVw9H2RZI1Cg= 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=OmTBuW/bSAbmuYJgadsh/FjHeD8xf9g4Gf+TfKj8leM=; b=FeGFYOImC8bjMcK9USUNueLTuquRj0hYl37aUCqI3Lr+CMtHKT22qg2yfmu0kK47n3 H4NzEKDuP2e0hUOh+DasDYPBMfi6UVHQE0IH8LQbBHPIBnudiJzMMkXGb5EcLlu8GM27 aqD75xazYZ8+VFDEWu79+e1csUWzw+a1eiMvG0NPTDIRR6qOJn8h1dpD0pQKGm3i8pA4 DRXpQi451pidFpkSVbSMjgLtls74Y5Zb5T4hEhTYvgys3+0Abu4B5BLzLwj3oEZECUjn 9U4DGYgtNUky5cUQlNMkOtBLtHp8fMFr+9o4GEnmnwy3zn8W4MZEQ+h46KmFAnqTzg4t xUhA== X-Gm-Message-State: APzg51DpeywwDlqIQ2bXPF6KgpqfywU7zcpAQfwWn9VZOKtlGUDJSvgs T+ruCP5FASGEfPACZatQwHHyLQ54HvKymg== X-Received: by 2002:a25:9b08:: with SMTP id y8-v6mr6101236ybn.260.1535342960556; Sun, 26 Aug 2018 21:09:20 -0700 (PDT) Received: from mail-yb0-f172.google.com (mail-yb0-f172.google.com. [209.85.213.172]) by smtp.gmail.com with ESMTPSA id f5-v6sm6324458ywa.39.2018.08.26.21.09.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Aug 2018 21:09:19 -0700 (PDT) Received: by mail-yb0-f172.google.com with SMTP id d34-v6so5570064yba.3 for ; Sun, 26 Aug 2018 21:09:18 -0700 (PDT) X-Received: by 2002:a25:d816:: with SMTP id p22-v6mr6146507ybg.285.1535342958293; Sun, 26 Aug 2018 21:09:18 -0700 (PDT) MIME-Version: 1.0 References: <20180724140621.59624-1-tfiga@chromium.org> <20180724140621.59624-2-tfiga@chromium.org> <37a8faea-a226-2d52-36d4-f9df194623cc@xs4all.nl> <41ee7486-9c7c-51ea-9355-1bf6c44f1639@linaro.org> In-Reply-To: <41ee7486-9c7c-51ea-9355-1bf6c44f1639@linaro.org> From: Tomasz Figa Date: Mon, 27 Aug 2018 13:09:07 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] media: docs-rst: Document memory-to-memory video decoder interface To: Stanimir Varbanov , Hans Verkuil Cc: Linux Media Mailing List , Linux Kernel Mailing List , Mauro Carvalho Chehab , 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, Ezequiel Garcia 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 Tue, Aug 21, 2018 at 8:29 PM Stanimir Varbanov wrote: > > Hi Tomasz, > > On 08/08/2018 05:55 AM, Tomasz Figa wrote: > > On Tue, Aug 7, 2018 at 4:37 PM Hans Verkuil wrote: > > >>>>>>> +7. If all the following conditions are met, the client may resume the > >>>>>>> + decoding instantly, by using :c:func:`VIDIOC_DECODER_CMD` with > >>>>>>> + ``V4L2_DEC_CMD_START`` command, as in case of resuming after the drain > >>>>>>> + sequence: > >>>>>>> + > >>>>>>> + * ``sizeimage`` of new format is less than or equal to the size of > >>>>>>> + currently allocated buffers, > >>>>>>> + > >>>>>>> + * the number of buffers currently allocated is greater than or equal to > >>>>>>> + the minimum number of buffers acquired in step 6. > >>>>>> > >>>>>> You might want to mention that if there are insufficient buffers, then > >>>>>> VIDIOC_CREATE_BUFS can be used to add more buffers. > >>>>>> > >>>>> > >>>>> This might be a bit tricky, since at least s5p-mfc and coda can only > >>>>> work on a fixed buffer set and one would need to fully reinitialize > >>>>> the decoding to add one more buffer, which would effectively be the > >>>>> full resolution change sequence, as below, just with REQBUFS(0), > >>>>> REQBUFS(N) replaced with CREATE_BUFS. > >>>> > >>>> What happens today in those drivers if you try to call CREATE_BUFS? > >>> > >>> s5p-mfc doesn't set the .vidioc_create_bufs pointer in its > >>> v4l2_ioctl_ops, so I suppose that would be -ENOTTY? > >> > >> Correct for s5p-mfc. > > > > As Philipp clarified, coda supports adding buffers on the fly. I > > briefly looked at venus and mtk-vcodec and they seem to use m2m > > implementation of CREATE_BUFS. Not sure if anyone tested that, though. > > So the only hardware I know for sure cannot support this is s5p-mfc. > > In Venus case CREATE_BUFS is tested with Gstreamer. Stanimir: Alright. Thanks for confirmation. Hans: Technically, we could still implement CREATE_BUFS for s5p-mfc, but it would need to be restricted to situations where it's possible to reinitialize the whole hardware buffer queue, i.e. - before initial STREAMON(CAPTURE) after header parsing, - after a resolution change and before following STREAMON(CAPTURE) or DECODER_CMD_START (to ack resolution change without buffer reallocation). Would that work for your original suggestion? Best regards, Tomasz