Patch Detail
Show a patch.
GET /api/patches/8811/?format=api
{ "id": 8811, "url": "https://patchwork.libcamera.org/api/patches/8811/?format=api", "web_url": "https://patchwork.libcamera.org/patch/8811/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20200715011833.24600-6-laurent.pinchart@ideasonboard.com>", "date": "2020-07-15T01:18:25", "name": "[libcamera-devel,v2,05/13] media: v4l2-ctrls: Add camera orientation and rotation", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "4d0dd78ebdde8e5b1184fe607b73ac61abc60317", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": { "id": 14, "url": "https://patchwork.libcamera.org/api/users/14/?format=api", "username": "pinchartl", "first_name": "Laurent", "last_name": "Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/patch/8811/mbox/", "series": [ { "id": 1108, "url": "https://patchwork.libcamera.org/api/series/1108/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1108", "date": "2020-07-15T01:18:21", "name": "raspberrypi: Report sensor orientation through DT", "version": 2, "mbox": "https://patchwork.libcamera.org/series/1108/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/8811/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/8811/checks/", "tags": {}, "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 63FD2BD790\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 15 Jul 2020 01:18:52 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1795F6093C;\n\tWed, 15 Jul 2020 03:18:52 +0200 (CEST)", "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 52DE360929\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 15 Jul 2020 03:18:47 +0200 (CEST)", "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B464111C7;\n\tWed, 15 Jul 2020 03:18:46 +0200 (CEST)" ], "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=\"q5BU8KSV\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1594775926;\n\tbh=ox1rRT9vOhwdmdSO7jgaIHi34mHuSCNl2eg//0Ne37E=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=q5BU8KSVKc9ZIzFE4pA063I+E6uZ47IOZOd55m0Xgptr+SI/se9KpzphErcaABgNQ\n\tQ2JonvzUpXeLl2NVmJwOSeHoZ67oqIhhZBp7sntmLjchtfKSvLafHPNdaNFV7xb0O5\n\t30XIw/0PyUP7FKZ5YwVOmSftJd0JDEalOHzDFOCQ=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "Dave Stevenson <dave.stevenson@raspberrypi.com>", "Date": "Wed, 15 Jul 2020 04:18:25 +0300", "Message-Id": "<20200715011833.24600-6-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20200715011833.24600-1-laurent.pinchart@ideasonboard.com>", "References": "<20200715011833.24600-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v2 05/13] media: v4l2-ctrls: Add camera\n\torientation and rotation", "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>" }, "content": "From: Jacopo Mondi <jacopo@jmondi.org>\n\nAdd support for the newly defined V4L2_CID_CAMERA_ORIENTATION\nand V4L2_CID_CAMERA_SENSOR_ROTATION read-only controls used to report\nthe camera device mounting position and orientation respectively.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nSigned-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>\nSigned-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>\n\nCommit 926645d43fd43622a2b056471a2cf41cc19cbf4c upstream\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n drivers/media/v4l2-core/v4l2-ctrls.c | 13 +++++++++++++\n include/uapi/linux/v4l2-controls.h | 7 +++++++\n 2 files changed, 20 insertions(+)", "diff": "diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c\nindex 4f1533563655..6a8eb39eec81 100644\n--- a/drivers/media/v4l2-core/v4l2-ctrls.c\n+++ b/drivers/media/v4l2-core/v4l2-ctrls.c\n@@ -577,6 +577,12 @@ const char * const *v4l2_ctrl_get_menu(u32 id)\n \t\t\"Annex B Start Code\",\n \t\tNULL,\n \t};\n+\tstatic const char * const camera_orientation[] = {\n+\t\t\"Front\",\n+\t\t\"Back\",\n+\t\t\"External\",\n+\t\tNULL,\n+\t};\n \n \tswitch (id) {\n \tcase V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ:\n@@ -702,6 +708,8 @@ const char * const *v4l2_ctrl_get_menu(u32 id)\n \t\treturn hevc_decode_mode;\n \tcase V4L2_CID_MPEG_VIDEO_HEVC_START_CODE:\n \t\treturn hevc_start_code;\n+\tcase V4L2_CID_CAMERA_ORIENTATION:\n+\t\treturn camera_orientation;\n \tdefault:\n \t\treturn NULL;\n \t}\n@@ -1015,6 +1023,8 @@ const char *v4l2_ctrl_get_name(u32 id)\n \tcase V4L2_CID_PAN_SPEED:\t\treturn \"Pan, Speed\";\n \tcase V4L2_CID_TILT_SPEED:\t\treturn \"Tilt, Speed\";\n \tcase V4L2_CID_UNIT_CELL_SIZE:\t\treturn \"Unit Cell Size\";\n+\tcase V4L2_CID_CAMERA_ORIENTATION:\treturn \"Camera Orientation\";\n+\tcase V4L2_CID_CAMERA_SENSOR_ROTATION:\treturn \"Camera Sensor Rotation\";\n \n \t/* FM Radio Modulator controls */\n \t/* Keep the order of the 'case's the same as in v4l2-controls.h! */\n@@ -1288,6 +1298,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,\n \tcase V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE:\n \tcase V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE:\n \tcase V4L2_CID_MPEG_VIDEO_HEVC_START_CODE:\n+\tcase V4L2_CID_CAMERA_ORIENTATION:\n \t\t*type = V4L2_CTRL_TYPE_MENU;\n \t\tbreak;\n \tcase V4L2_CID_LINK_FREQ:\n@@ -1480,6 +1491,8 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,\n \tcase V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT:\n \tcase V4L2_CID_RDS_RX_TRAFFIC_PROGRAM:\n \tcase V4L2_CID_RDS_RX_MUSIC_SPEECH:\n+\tcase V4L2_CID_CAMERA_ORIENTATION:\n+\tcase V4L2_CID_CAMERA_SENSOR_ROTATION:\n \t\t*flags |= V4L2_CTRL_FLAG_READ_ONLY;\n \t\tbreak;\n \tcase V4L2_CID_RF_TUNER_PLL_LOCK:\ndiff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h\nindex 660574b1b4e7..b6173d8c38f1 100644\n--- a/include/uapi/linux/v4l2-controls.h\n+++ b/include/uapi/linux/v4l2-controls.h\n@@ -917,6 +917,13 @@ 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+#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+\n /* FM Modulator class control IDs */\n \n #define V4L2_CID_FM_TX_CLASS_BASE\t\t(V4L2_CTRL_CLASS_FM_TX | 0x900)\n", "prefixes": [ "libcamera-devel", "v2", "05/13" ] }