summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/ipu-v3/ipu-common.c
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2018-08-02 10:40:33 +0200
committerPhilipp Zabel <p.zabel@pengutronix.de>2018-08-02 11:32:40 +0200
commit5c41bb6071257ba668a2b8933a8654e69aea1cee (patch)
tree78177f245bef4dc73ef5217b3dfc0c826bd3cafa /drivers/gpu/ipu-v3/ipu-common.c
parent64f2cafc3da77da7b176f2cdc3eb3fdb031c639f (diff)
downloadlinux-stable-5c41bb6071257ba668a2b8933a8654e69aea1cee.tar.gz
linux-stable-5c41bb6071257ba668a2b8933a8654e69aea1cee.tar.bz2
linux-stable-5c41bb6071257ba668a2b8933a8654e69aea1cee.zip
gpu: ipu-v3: add support for XRGB32 and XBGR32 V4L2 pixel formats
These should be used instead of the ill-defined deprecated RGB32 and BGR32 V4L2 pixel formats. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu/ipu-v3/ipu-common.c')
-rw-r--r--drivers/gpu/ipu-v3/ipu-common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
index 48685cddbad1..66e9405faedc 100644
--- a/drivers/gpu/ipu-v3/ipu-common.c
+++ b/drivers/gpu/ipu-v3/ipu-common.c
@@ -122,6 +122,8 @@ enum ipu_color_space ipu_pixelformat_to_colorspace(u32 pixelformat)
case V4L2_PIX_FMT_NV16:
case V4L2_PIX_FMT_NV61:
return IPUV3_COLORSPACE_YUV;
+ case V4L2_PIX_FMT_XRGB32:
+ case V4L2_PIX_FMT_XBGR32:
case V4L2_PIX_FMT_RGB32:
case V4L2_PIX_FMT_BGR32:
case V4L2_PIX_FMT_RGB24:
@@ -190,6 +192,8 @@ int ipu_stride_to_bytes(u32 pixel_stride, u32 pixelformat)
return (24 * pixel_stride) >> 3;
case V4L2_PIX_FMT_BGR32:
case V4L2_PIX_FMT_RGB32:
+ case V4L2_PIX_FMT_XBGR32:
+ case V4L2_PIX_FMT_XRGB32:
return (32 * pixel_stride) >> 3;
default:
break;