[{"id":14982,"web_url":"https://patchwork.libcamera.org/comment/14982/","msgid":"<YBxHAcMpdWsbx+SM@pendragon.ideasonboard.com>","date":"2021-02-04T19:12:01","subject":"Re: [libcamera-devel] [PATCH v4 1/5] libcamera: camera_sensor: Make\n\tVBLANK mandatory","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nThank you for the patch.\n\nOn Fri, Jan 29, 2021 at 11:16:12AM +0000, Naushir Patuck wrote:\n> From: Jacopo Mondi <jacopo@jmondi.org>\n> \n> Add the V4L2_CID_VBLANK control to the list of mandatory controls\n> the sensor driver has to report and document the new requirement.\n> \n> The vertical blanking control is used to calculate the frame duration.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  Documentation/sensor_driver_requirements.rst | 6 ++++--\n>  src/libcamera/camera_sensor.cpp              | 1 +\n>  2 files changed, 5 insertions(+), 2 deletions(-)\n> \n> diff --git a/Documentation/sensor_driver_requirements.rst b/Documentation/sensor_driver_requirements.rst\n> index 6dcd4e68d64d..590797f054ce 100644\n> --- a/Documentation/sensor_driver_requirements.rst\n> +++ b/Documentation/sensor_driver_requirements.rst\n> @@ -27,18 +27,20 @@ The sensor driver shall support the following V4L2 controls:\n>  * `V4L2_CID_EXPOSURE`_\n>  * `V4L2_CID_HBLANK`_\n>  * `V4L2_CID_PIXEL_RATE`_\n> +* `V4L2_CID_VBLANK`_\n>  \n>  .. _V4L2_CID_EXPOSURE: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/control.html\n>  .. _V4L2_CID_HBLANK: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-image-source.html\n>  .. _V4L2_CID_PIXEL_RATE: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-image-process.html\n> +.. _V4L2_CID_VBLANK: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-image-source.html\n>  \n>  While V4L2 doesn't specify a unit for the `EXPOSURE` control, libcamera requires\n>  it to be expressed as a number of image lines. Camera sensor drivers that do not\n>  comply with this requirement will need to be adapted or will produce incorrect\n>  results.\n>  \n> -The `HBLANK` and `PIXEL_RATE` controls are used to compute the sensor output\n> -timings.\n> +The `HBLANK`, `PIXEL_RATE` and `VBLANK` controls are used to compute the sensor\n> +output timings.\n>  \n>  Optional Requirements\n>  ---------------------\n> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> index ca33c0094088..ab315bdc468c 100644\n> --- a/src/libcamera/camera_sensor.cpp\n> +++ b/src/libcamera/camera_sensor.cpp\n> @@ -244,6 +244,7 @@ int CameraSensor::validateSensorDriver()\n>  \t\tV4L2_CID_EXPOSURE,\n>  \t\tV4L2_CID_HBLANK,\n>  \t\tV4L2_CID_PIXEL_RATE,\n> +\t\tV4L2_CID_VBLANK,\n>  \t};\n>  \n>  \tControlList ctrls = subdev_->getControls(mandatoryControls);","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3831DBD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  4 Feb 2021 19:12:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C36B761459;\n\tThu,  4 Feb 2021 20:12:26 +0100 (CET)","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 0DA4761430\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  4 Feb 2021 20:12:25 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2B686EE;\n\tThu,  4 Feb 2021 20:12:24 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"DDz2OAzn\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1612465944;\n\tbh=757xiwsVOooWik89L/eiV261dpONpss7V9JZS+nQ2is=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=DDz2OAzn42OarWljTFuRc6ndDOKiuSjpGwvoID0UTyBDbRNCM7vQoAMQUiIoP544x\n\trqbwqObcTj58qkn4BnXRN9FbkyOAPlJrIzdB0kpZoSfvxmcKY0tflYmig06UorBuqM\n\tVzAG0PbqaXEqszHdu+ApN1er3+DjevLeVctodSy8=","Date":"Thu, 4 Feb 2021 21:12:01 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<YBxHAcMpdWsbx+SM@pendragon.ideasonboard.com>","References":"<20210129111616.1047483-1-naush@raspberrypi.com>\n\t<20210129111616.1047483-2-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210129111616.1047483-2-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v4 1/5] libcamera: camera_sensor: Make\n\tVBLANK mandatory","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]