Commit c01ece4c authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

media: atomisp: Replace V4L2_PIX_FMT_RGB32 with V4L2_PIX_FMT_RGBX32

V4L2_PIX_FMT_RGB32 is deprecated because its definition never made
clear if the 4th byte was alpha data or unused. Instead either
V4L2_PIX_FMT_ARGB32 or V4L2_PIX_FMT_RGBX32 should be used.

V4L2_PIX_FMT_RGB32 internally is mapped to IA_CSS_FRAME_FORMAT_RGBA888
and ia_css_frame_format.h says that the alpha bits there are unused,
so replace V4L2_PIX_FMT_RGB32 with V4L2_PIX_FMT_RGBX32.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 8c40fa0b
......@@ -1123,7 +1123,7 @@ v4l2_fmt_to_sh_fmt(u32 fmt)
return IA_CSS_FRAME_FORMAT_YUYV;
case V4L2_PIX_FMT_RGB24:
return IA_CSS_FRAME_FORMAT_PLANAR_RGB888;
case V4L2_PIX_FMT_RGB32:
case V4L2_PIX_FMT_RGBX32:
return IA_CSS_FRAME_FORMAT_RGBA888;
case V4L2_PIX_FMT_RGB565:
return IA_CSS_FRAME_FORMAT_RGB565;
......@@ -1210,7 +1210,7 @@ u32 atomisp_get_pixel_depth(u32 pixelformat)
case V4L2_PIX_FMT_RGB24:
case V4L2_PIX_FMT_YUV444:
return 24;
case V4L2_PIX_FMT_RGB32:
case V4L2_PIX_FMT_RGBX32:
return 32;
case V4L2_PIX_FMT_JPEG:
case V4L2_PIX_FMT_CUSTOM_M10MO_RAW:
......
......@@ -301,7 +301,7 @@ const struct atomisp_format_bridge atomisp_output_fmts[] = {
.sh_fmt = IA_CSS_FRAME_FORMAT_RAW,
.description = "Bayer 12"
}, {
.pixelformat = V4L2_PIX_FMT_RGB32,
.pixelformat = V4L2_PIX_FMT_RGBX32,
.depth = 32,
.mbus_code = V4L2_MBUS_FMT_CUSTOM_RGB32,
.sh_fmt = IA_CSS_FRAME_FORMAT_RGBA888,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment