[{"id":4875,"web_url":"https://patchwork.libcamera.org/comment/4875/","msgid":"<20200520104253.GB5852@pendragon.ideasonboard.com>","date":"2020-05-20T10:42:53","subject":"Re: [libcamera-devel] [PATCH v2 1/2] include: linux: Update v4l2\n\tctrls for properties","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Wed, May 20, 2020 at 12:03:19PM +0200, Jacopo Mondi wrote:\n> The version of the v4l2-controls.h header file shipped by libcamera had\n> slightly deviated from the upstream one, as it included definitions for\n\n\"slightly\" ? ;-)\n\n> v4l2 controls that report camera properties, which were not acceppted\n\ns/acceppted/accepted/\n\n> upstream at the time the header file was updated.\n> \n> Now that the controls definition has been accepted in the master branch\n> of the linux-media kernel tree, update include/linux/v4l2-controls.h with\n> the upstream-accepted definition of the control ids that describe camera\n> properties.\n> \n> The control definition has been imported from the Linux kernel header\n> files generated from the most recent linux-media master branch, at\n> revision\n> ad3a44cbd1b2e (\"media: i2c: imx219: Parse and register properties\")\n> \n> Instead of updating the whole header, just update the definition of V4L2\n> controls that describe camera properties. A full header update will be\n> performed at the next available linux-media release candidate.\n\ns/at the next available/at a future/ (maybe we'll miss -rc1 :-))\ns/linux-media/Linux kernel/\n\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  include/linux/v4l2-controls.h | 20 ++++----------------\n>  1 file changed, 4 insertions(+), 16 deletions(-)\n> \n> diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h\n> index 171351aee6fc..24eea2b69a86 100644\n> --- a/include/linux/v4l2-controls.h\n> +++ b/include/linux/v4l2-controls.h\n> @@ -914,22 +914,10 @@ enum v4l2_auto_focus_range {\n>  #define V4L2_CID_PAN_SPEED\t\t\t(V4L2_CID_CAMERA_CLASS_BASE+32)\n>  #define V4L2_CID_TILT_SPEED\t\t\t(V4L2_CID_CAMERA_CLASS_BASE+33)\n>  \n> -/*\n> - * This version of the v4l2-controls.h header part of the libcamera sources has\n> - * deviated from the version distributed by the mainline Linux kernel.\n> - *\n> - * Specifically, this version includes temporary definitions of a few custom\n> - * controls (V4L2_CID_CAMERA_SENSOR_ROTATION and\n> - * V4L2_CID_CAMERA_SENSOR_LOCATION) which have not yet made their way to\n> - * upstream Linux.\n> - *\n> - * When updating this header with a more recent version, make sure the new\n> - * version has those additional controls defined.\n> - */\n> -#define V4L2_CID_CAMERA_SENSOR_LOCATION\t\t(V4L2_CID_CAMERA_CLASS_BASE+34)\n> -#define V4L2_LOCATION_FRONT\t\t\t0\n> -#define V4L2_LOCATION_BACK\t\t\t1\n> -#define V4L2_LOCATION_EXTERNAL\t\t\t2\n> +#define V4L2_CID_CAMERA_ORIENTATION\t\t(V4L2_CID_CAMERA_CLASS_BASE+34)\n> +#define V4L2_CAMERA_ORIENTATION_FRONT\t\t0\n> +#define V4L2_CAMERA_ORIENTATION_BACK\t\t1\n> +#define V4L2_CAMERA_ORIENTATION_EXTERNAL\t2\n>  \n>  #define V4L2_CID_CAMERA_SENSOR_ROTATION\t\t(V4L2_CID_CAMERA_CLASS_BASE+35)\n>","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 46EB7603F3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 May 2020 12:43:04 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B8755253;\n\tWed, 20 May 2020 12:43:03 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"ljRmyd0+\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1589971383;\n\tbh=kk2qT2ZjKUP5Sfu8y+ZrAg3mUjF/l4YxX+UeWvrxIZk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ljRmyd0+bZnNX/glD/BDWolRXIizcAKCmw7Rq65NCpGvSYZK2MAEGRRnVSM2hJjdB\n\tpWKawf782wF6g+e08AeR7YMO+rEz7nnPVuGXqjXrsLtl28EbLJSptmTV2+Mn4iLROt\n\ttZm6bAasuMlPUjThizzVV3i3VOTn6BSswJhRc1pY=","Date":"Wed, 20 May 2020 13:42:53 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200520104253.GB5852@pendragon.ideasonboard.com>","References":"<20200520100320.436430-1-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20200520100320.436430-1-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH v2 1/2] include: linux: Update v4l2\n\tctrls for properties","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":"Wed, 20 May 2020 10:43:04 -0000"}}]