Patch Detail
Show a patch.
GET /api/1.1/patches/15852/?format=api
{ "id": 15852, "url": "https://patchwork.libcamera.org/api/1.1/patches/15852/?format=api", "web_url": "https://patchwork.libcamera.org/patch/15852/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20220510115147.19360-13-laurent.pinchart@ideasonboard.com>", "date": "2022-05-10T11:51:09", "name": "[libcamera-devel,12/50] staging: media: imx: imx7-media-csi: Drop legacy video device support", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "30a9338094f4962e95ae5967caa1812554b7da7c", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/15852/mbox/", "series": [ { "id": 3106, "url": "https://patchwork.libcamera.org/api/1.1/series/3106/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3106", "date": "2022-05-10T11:50:57", "name": "staging: media: imx: Prepare destaging of imx7-media-csi", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3106/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/15852/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/15852/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 1F483C326D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 10 May 2022 11:52:14 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B21196566D;\n\tTue, 10 May 2022 13:52:13 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7DE0865664\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 10 May 2022 13:52:07 +0200 (CEST)", "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 96F0AE0C;\n\tTue, 10 May 2022 13:52:06 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652183533;\n\tbh=fvLlTM3o+3rn3zzOQBxWlaa4ljFoBkY1Y//8BFiskao=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=BN+50uECuYj+pJlojXqMLn2KNHucLDOMbNEj0qPGPIUiVq0EaVdO8pobEWzKc1Sa2\n\tsvM41IIYFN7ynCuQ4xBuIReoOjdKu3plikExBXhXuYnA4DdWGqxTcwCdzk3iXhWosF\n\tVAxfYkiOqgo6zzM+dGMepqKRtIMMCDiJElOvB7lQn0Lvfyk8vIYnqQbhn8LEN1j1Yn\n\tNXtdBNmR+OiLJTdgXBoHv3Ax2k//vs8Exk5FUMmYQQTkP0MlmaUIVI7Ic+uVhsLoPA\n\tBtXdhxZs+46GMN1DSEPuLdAgZ1yvkGpnuuDxV4sHJ5D45jeMGLAxCTofR14AH8jC+3\n\tEtqbkt8m0BpgA==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1652183527;\n\tbh=fvLlTM3o+3rn3zzOQBxWlaa4ljFoBkY1Y//8BFiskao=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=lOfrDQFCvH8yEz/blnZhLCxB+N3FbpmLVmNV4ihBF6l9fm0XXCBKUpj0UvOdPAeud\n\tOh+yM6VF1qP/iLsr5qjdHlGvSRboXDn0ZWi/kq17AktD6fO2/OXmRPk5BIWEuWaOPa\n\tX9Pp0MjkPA+3F8BdIBrUTLOaq9qlaedJK5Kz+tpM=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"lOfrDQFC\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 10 May 2022 14:51:09 +0300", "Message-Id": "<20220510115147.19360-13-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.35.1", "In-Reply-To": "<20220510115147.19360-1-laurent.pinchart@ideasonboard.com>", "References": "<20220510115147.19360-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 12/50] staging: media: imx:\n\timx7-media-csi: Drop legacy video device support", "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>", "From": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "Cc": "Martin Kepplinger <martin.kepplinger@puri.sm>, kernel@pengutronix.de,\n\tDorota Czaplejewicz <dorota.czaplejewicz@puri.sm>,\n\tAlexander Stein <alexander.stein@ew.tq-group.com>,\n\tRui Miguel Silva <rmfrfs@gmail.com>,\n\tPhilipp Zabel <p.zabel@pengutronix.de>, \n\tSteve Longerbeam <slongerbeam@gmail.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Drop all the code related to the unused (by this driver) legacy video\ndevice support.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n drivers/staging/media/imx/imx7-media-csi.c | 31 +++++-----------------\n 1 file changed, 6 insertions(+), 25 deletions(-)", "diff": "diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c\nindex 63f291684e79..2e314ce961dc 100644\n--- a/drivers/staging/media/imx/imx7-media-csi.c\n+++ b/drivers/staging/media/imx/imx7-media-csi.c\n@@ -746,8 +746,6 @@ struct capture_priv {\n \tspinlock_t q_lock;\t\t\t/* Protect ready_q */\n \n \tstruct v4l2_ctrl_handler ctrl_hdlr;\t/* Controls inherited from subdevs */\n-\n-\tbool legacy_api;\t\t\t/* Use the legacy (pre-MC) API */\n };\n \n #define to_capture_priv(v) container_of(v, struct capture_priv, vdev)\n@@ -1240,20 +1238,10 @@ static int capture_init_format(struct capture_priv *priv)\n \t\t.which = V4L2_SUBDEV_FORMAT_ACTIVE,\n \t};\n \tstruct imx_media_video_dev *vdev = &priv->vdev;\n-\tint ret;\n \n-\tif (priv->legacy_api) {\n-\t\tret = v4l2_subdev_call(priv->src_sd, pad, get_fmt, NULL,\n-\t\t\t\t &fmt_src);\n-\t\tif (ret) {\n-\t\t\tdev_err(priv->dev, \"failed to get source format\\n\");\n-\t\t\treturn ret;\n-\t\t}\n-\t} else {\n-\t\tfmt_src.format.code = MEDIA_BUS_FMT_UYVY8_2X8;\n-\t\tfmt_src.format.width = IMX_MEDIA_DEF_PIX_WIDTH;\n-\t\tfmt_src.format.height = IMX_MEDIA_DEF_PIX_HEIGHT;\n-\t}\n+\tfmt_src.format.code = MEDIA_BUS_FMT_UYVY8_2X8;\n+\tfmt_src.format.width = IMX_MEDIA_DEF_PIX_WIDTH;\n+\tfmt_src.format.height = IMX_MEDIA_DEF_PIX_HEIGHT;\n \n \timx_media_mbus_fmt_to_pix_fmt(&vdev->fmt, &fmt_src.format, NULL);\n \tvdev->compose.width = fmt_src.format.width;\n@@ -1322,7 +1310,7 @@ static void imx7_media_capture_device_unregister(struct imx_media_video_dev *vde\n \n static struct imx_media_video_dev *\n imx7_media_capture_device_init(struct device *dev, struct v4l2_subdev *src_sd,\n-\t\t\t int pad, bool legacy_api)\n+\t\t\t int pad)\n {\n \tstruct capture_priv *priv;\n \tstruct video_device *vfd;\n@@ -1336,7 +1324,6 @@ imx7_media_capture_device_init(struct device *dev, struct v4l2_subdev *src_sd,\n \tpriv->src_sd = src_sd;\n \tpriv->src_sd_pad = pad;\n \tpriv->dev = dev;\n-\tpriv->legacy_api = legacy_api;\n \n \tmutex_init(&priv->mutex);\n \tINIT_LIST_HEAD(&priv->ready_q);\n@@ -1354,7 +1341,7 @@ imx7_media_capture_device_init(struct device *dev, struct v4l2_subdev *src_sd,\n \tvfd->vfl_dir = VFL_DIR_RX;\n \tvfd->tvnorms = V4L2_STD_NTSC | V4L2_STD_PAL | V4L2_STD_SECAM;\n \tvfd->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING\n-\t\t\t | (!legacy_api ? V4L2_CAP_IO_MC : 0);\n+\t\t\t | V4L2_CAP_IO_MC;\n \tvfd->lock = &priv->mutex;\n \tvfd->queue = &priv->q;\n \n@@ -1392,12 +1379,6 @@ imx7_media_capture_device_init(struct device *dev, struct v4l2_subdev *src_sd,\n \t\treturn ERR_PTR(ret);\n \t}\n \n-\tif (legacy_api) {\n-\t\t/* Initialize the control handler. */\n-\t\tv4l2_ctrl_handler_init(&priv->ctrl_hdlr, 0);\n-\t\tvfd->ctrl_handler = &priv->ctrl_hdlr;\n-\t}\n-\n \treturn &priv->vdev;\n }\n \n@@ -1742,7 +1723,7 @@ static int imx7_csi_registered(struct v4l2_subdev *sd)\n \tint ret;\n \n \tcsi->vdev = imx7_media_capture_device_init(csi->sd.dev, &csi->sd,\n-\t\t\t\t\t\t IMX7_CSI_PAD_SRC, false);\n+\t\t\t\t\t\t IMX7_CSI_PAD_SRC);\n \tif (IS_ERR(csi->vdev))\n \t\treturn PTR_ERR(csi->vdev);\n \n", "prefixes": [ "libcamera-devel", "12/50" ] }