summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlain Volmat <alain.volmat@foss.st.com>2025-12-19 15:30:36 +0100
committerHans Verkuil <hverkuil+cisco@kernel.org>2026-01-16 14:08:52 +0100
commit3363aa2640f1738ad7fc56ea56f5e0301ad97196 (patch)
treefb3a7533f8c2737cfcef1c58efd8d4900019692e
parent222f1279edd9008ee35b62de156ddac84e31443c (diff)
downloadlinux-3363aa2640f1738ad7fc56ea56f5e0301ad97196.tar.gz
linux-3363aa2640f1738ad7fc56ea56f5e0301ad97196.zip
media: stm32: dcmipp: byteproc: disable compose for all bayers
Avoid possibility to perform compose on all frames which mbus code is within the bayer range or jpeg format. Fixes: 822c72eb1519 ("media: stm32: dcmipp: add bayer 10~14 bits formats") Cc: stable@vger.kernel.org Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
-rw-r--r--drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
index db76a02a1848..ec1d773d5ad1 100644
--- a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
+++ b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
@@ -130,11 +130,8 @@ static void dcmipp_byteproc_adjust_compose(struct v4l2_rect *r,
r->left = 0;
/* Compose is not possible for JPEG or Bayer formats */
- if (fmt->code == MEDIA_BUS_FMT_JPEG_1X8 ||
- fmt->code == MEDIA_BUS_FMT_SBGGR8_1X8 ||
- fmt->code == MEDIA_BUS_FMT_SGBRG8_1X8 ||
- fmt->code == MEDIA_BUS_FMT_SGRBG8_1X8 ||
- fmt->code == MEDIA_BUS_FMT_SRGGB8_1X8) {
+ if (fmt->code >= MEDIA_BUS_FMT_SBGGR8_1X8 &&
+ fmt->code <= MEDIA_BUS_FMT_JPEG_1X8) {
r->width = fmt->width;
r->height = fmt->height;
return;