Patch Detail
Show a patch.
GET /api/patches/3414/?format=api
{ "id": 3414, "url": "https://patchwork.libcamera.org/api/patches/3414/?format=api", "web_url": "https://patchwork.libcamera.org/patch/3414/", "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": "<20200407163825.1766483-6-jacopo@jmondi.org>", "date": "2020-04-07T16:38:19", "name": "[libcamera-devel,v8,05/11] media: v4l2-ctrls: Add camera location and rotation", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "8ad6960cf09bfe0954840b94ba2ca7047e500c5f", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": { "id": 15, "url": "https://patchwork.libcamera.org/api/users/15/?format=api", "username": "jmondi", "first_name": "Jacopo", "last_name": "Mondi", "email": "jacopo@jmondi.org" }, "mbox": "https://patchwork.libcamera.org/patch/3414/mbox/", "series": [ { "id": 801, "url": "https://patchwork.libcamera.org/api/series/801/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=801", "date": "2020-04-07T16:38:14", "name": "media: Report camera sensor properties", "version": 8, "mbox": "https://patchwork.libcamera.org/series/801/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/3414/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/3414/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n\t[217.70.183.194])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EDCDF62DFB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 7 Apr 2020 18:35:39 +0200 (CEST)", "from localhost.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 3398B40011;\n\tTue, 7 Apr 2020 16:35:38 +0000 (UTC)" ], "X-Originating-IP": "2.224.242.101", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "Mauro Carvalho Chehab <mchehab@kernel.org>,\n\tHans Verkuil <hverkuil-cisco@xs4all.nl>,\n\tSakari Ailus <sakari.ailus@linux.intel.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>, tfiga@google.com,\n\tpavel@ucw.cz", "Cc": "Jacopo Mondi <jacopo@jmondi.org>,\n\tlinux-media@vger.kernel.org (open list:MEDIA INPUT INFRASTRUCTURE\n\t(V4L/DVB)), libcamera-devel@lists.libcamera.org", "Date": "Tue, 7 Apr 2020 18:38:19 +0200", "Message-Id": "<20200407163825.1766483-6-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.26.0", "In-Reply-To": "<20200407163825.1766483-1-jacopo@jmondi.org>", "References": "<20200407163825.1766483-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v8 05/11] media: v4l2-ctrls: Add camera\n\tlocation 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>", "X-List-Received-Date": "Tue, 07 Apr 2020 16:35:40 -0000" }, "content": "Add support for the newly defined V4L2_CID_CAMERA_SENSOR_LOCATION\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>\n---\n drivers/media/v4l2-core/v4l2-ctrls.c | 4 ++++\n include/uapi/linux/v4l2-controls.h | 7 +++++++\n 2 files changed, 11 insertions(+)", "diff": "diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c\nindex 93d33d1db4e8..fdb1007212a7 100644\n--- a/drivers/media/v4l2-core/v4l2-ctrls.c\n+++ b/drivers/media/v4l2-core/v4l2-ctrls.c\n@@ -1015,6 +1015,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_SENSOR_LOCATION:\treturn \"Camera Sensor Location\";\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@@ -1341,6 +1343,8 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,\n \t\tbreak;\n \tcase V4L2_CID_MIN_BUFFERS_FOR_CAPTURE:\n \tcase V4L2_CID_MIN_BUFFERS_FOR_OUTPUT:\n+\tcase V4L2_CID_CAMERA_SENSOR_LOCATION:\n+\tcase V4L2_CID_CAMERA_SENSOR_ROTATION:\n \t\t*type = V4L2_CTRL_TYPE_INTEGER;\n \t\t*flags |= V4L2_CTRL_FLAG_READ_ONLY;\n \t\tbreak;\ndiff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h\nindex 1a58d7cc4ccc..3a2d8c2ad23b 100644\n--- a/include/uapi/linux/v4l2-controls.h\n+++ b/include/uapi/linux/v4l2-controls.h\n@@ -918,6 +918,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_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+\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", "v8", "05/11" ] }