summaryrefslogtreecommitdiff
path: root/drivers/media/platform/stm32
diff options
context:
space:
mode:
authorHugues Fruchet <hugues.fruchet@st.com>2018-06-11 12:41:19 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-06-28 14:43:29 +0300
commitbfe75f76d7bee4513bc7851ba1699f4bc472d6ca (patch)
tree136b025537bf7cf49be0b945a0f2ee05c8adf343 /drivers/media/platform/stm32
parentaa2f88712718d045855acc6686dbce6a7286d010 (diff)
downloadlinux-bfe75f76d7bee4513bc7851ba1699f4bc472d6ca.tar.xz
media: stm32-dcmi: increase max width/height to 2592
DCMI can capture 5Mp raw frames, increase limit accordingly. Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/stm32')
-rw-r--r--drivers/media/platform/stm32/stm32-dcmi.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c
index 2e1933d872ee..db2dab335fa8 100644
--- a/drivers/media/platform/stm32/stm32-dcmi.c
+++ b/drivers/media/platform/stm32/stm32-dcmi.c
@@ -89,14 +89,9 @@ enum state {
};
#define MIN_WIDTH 16U
-#define MAX_WIDTH 2048U
+#define MAX_WIDTH 2592U
#define MIN_HEIGHT 16U
-#define MAX_HEIGHT 2048U
-
-#define MIN_JPEG_WIDTH 16U
-#define MAX_JPEG_WIDTH 2592U
-#define MIN_JPEG_HEIGHT 16U
-#define MAX_JPEG_HEIGHT 2592U
+#define MAX_HEIGHT 2592U
#define TIMEOUT_MS 1000
@@ -843,14 +838,8 @@ static int dcmi_try_fmt(struct stm32_dcmi *dcmi, struct v4l2_format *f,
}
/* Limit to hardware capabilities */
- if (pix->pixelformat == V4L2_PIX_FMT_JPEG) {
- pix->width = clamp(pix->width, MIN_JPEG_WIDTH, MAX_JPEG_WIDTH);
- pix->height =
- clamp(pix->height, MIN_JPEG_HEIGHT, MAX_JPEG_HEIGHT);
- } else {
- pix->width = clamp(pix->width, MIN_WIDTH, MAX_WIDTH);
- pix->height = clamp(pix->height, MIN_HEIGHT, MAX_HEIGHT);
- }
+ pix->width = clamp(pix->width, MIN_WIDTH, MAX_WIDTH);
+ pix->height = clamp(pix->height, MIN_HEIGHT, MAX_HEIGHT);
/* No crop if JPEG is requested */
do_crop = dcmi->do_crop && (pix->pixelformat != V4L2_PIX_FMT_JPEG);