{"id":15871,"url":"https://patchwork.libcamera.org/api/patches/15871/?format=json","web_url":"https://patchwork.libcamera.org/patch/15871/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","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-32-laurent.pinchart@ideasonboard.com>","date":"2022-05-10T11:51:28","name":"[libcamera-devel,31/50] staging: media: imx: imx7-media-csi: Decouple from shared macros","commit_ref":null,"pull_url":null,"state":"not-applicable","archived":false,"hash":"f21747e6833cea16dbfb150f72bd821f6a8b7eb5","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/15871/mbox/","series":[{"id":3106,"url":"https://patchwork.libcamera.org/api/series/3106/?format=json","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/15871/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/15871/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 0E933C326D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 10 May 2022 11:52:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8816A65677;\n\tTue, 10 May 2022 13:52:32 +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 877086568E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 10 May 2022 13:52:23 +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 ACC80BA9;\n\tTue, 10 May 2022 13:52:22 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652183552;\n\tbh=H0UZuPYvqIKi1smJ8Qfmjedgtg9V7e3LUJmJMM+87hQ=;\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=dSvk62dM5eAyeWU78C7D2ZoXEdVUU51X6FEQZylG2mGDxYnaKzE+smWhVA7E5PJ2G\n\t84Vj/78PsHXLqM85yJGSasaQpUIdkqlqmgCHUNgyjCfqWnsgPyExfXEFE76puBCkBv\n\tvaBvrqiq0Ob+miiVPHksPVBI5JsqGlgxeeQRtO2shK6wUcFNnydh5FCkgl0/zA5jOK\n\t2aRwFxudoEvH+fUcAVyMbPKXqmkKygIW68RAWCvJzYT3J1fsoteWzje4F/ly8VlouI\n\t4Iklp12WiGrpRR+m5EZyM1OqTp1JLkRoZVS6TaWA75Y7DlQ7j3WpUJ5GuW0MB0METl\n\t0BC5mY0tJM1wA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1652183543;\n\tbh=H0UZuPYvqIKi1smJ8Qfmjedgtg9V7e3LUJmJMM+87hQ=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=uiiYCBR72hJmf2LK4FVCKSE0c9M9c4JcH8Qj8LEzhT5Y/s7KGaTib3WDht/mGrIK5\n\txGUARJFICnaHP6OpemrRw4bEPdMoN8W2fM3DuJwT8wgpNOujhjmyGAGocBrc06Skee\n\tLgwpPiWOZrUJhJb/lmZ0YPXnJBKlYjL9qbiLbBMo="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"uiiYCBR7\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 10 May 2022 14:51:28 +0300","Message-Id":"<20220510115147.19360-32-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 31/50] staging: media: imx:\n\timx7-media-csi: Decouple from shared macros","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":"Decouple from the IMX7_CSI_VIDEO_DEF_PIX_WIDTH,\nIMX7_CSI_VIDEO_DEF_PIX_HEIGHT and IMX_MEDIA_EOF_TIMEOUT macros defined\nin shared helpers by duplicating them in the imx7-media-csi driver, with\na rename to avoid name clashes. No functional change intended.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n drivers/staging/media/imx/imx7-media-csi.c | 9 ++++++---\n 1 file changed, 6 insertions(+), 3 deletions(-)","diff":"diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c\nindex 05907d6257a8..2106a72ebe85 100644\n--- a/drivers/staging/media/imx/imx7-media-csi.c\n+++ b/drivers/staging/media/imx/imx7-media-csi.c\n@@ -165,6 +165,9 @@\n #define IMX7_CSI_VIDEO_NAME\t\t\"imx-capture\"\n /* In bytes, per queue */\n #define IMX7_CSI_VIDEO_MEM_LIMIT\tSZ_64M\n+#define IMX7_CSI_VIDEO_DEF_PIX_WIDTH\t640\n+#define IMX7_CSI_VIDEO_DEF_PIX_HEIGHT\t480\n+#define IMX7_CSI_VIDEO_EOF_TIMEOUT\t2000\n \n enum imx_csi_model {\n \tIMX7_CSI_IMX7 = 0,\n@@ -488,7 +491,7 @@ static void imx7_csi_dma_stop(struct imx7_csi *csi)\n \t/*\n \t * and then wait for interrupt handler to mark completion.\n \t */\n-\ttimeout_jiffies = msecs_to_jiffies(IMX_MEDIA_EOF_TIMEOUT);\n+\ttimeout_jiffies = msecs_to_jiffies(IMX7_CSI_VIDEO_EOF_TIMEOUT);\n \tret = wait_for_completion_timeout(&csi->last_eof_completion,\n \t\t\t\t\t  timeout_jiffies);\n \tif (ret == 0)\n@@ -1275,8 +1278,8 @@ static int imx7_csi_video_init_format(struct imx7_csi *csi)\n \t\t.which = V4L2_SUBDEV_FORMAT_ACTIVE,\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+\tfmt_src.format.width = IMX7_CSI_VIDEO_DEF_PIX_WIDTH;\n+\tfmt_src.format.height = IMX7_CSI_VIDEO_DEF_PIX_HEIGHT;\n \n \timx_media_mbus_fmt_to_pix_fmt(&csi->vdev_fmt, &fmt_src.format, NULL);\n \tcsi->vdev_compose.width = fmt_src.format.width;\n","prefixes":["libcamera-devel","31/50"]}