Commit 56ae4cac authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

media: staging: media: imx: imx7-media-csi: Decouple from shared macros

Decouple from the IMX7_CSI_VIDEO_DEF_PIX_WIDTH,
IMX7_CSI_VIDEO_DEF_PIX_HEIGHT and IMX_MEDIA_EOF_TIMEOUT macros defined
in shared helpers by duplicating them in the imx7-media-csi driver, with
a rename to avoid name clashes. No functional change intended.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarRui Miguel Silva <rmfrfs@gmail.com>
Tested-by: default avatarAlexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 57327b08
...@@ -165,6 +165,9 @@ ...@@ -165,6 +165,9 @@
#define IMX7_CSI_VIDEO_NAME "imx-capture" #define IMX7_CSI_VIDEO_NAME "imx-capture"
/* In bytes, per queue */ /* In bytes, per queue */
#define IMX7_CSI_VIDEO_MEM_LIMIT SZ_64M #define IMX7_CSI_VIDEO_MEM_LIMIT SZ_64M
#define IMX7_CSI_VIDEO_DEF_PIX_WIDTH 640
#define IMX7_CSI_VIDEO_DEF_PIX_HEIGHT 480
#define IMX7_CSI_VIDEO_EOF_TIMEOUT 2000
enum imx_csi_model { enum imx_csi_model {
IMX7_CSI_IMX7 = 0, IMX7_CSI_IMX7 = 0,
...@@ -488,7 +491,7 @@ static void imx7_csi_dma_stop(struct imx7_csi *csi) ...@@ -488,7 +491,7 @@ static void imx7_csi_dma_stop(struct imx7_csi *csi)
/* /*
* and then wait for interrupt handler to mark completion. * and then wait for interrupt handler to mark completion.
*/ */
timeout_jiffies = msecs_to_jiffies(IMX_MEDIA_EOF_TIMEOUT); timeout_jiffies = msecs_to_jiffies(IMX7_CSI_VIDEO_EOF_TIMEOUT);
ret = wait_for_completion_timeout(&csi->last_eof_completion, ret = wait_for_completion_timeout(&csi->last_eof_completion,
timeout_jiffies); timeout_jiffies);
if (ret == 0) if (ret == 0)
...@@ -1275,8 +1278,8 @@ static int imx7_csi_video_init_format(struct imx7_csi *csi) ...@@ -1275,8 +1278,8 @@ static int imx7_csi_video_init_format(struct imx7_csi *csi)
.which = V4L2_SUBDEV_FORMAT_ACTIVE, .which = V4L2_SUBDEV_FORMAT_ACTIVE,
}; };
fmt_src.format.code = MEDIA_BUS_FMT_UYVY8_2X8; fmt_src.format.code = MEDIA_BUS_FMT_UYVY8_2X8;
fmt_src.format.width = IMX_MEDIA_DEF_PIX_WIDTH; fmt_src.format.width = IMX7_CSI_VIDEO_DEF_PIX_WIDTH;
fmt_src.format.height = IMX_MEDIA_DEF_PIX_HEIGHT; fmt_src.format.height = IMX7_CSI_VIDEO_DEF_PIX_HEIGHT;
imx_media_mbus_fmt_to_pix_fmt(&csi->vdev_fmt, &fmt_src.format, NULL); imx_media_mbus_fmt_to_pix_fmt(&csi->vdev_fmt, &fmt_src.format, NULL);
csi->vdev_compose.width = fmt_src.format.width; csi->vdev_compose.width = fmt_src.format.width;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment