[{"id":2930,"web_url":"https://patchwork.libcamera.org/comment/2930/","msgid":"<20191020052026.GA4991@pendragon.ideasonboard.com>","date":"2019-10-20T05:20:26","subject":"Re: [libcamera-devel] [PATCH 2/2] libcamera: v4l2_videodevice:\n\tUpdate bytesused when dq'ing MPLANE buffers","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Fri, Oct 18, 2019 at 04:42:01PM +0100, Kieran Bingham wrote:\n> When we dequeue a buffer using the MPLANE API, we currently set our\n> buffer->bytesused field to zero due to the zero entry in the V4L2 buffer\n> bytesused field.\n> \n> The bytesused field is only really tracked for debug purposes currently,\n> so store the total bytese used from each plane in our local statistics\n> to identify actual data flow.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> ---\n> \n> This patch comes with a pinch of salt, we could also add a bytesused\n> field to the Plane class and intead update all the debug prints to\n> report the bytesused on a per-plane basis.\n\nMy initial opinion is that handling this in the Buffer and Plane classes\nwould be better. I think the V4L2-related classes should stay as close\nas possible to the V4L2 API, otherwise it could soon become quite\nconfusing.\n\nNiklas is planning to rework the buffer API this week, he should take\nthis into consideration.\n\n> ---\n>  src/libcamera/v4l2_videodevice.cpp | 9 ++++++++-\n>  1 file changed, 8 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> index 37f61b90ac46..71f141e7b511 100644\n> --- a/src/libcamera/v4l2_videodevice.cpp\n> +++ b/src/libcamera/v4l2_videodevice.cpp\n> @@ -1124,13 +1124,20 @@ Buffer *V4L2VideoDevice::dequeueBuffer()\n>  \t\tfdEvent_->setEnabled(false);\n>  \n>  \tbuffer->index_ = buf.index;\n> -\tbuffer->bytesused_ = buf.bytesused;\n>  \tbuffer->timestamp_ = buf.timestamp.tv_sec * 1000000000ULL\n>  \t\t\t   + buf.timestamp.tv_usec * 1000ULL;\n>  \tbuffer->sequence_ = buf.sequence;\n>  \tbuffer->status_ = buf.flags & V4L2_BUF_FLAG_ERROR\n>  \t\t\t? Buffer::BufferError : Buffer::BufferSuccess;\n>  \n> +\tif (multiPlanar_) {\n> +\t\tbuffer->bytesused_ = 0;\n> +\t\tfor (unsigned int p = 0; p < buf.length; ++p)\n> +\t\t\tbuffer->bytesused_ += planes[p].bytesused;\n> +\t} else {\n> +\t\tbuffer->bytesused_ = buf.bytesused;\n> +\t}\n> +\n>  \treturn buffer;\n>  }\n>","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1738360C0F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 20 Oct 2019 07:20:32 +0200 (CEST)","from pendragon.ideasonboard.com (unknown [212.213.198.112])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 714DEA2C;\n\tSun, 20 Oct 2019 07:20:31 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1571548831;\n\tbh=8DeabwEKoh5CuFQSAOUVJF+tgMI06ImSJPO1vgWUT6Y=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ThQpwzMxpewuR8jbQ6vmJF7zu8RAOAfbSZRDgnHe0o1seocHya5Bq+ks4RtwB2SSD\n\tTOZ2X70NSXJDmqjTJTaeSkCSQB+FggjiieN/w3ilsRJxr9vINE1xYPLny8H4l4KCjP\n\tQFZa9I5dMSSicIjL2dDy/ETgQUK8U9sNoKwXxGE8=","Date":"Sun, 20 Oct 2019 08:20:26 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20191020052026.GA4991@pendragon.ideasonboard.com>","References":"<20191018154201.13540-1-kieran.bingham@ideasonboard.com>\n\t<20191018154201.13540-3-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20191018154201.13540-3-kieran.bingham@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 2/2] libcamera: v4l2_videodevice:\n\tUpdate bytesused when dq'ing MPLANE buffers","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Sun, 20 Oct 2019 05:20:32 -0000"}},{"id":2934,"web_url":"https://patchwork.libcamera.org/comment/2934/","msgid":"<c54a9f4e-7cb5-118e-e368-4fc240a0e0d1@ideasonboard.com>","date":"2019-10-21T10:36:51","subject":"Re: [libcamera-devel] [PATCH 2/2] libcamera: v4l2_videodevice:\n\tUpdate bytesused when dq'ing MPLANE buffers","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 20/10/2019 06:20, Laurent Pinchart wrote:\n> Hi Kieran,\n> \n> Thank you for the patch.\n> \n> On Fri, Oct 18, 2019 at 04:42:01PM +0100, Kieran Bingham wrote:\n>> When we dequeue a buffer using the MPLANE API, we currently set our\n>> buffer->bytesused field to zero due to the zero entry in the V4L2 buffer\n>> bytesused field.\n>>\n>> The bytesused field is only really tracked for debug purposes currently,\n>> so store the total bytese used from each plane in our local statistics\n>> to identify actual data flow.\n>>\n>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>>\n>> ---\n>>\n>> This patch comes with a pinch of salt, we could also add a bytesused\n>> field to the Plane class and intead update all the debug prints to\n>> report the bytesused on a per-plane basis.\n> \n> My initial opinion is that handling this in the Buffer and Plane classes\n> would be better. I think the V4L2-related classes should stay as close\n> as possible to the V4L2 API, otherwise it could soon become quite\n> confusing.\n> \n> Niklas is planning to rework the buffer API this week, he should take\n> this into consideration.\n\nThat's fine, this patch was mostly sent to highlight the issue, and\ndiscuss, as noted by the 'pinch of salt'.\n\n\nI'll await the buffer rework.\n\n\n>> ---\n>>  src/libcamera/v4l2_videodevice.cpp | 9 ++++++++-\n>>  1 file changed, 8 insertions(+), 1 deletion(-)\n>>\n>> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n>> index 37f61b90ac46..71f141e7b511 100644\n>> --- a/src/libcamera/v4l2_videodevice.cpp\n>> +++ b/src/libcamera/v4l2_videodevice.cpp\n>> @@ -1124,13 +1124,20 @@ Buffer *V4L2VideoDevice::dequeueBuffer()\n>>  \t\tfdEvent_->setEnabled(false);\n>>  \n>>  \tbuffer->index_ = buf.index;\n>> -\tbuffer->bytesused_ = buf.bytesused;\n>>  \tbuffer->timestamp_ = buf.timestamp.tv_sec * 1000000000ULL\n>>  \t\t\t   + buf.timestamp.tv_usec * 1000ULL;\n>>  \tbuffer->sequence_ = buf.sequence;\n>>  \tbuffer->status_ = buf.flags & V4L2_BUF_FLAG_ERROR\n>>  \t\t\t? Buffer::BufferError : Buffer::BufferSuccess;\n>>  \n>> +\tif (multiPlanar_) {\n>> +\t\tbuffer->bytesused_ = 0;\n>> +\t\tfor (unsigned int p = 0; p < buf.length; ++p)\n>> +\t\t\tbuffer->bytesused_ += planes[p].bytesused;\n>> +\t} else {\n>> +\t\tbuffer->bytesused_ = buf.bytesused;\n>> +\t}\n>> +\n>>  \treturn buffer;\n>>  }\n>>  \n>","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A6DE560BE0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 21 Oct 2019 12:36:54 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 170EEB60;\n\tMon, 21 Oct 2019 12:36:53 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1571654214;\n\tbh=Y7ngxa5yeIRBLy4KAi1oaRy9nE8NmtS/QB9sWo6/RTA=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=c5cIUekSC2mj/GBACDTIEj7+1wLRPBge4biHoaEL3IbisexPoa7BmF/omu6AD5woq\n\tL45KRpBQUChRZgTvCHNBZ+MZwUb8P5EAjAkVxmRbZ9Vw3mfZCSzNR4x7IuxSt2W0nk\n\t5jxueVhkoKgmEHkazy6CdgJjYSJ+PBlLxwkdkX2c=","Reply-To":"kieran.bingham@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","References":"<20191018154201.13540-1-kieran.bingham@ideasonboard.com>\n\t<20191018154201.13540-3-kieran.bingham@ideasonboard.com>\n\t<20191020052026.GA4991@pendragon.ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard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ideas on Board","Message-ID":"<c54a9f4e-7cb5-118e-e368-4fc240a0e0d1@ideasonboard.com>","Date":"Mon, 21 Oct 2019 11:36:51 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.8.0","MIME-Version":"1.0","In-Reply-To":"<20191020052026.GA4991@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 2/2] libcamera: v4l2_videodevice:\n\tUpdate bytesused when dq'ing MPLANE buffers","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Mon, 21 Oct 2019 10:36:54 -0000"}},{"id":2977,"web_url":"https://patchwork.libcamera.org/comment/2977/","msgid":"<20191028105259.GD20198@bigcity.dyn.berto.se>","date":"2019-10-28T10:52:59","subject":"Re: [libcamera-devel] [PATCH 2/2] libcamera: v4l2_videodevice:\n\tUpdate bytesused when dq'ing MPLANE buffers","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"On 2019-10-21 11:36:51 +0100, Kieran Bingham wrote:\n> Hi Laurent,\n> \n> On 20/10/2019 06:20, Laurent Pinchart wrote:\n> > Hi Kieran,\n> > \n> > Thank you for the patch.\n> > \n> > On Fri, Oct 18, 2019 at 04:42:01PM +0100, Kieran Bingham wrote:\n> >> When we dequeue a buffer using the MPLANE API, we currently set our\n> >> buffer->bytesused field to zero due to the zero entry in the V4L2 buffer\n> >> bytesused field.\n> >>\n> >> The bytesused field is only really tracked for debug purposes currently,\n> >> so store the total bytese used from each plane in our local statistics\n> >> to identify actual data flow.\n> >>\n> >> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >>\n> >> ---\n> >>\n> >> This patch comes with a pinch of salt, we could also add a bytesused\n> >> field to the Plane class and intead update all the debug prints to\n> >> report the bytesused on a per-plane basis.\n> > \n> > My initial opinion is that handling this in the Buffer and Plane classes\n> > would be better. I think the V4L2-related classes should stay as close\n> > as possible to the V4L2 API, otherwise it could soon become quite\n> > confusing.\n> > \n> > Niklas is planning to rework the buffer API this week, he should take\n> > this into consideration.\n> \n> That's fine, this patch was mostly sent to highlight the issue, and\n> discuss, as noted by the 'pinch of salt'.\n> \n> \n> I'll await the buffer rework.\n\nThis is addressed in the buffer rework series.\n\n> \n> \n> >> ---\n> >>  src/libcamera/v4l2_videodevice.cpp | 9 ++++++++-\n> >>  1 file changed, 8 insertions(+), 1 deletion(-)\n> >>\n> >> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> >> index 37f61b90ac46..71f141e7b511 100644\n> >> --- a/src/libcamera/v4l2_videodevice.cpp\n> >> +++ b/src/libcamera/v4l2_videodevice.cpp\n> >> @@ -1124,13 +1124,20 @@ Buffer *V4L2VideoDevice::dequeueBuffer()\n> >>  \t\tfdEvent_->setEnabled(false);\n> >>  \n> >>  \tbuffer->index_ = buf.index;\n> >> -\tbuffer->bytesused_ = buf.bytesused;\n> >>  \tbuffer->timestamp_ = buf.timestamp.tv_sec * 1000000000ULL\n> >>  \t\t\t   + buf.timestamp.tv_usec * 1000ULL;\n> >>  \tbuffer->sequence_ = buf.sequence;\n> >>  \tbuffer->status_ = buf.flags & V4L2_BUF_FLAG_ERROR\n> >>  \t\t\t? Buffer::BufferError : Buffer::BufferSuccess;\n> >>  \n> >> +\tif (multiPlanar_) {\n> >> +\t\tbuffer->bytesused_ = 0;\n> >> +\t\tfor (unsigned int p = 0; p < buf.length; ++p)\n> >> +\t\t\tbuffer->bytesused_ += planes[p].bytesused;\n> >> +\t} else {\n> >> +\t\tbuffer->bytesused_ = buf.bytesused;\n> >> +\t}\n> >> +\n> >>  \treturn buffer;\n> >>  }\n> >>  \n> > \n> \n> -- \n> Regards\n> --\n> Kieran\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lj1-x241.google.com (mail-lj1-x241.google.com\n\t[IPv6:2a00:1450:4864:20::241])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 25EE96017E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Oct 2019 11:53:01 +0100 (CET)","by mail-lj1-x241.google.com with SMTP id c4so10758160lja.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Oct 2019 03:53:01 -0700 (PDT)","from localhost (h-93-159.A463.priv.bahnhof.se. [46.59.93.159])\n\tby smtp.gmail.com with ESMTPSA id\n\tz14sm4650000lfh.30.2019.10.28.03.52.59\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 28 Oct 2019 03:52:59 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=5hVN/nOrJx38RUmvR7E4ExVt+VAO7e4D9SZkoUmfQcQ=;\n\tb=B1yxbe1gCmMfN7v1eec3qZgugmtF0d3uFKL65xJb1gsOz/WXKc/pUm7N31coRuvfS4\n\t8RVp8tai+3ugv7bK7r5Oe6PKVgA7iko0aoqh8bCxP9QJ/Kqd+E99JRYvw7nxqviKEox+\n\t6AzMus6JVm6NML5XNUvnYLYmfDuBBhIBNOTivp20CR/iLwgfSG5dq/5HHWtGTSCByopz\n\t614a2J5jVVx79/F/wG4L4sJrkYSa4mM3gvc02XXiUE6vCkXCDKuGCbZ9cR0QUvcVc8NI\n\tR0K++4K1nlY2YQPhsPENZxNNyqXiGyKo41Nn/GrRXzZwiv/BzFzDQrWe7EK+cMKmVo6y\n\tX9pA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=5hVN/nOrJx38RUmvR7E4ExVt+VAO7e4D9SZkoUmfQcQ=;\n\tb=Ug6uyw7QekZHb92D/9WhOHPfbM49atSzfGjVwyGWwP/Rg/xhnkDRptbwM1Y5TNeFeJ\n\tk3s+by5oUXvYAHqa53YNkZedXxGOSEIx7qXLmlEVptcjYd4RCdLQErSijUSjAAccn4+A\n\tqbST61R1lVsLlO5Ev8rx7FFFoQdwONwhjhCI4L+EKXpeq4M3UWegjy+aBvHlNuepaWJI\n\tifPFSlJhqj9JwbL/0r4TTyJg3v8C4PWM8vR61p/A7S/ns/iIqRx77PqgL+ZHb8LnWPZN\n\tzDQw93dozzoG4XsVyc1baipWIKH9wRbX0ec76DeEgGFhHCPeg0ckb8XTd0aYpMsY0VBZ\n\tZoNA==","X-Gm-Message-State":"APjAAAX7C3C0WGcGy6tHeNjYNm0wItnk139L9HdEJjIdK4WOMQyIAl9u\n\ttJDn9xOC1fraLl0M0Ql33suv0Znjk4s=","X-Google-Smtp-Source":"APXvYqztiKon70udoQu+Zm1EYEq0lOp1nWgu4Ayt2gNMaqt2ga8Hpc2ndWxkaOvMDiV0vjz5Gyi4jg==","X-Received":"by 2002:a05:651c:8b:: with SMTP id\n\t11mr11594802ljq.100.1572259980472; \n\tMon, 28 Oct 2019 03:53:00 -0700 (PDT)","Date":"Mon, 28 Oct 2019 11:52:59 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tLibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20191028105259.GD20198@bigcity.dyn.berto.se>","References":"<20191018154201.13540-1-kieran.bingham@ideasonboard.com>\n\t<20191018154201.13540-3-kieran.bingham@ideasonboard.com>\n\t<20191020052026.GA4991@pendragon.ideasonboard.com>\n\t<c54a9f4e-7cb5-118e-e368-4fc240a0e0d1@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<c54a9f4e-7cb5-118e-e368-4fc240a0e0d1@ideasonboard.com>","User-Agent":"Mutt/1.12.1 (2019-06-15)","Subject":"Re: [libcamera-devel] [PATCH 2/2] libcamera: v4l2_videodevice:\n\tUpdate bytesused when dq'ing MPLANE buffers","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Mon, 28 Oct 2019 10:53:01 -0000"}}]