]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: omap3isp: use V4L2_COLORSPACE_SRGB instead of _JPEG
authorHans Verkuil <hverkuil+cisco@kernel.org>
Wed, 30 Apr 2025 07:14:24 +0000 (09:14 +0200)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 6 Jan 2026 07:22:46 +0000 (08:22 +0100)
JPEG colorspace should generally not be used unless it is actually
dealing with JPG data. This fixes v4l2-compliance errors:

fail: v4l2-test-formats.cpp(416): pixelformat != V4L2_PIX_FMT_JPEG && pixelformat != V4L2_PIX_FMT_MJPEG && colorspace == V4L2_COLORSPACE_JPEG
fail: v4l2-test-formats.cpp(521): testColorspace(!node->is_io_mc, pix.pixelformat, pix.colorspace, pix.ycbcr_enc, pix.quantization)
test VIDIOC_TRY_FMT: FAIL

Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
drivers/media/platform/ti/omap3isp/isppreview.c
drivers/media/platform/ti/omap3isp/ispresizer.c

index 26f7167d1f4f10dd50675099cc8d1ff6f05f9734..9992db782870b0268b88992888d288fed8aadf61 100644 (file)
@@ -1796,7 +1796,7 @@ static void preview_try_format(struct isp_prev_device *prev,
                fmt->width = crop->width;
                fmt->height = crop->height;
 
-               fmt->colorspace = V4L2_COLORSPACE_JPEG;
+               fmt->colorspace = V4L2_COLORSPACE_SRGB;
                break;
        }
 
index 5dff48489394b063be00752307d4a534357be1d3..ad0127f5b5cbda7b1e25e2a45c6644b117054dae 100644 (file)
@@ -1405,7 +1405,7 @@ static void resizer_try_format(struct isp_res_device *res,
                break;
        }
 
-       fmt->colorspace = V4L2_COLORSPACE_JPEG;
+       fmt->colorspace = V4L2_COLORSPACE_SRGB;
        fmt->field = V4L2_FIELD_NONE;
 }