Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5039425imm; Tue, 21 Aug 2018 05:24:14 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzbrFwDT2bdsSMEff1S8F8MuH4wDvTxNQ81gBaNQkIhfo6vUM5oyx+HvWYMzgsRzbBLpyi8 X-Received: by 2002:a63:f:: with SMTP id 15-v6mr47507615pga.430.1534854254781; Tue, 21 Aug 2018 05:24:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534854254; cv=none; d=google.com; s=arc-20160816; b=mms3OFPV8b5TOAOk0R0CKBwlbmbGgKgdmbl8yWwl/ZQnqx8CmG/zLn7A7r/lljVFpE 2cFQsi+lh4OjgmhAQ598wSr3ZAnzKqo6BDbVpR/docZld2eSuq08JvwOx08vAJrSKYUH FkFttBHTJDufb268S3lrxpeTzsgDK8fRZKBvaKdXG3JAr7BauxNawdgoyl6Y3vrxASQC 5PfSjN9VtpBxNAbarK7zp7I8BhO1ka2OEfSMZfGj9KRHxr5Bdm5NiWy7D6p6zcz+sluj uK+QNMLgwzhVHhdHFjqcFBYqqMhdj7q5luNXdq3dDH+L3jQ1wxYKU5yvXbyRewkiMEbQ no1g== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=C8OADzc/wroQdlSxR4jeB2HnTrE30HbvAoL2XXg5vEE=; b=P8k0hIZut0G2mJniKGzxqtDOEX0EuCVK5RhxhrTwo8mszPN93aO4KvgnNn9miA86Hb gdrj3jrB9ptjAw8dhgg3Dw3KeyTId6eYEPEfbyyi9Br2DXILHY3uxPkqNioW2abW1s0a VirpTlTI1ANptCmMh6ZWyQu92J+3zM7Hbenz0VMqMdyeZdNsw1KTcav7+yuJAPTX8QhI CnIhmnrpeCHBme+WeU/kEPhRP/9wS/dR1yZVeWKPAJP8juA+o08mbE0nTF4FnRXo0B7n vLTPgxALJGcvp2Jc9jP0WXsEzBYhbHqfhT0g9QsbCXDw1PDfVB+3g1TLbgL+3nNs/ZVa SbIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Mp36BoSm; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i5-v6si11913641pgg.84.2018.08.21.05.23.59; Tue, 21 Aug 2018 05:24:14 -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=@linaro.org header.s=google header.b=Mp36BoSm; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727043AbeHUOtS (ORCPT + 99 others); Tue, 21 Aug 2018 10:49:18 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:38222 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726995AbeHUOtS (ORCPT ); Tue, 21 Aug 2018 10:49:18 -0400 Received: by mail-wm0-f67.google.com with SMTP id t25-v6so2514228wmi.3 for ; Tue, 21 Aug 2018 04:29:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=C8OADzc/wroQdlSxR4jeB2HnTrE30HbvAoL2XXg5vEE=; b=Mp36BoSmmV4PBAJa7IRBeWLONfx0jUK4Yp0BO3V800wcg5isF7SQVC8jY8m/T15q/r fQNHS1VtZ6AKdger4DJRjo5GnMrIODuIMtFFqnqjQdeGjnoNdb9vfXaDzvtBEaSlpA2L GjR5DpfIzM9n2/5024YZMwJ44XTfVq9QZ9e00= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=C8OADzc/wroQdlSxR4jeB2HnTrE30HbvAoL2XXg5vEE=; b=DB0DNJkMmpkKbCASFKKyr5SpdB9sMvnD+FF45yy9oZq8g5dHphAY74WBsowrPMFIap hX6200SuhAM7kOk1wgzGxsgz6mPZumottGtPUyZD6h2fJNyqRHtbnK3dGZ2a6+lgfRRp H/Qv0W1WnvfW4mPsBUEx1ueLY06VokxZsNkravPEBLli2eNjAM+GCfRyZi8brKfdwyBO I+/hJj/6I9DUyieO15/2Ga+w4PExVyyFxsjsrVRjU5u3aNx+syKc63sL2g6NEYzVHPff btJgH6+QFLoSjt/4lQy1JtatsDiBA3yI8PXqEwG+zX7zF5Kr85w+aFFJMqj2Qjxxcja5 v+CQ== X-Gm-Message-State: AOUpUlHB5odBLNJOs8YyDf4kPe+5aPYkw0G6za1lN085CRjonqQdw5Z4 ZDiwi47eC0UYl4tirgIdQ6SYyQ== X-Received: by 2002:a1c:ef0f:: with SMTP id n15-v6mr26905555wmh.116.1534850970095; Tue, 21 Aug 2018 04:29:30 -0700 (PDT) Received: from [192.168.27.209] ([37.157.136.206]) by smtp.googlemail.com with ESMTPSA id h82-v6sm3595450wme.11.2018.08.21.04.29.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Aug 2018 04:29:28 -0700 (PDT) Subject: Re: [PATCH 1/2] media: docs-rst: Document memory-to-memory video decoder interface To: Tomasz Figa , Hans Verkuil Cc: Linux Media Mailing List , Linux Kernel Mailing List , Stanimir Varbanov , 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 References: <20180724140621.59624-1-tfiga@chromium.org> <20180724140621.59624-2-tfiga@chromium.org> <37a8faea-a226-2d52-36d4-f9df194623cc@xs4all.nl> From: Stanimir Varbanov Message-ID: <41ee7486-9c7c-51ea-9355-1bf6c44f1639@linaro.org> Date: Tue, 21 Aug 2018 14:29:26 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- regards, Stan