Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: omap3isp: use V4L2_COLORSPACE_SRGB instead of _JPEG

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>

+2 -2
+1 -1
drivers/media/platform/ti/omap3isp/isppreview.c
··· 1796 1796 fmt->width = crop->width; 1797 1797 fmt->height = crop->height; 1798 1798 1799 - fmt->colorspace = V4L2_COLORSPACE_JPEG; 1799 + fmt->colorspace = V4L2_COLORSPACE_SRGB; 1800 1800 break; 1801 1801 } 1802 1802
+1 -1
drivers/media/platform/ti/omap3isp/ispresizer.c
··· 1405 1405 break; 1406 1406 } 1407 1407 1408 - fmt->colorspace = V4L2_COLORSPACE_JPEG; 1408 + fmt->colorspace = V4L2_COLORSPACE_SRGB; 1409 1409 fmt->field = V4L2_FIELD_NONE; 1410 1410 } 1411 1411