Patch Detail
Show a patch.
GET /api/patches/4158/?format=api
{ "id": 4158, "url": "https://patchwork.libcamera.org/api/patches/4158/?format=api", "web_url": "https://patchwork.libcamera.org/patch/4158/", "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": "<20200623164224.44476-1-jacopo@jmondi.org>", "date": "2020-06-23T16:42:20", "name": "[libcamera-devel,11/25] media: ov5647: Implement enum_frame_size()", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "e2ddae561559dc5606aea23293d99c3f4135d4d4", "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/4158/mbox/", "series": [ { "id": 1030, "url": "https://patchwork.libcamera.org/api/series/1030/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1030", "date": "2020-06-23T10:07:50", "name": "media: ov5647: Support RaspberryPi Camera Module v1", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1030/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/4158/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/4158/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net\n\t[217.70.183.195])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7727B60103\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Jun 2020 18:39:11 +0200 (CEST)", "from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay3-d.mail.gandi.net (Postfix) with ESMTPSA id CEA776000A;\n\tTue, 23 Jun 2020 16:39:03 +0000 (UTC)" ], "X-Originating-IP": "93.34.118.233", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "mchehab@kernel.org, sakari.ailus@linux.intel.com, hverkuil@xs4all.nl,\n\tlaurent.pinchart@ideasonboard.com, roman.kovalivskyi@globallogic.com, \n\tdave.stevenson@raspberrypi.org, naush@raspberrypi.com", "Cc": "mrodin@de.adit-jv.com, hugues.fruchet@st.com, mripard@kernel.org,\n\taford173@gmail.com, sudipi@jp.adit-jv.com, andrew_gabbasov@mentor.com,\n\terosca@de.adit-jv.com, linux-media@vger.kernel.org,\n\tlibcamera-devel@lists.libcamera.org, Jacopo Mondi <jacopo@jmondi.org>", "Date": "Tue, 23 Jun 2020 18:42:20 +0200", "Message-Id": "<20200623164224.44476-1-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20200623100815.10674-1-jacopo@jmondi.org>", "References": "<20200623100815.10674-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 11/25] media: ov5647: Implement\n\tenum_frame_size()", "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, 23 Jun 2020 16:39:11 -0000" }, "content": "Implement the .enum_frame_size subdev pad operation.\n\nAs the driver only supports one format and one resolution at the moment\nthe implementation is trivial.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n drivers/media/i2c/ov5647.c | 25 ++++++++++++++++++++++---\n 1 file changed, 22 insertions(+), 3 deletions(-)", "diff": "diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c\nindex bb9ff77f49fe0..859cc5b0d14a3 100644\n--- a/drivers/media/i2c/ov5647.c\n+++ b/drivers/media/i2c/ov5647.c\n@@ -482,6 +482,24 @@ static int ov5647_enum_mbus_code(struct v4l2_subdev *sd,\n \treturn 0;\n }\n \n+static int ov5647_enum_frame_size(struct v4l2_subdev *sd,\n+\t\t\t\t struct v4l2_subdev_pad_config *cfg,\n+\t\t\t\t struct v4l2_subdev_frame_size_enum *fse)\n+{\n+\tif (fse->index)\n+\t\treturn -EINVAL;\n+\n+\tif (fse->code != MEDIA_BUS_FMT_SBGGR8_1X8)\n+\t\treturn -EINVAL;\n+\n+\tfse->min_width = 640;\n+\tfse->max_width = 640;\n+\tfse->min_height = 480;\n+\tfse->max_height = 480;\n+\n+\treturn 0;\n+}\n+\n static int ov5647_set_get_fmt(struct v4l2_subdev *sd,\n \t\t\t struct v4l2_subdev_pad_config *cfg,\n \t\t\t struct v4l2_subdev_format *format)\n@@ -500,9 +518,10 @@ static int ov5647_set_get_fmt(struct v4l2_subdev *sd,\n }\n \n static const struct v4l2_subdev_pad_ops ov5647_subdev_pad_ops = {\n-\t.enum_mbus_code = ov5647_enum_mbus_code,\n-\t.set_fmt =\t ov5647_set_get_fmt,\n-\t.get_fmt =\t ov5647_set_get_fmt,\n+\t.enum_mbus_code\t\t= ov5647_enum_mbus_code,\n+\t.enum_frame_size\t= ov5647_enum_frame_size,\n+\t.set_fmt\t\t= ov5647_set_get_fmt,\n+\t.get_fmt\t\t= ov5647_set_get_fmt,\n };\n \n static const struct v4l2_subdev_ops ov5647_subdev_ops = {\n", "prefixes": [ "libcamera-devel", "11/25" ] }