Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp410006yba; Thu, 16 May 2019 02:58:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwP8Nc9+yLGE+ZBcztliqrsYNngcWbdxA+aTqR64cmLuRYA0oIepY3/ZaV0vmsmTBMfvDxC X-Received: by 2002:a63:4346:: with SMTP id q67mr49330237pga.241.1558000688267; Thu, 16 May 2019 02:58:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558000688; cv=none; d=google.com; s=arc-20160816; b=gbY3UjTM5NnfW+Grn8h9UwbTTtLDNduIqjNPBJoBb2GrQygUSVFLkytGN43+a+tPT5 K+PdAx0MZ7EdLg4fbSDBpxYSeiBQO22GZO/F0GxRNUTUO9qbioAXQyYQZOSmtzdlOqll O5klK8QaoIvh5jHdvY0XdxVjxIFVwyp0IrToaqJdiZsxKsc9PUoEM5L1kJsSIhuQVSgZ tX3KooMdMnOrckXmuvVuACOPepE4+U4CHextQ4Q2UZ9Q0JV5F4CblElWkQehlCuYBS5l /aHaP+zMROws+ycTdUD+DNfsWyFKNhUWukJwgl7MUpgMpgJVz9hMF9wPqGjFQE7/tJW/ 6j5Q== 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=TMDrVnTjQ1immxiYKmdnHO4lUdJFEpb4jOAuuz/w3MM=; b=smWXUIOsfJ8tqRf/SLQqLLUnXve87bGSSfk4kuURQ7Tc2NRNWi6mHEjnDYs3jiMfLJ gcaatj9OvWbEocXTIF7kfSBYLSyaEJn4DyiXPCho1NmX4874xhe68oU+QLsgUT92Nlmd GDoznC2SeeM1WcqwwEnIfIB0W3QgHwiJh4FVp+qF+RUcyRBTU40l9DwBo4OcV1/LcnSN BEDBIJM6TwTBYS+2g/I4J7cXPv2+6m1prtBcJGjcSmVRZSdHrRAooVgJbnwYt13rP3RZ l7KmH8OukIyXU9LnNZVZfPWP3JAt5Y0xi6yyEZXzDnxTB2K0CCkDOmmeGeYaJdekPcO/ pPTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gJWuQZyb; 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 v13si4283574plo.429.2019.05.16.02.57.52; Thu, 16 May 2019 02:58:08 -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=gJWuQZyb; 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 S1726992AbfEPJ4r (ORCPT + 99 others); Thu, 16 May 2019 05:56:47 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:43526 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbfEPJ4r (ORCPT ); Thu, 16 May 2019 05:56:47 -0400 Received: by mail-lj1-f193.google.com with SMTP id z5so2497744lji.10 for ; Thu, 16 May 2019 02:56:45 -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=TMDrVnTjQ1immxiYKmdnHO4lUdJFEpb4jOAuuz/w3MM=; b=gJWuQZybohtXg5MERpeUsZNOq4RdyG5oC2punG8BCdPmzF+h5sYNnovAC8Tv6c7l6m 2qSLM6ZtOKMDC4hPhDjycEgDIcomZLJ8EHVQSwAFzBXz93OJ2RzIX8tM82SWkHtExoRf oQvvRoSnD9cOp67mw0tqCEtoQQMz0gbw8f9lQ= 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=TMDrVnTjQ1immxiYKmdnHO4lUdJFEpb4jOAuuz/w3MM=; b=Zs3zXjO+q/WXotuD/ysRtBdYPOc7RupHlcsp658Qert0xXzzkHpnsjsixdVTFGylFR PYLC98Org+yq61mGqx0Y2PaUut1UfhLQ0mGmqST6jRYI2jXZ7qtTErJOhuIALpb6hNZV zeFV7WS4zjROS/5sefoFTJft7X+tVU54fvsNlEPbgxs32OMA5rJ9pmp+oT5vDymqyaSz P+0k/eg71xoWiFhGDmliWLy/fvIGqYQtCKu4DIml/Xi6F6oN6g+qPlH0ggWpAn13Z5B9 RaAF2bQLoXIrkcjLXGliVKGOlVbDSK2TBkNGyWpnHeHKRLOQkkhvMBm/HbFsN26towO3 /LKg== X-Gm-Message-State: APjAAAWNNMd0KmHiptgo5AVnjwKLSN8nGmIzOJPqErVHblNrxgQzdKkX kBlpwViSN5MHXQFFCvLHtI7dbQ38caqI7g== X-Received: by 2002:a2e:91c3:: with SMTP id u3mr23245233ljg.130.1558000604864; Thu, 16 May 2019 02:56:44 -0700 (PDT) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com. [209.85.167.49]) by smtp.gmail.com with ESMTPSA id d23sm813876ljj.38.2019.05.16.02.56.43 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 16 May 2019 02:56:43 -0700 (PDT) Received: by mail-lf1-f49.google.com with SMTP id q17so2150048lfo.4 for ; Thu, 16 May 2019 02:56:43 -0700 (PDT) X-Received: by 2002:a19:cc95:: with SMTP id c143mr23074476lfg.138.1558000603275; Thu, 16 May 2019 02:56:43 -0700 (PDT) MIME-Version: 1.0 References: <20190412155915.16849-1-stanimir.varbanov@linaro.org> In-Reply-To: From: Tomasz Figa Date: Thu, 16 May 2019 18:56:32 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] media/doc: Allow sizeimage to be set by v4l clients To: Stanimir Varbanov Cc: Hans Verkuil , Linux Media Mailing List , Mauro Carvalho Chehab , linux-arm-msm , 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 Thu, May 16, 2019 at 5:09 PM Stanimir Varbanov wrote: > > Hi Hans, > > On 5/14/19 11:54 AM, Hans Verkuil wrote: > > Hi Stanimir, > > > > On 4/12/19 5:59 PM, Stanimir Varbanov wrote: > >> This changes v4l2_pix_format and v4l2_plane_pix_format sizeimage > >> field description to allow v4l clients to set bigger image size > >> in case of variable length compressed data. > > > > I've been reconsidering this change. The sizeimage value in the format > > is the minimum size a buffer should have in order to store the data of > > an image of the width and height as described in the format. > > > > But there is nothing that prevents userspace from calling VIDIOC_CREATEBUFS > > instead of VIDIOC_REQBUFS to allocate larger buffers. > > Sometimes CREATEBUFS cannot be implemented for a particular fw/hw. > > CC: Tomasz for his opinion. > Thanks Stanimir. Actually, if called at the same point in time as REQBUFS, CREATE_BUFS doesn't really differ to much, except that it gives more flexibility for allocating the buffers and that shouldn't depend on any specific features of hardware or firmware. Actually, one could even allocate any buffers any time regardless of hardware/firmware support, but the ability to use such buffers would actually depend on such. Perhaps we should just let the drivers return -EBUSY from CREATE_BUFS if called at the wrong time? > > > > So do we really need this change? > > Yes, because this has worked like this all the time, but it was just not documented. Disallowing this would break quite a bit of existing userspace. Best regards, Tomasz > > The more I think about this, the more uncomfortable I become with this change. > > > > Regards, > > > > Hans > > > > > > -- > regards, > Stan