]> git.baikalelectronics.ru Git - kernel.git/commit
media: imx: utils: Default colorspace to SRGB
authorSteve Longerbeam <slongerbeam@gmail.com>
Tue, 21 Apr 2020 16:29:40 +0000 (18:29 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 5 May 2020 15:08:26 +0000 (17:08 +0200)
commitc358f9b476a80afe98a7560f592f0434ca4e0fd4
treed74d1829b6e2a2c50f02df485a65658175d754be
parent7b744ad2f017bddc7e0a947e76863670aa924d68
media: imx: utils: Default colorspace to SRGB

The function imx_media_init_mbus_fmt() initializes the imx subdevice
mbus colorimetry to some sane defaults when the subdevice is registered.
Currently it guesses at a colorspace based on the passed mbus pixel
format. If the format is RGB, it chooses colorspace V4L2_COLORSPACE_SRGB,
and if the format is YUV, it chooses V4L2_COLORSPACE_SMPTE170M.

While that might be a good guess, it's not necessarily true that a RGB
pixel format encoding uses a SRGB colorspace, or that a YUV encoding
uses a SMPTE170M colorspace. Instead of making this dubious guess,
just default the colorspace to SRGB.

Reported-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/imx/imx-media-utils.c