aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/ipu-v3/ipu-common.c13
-rw-r--r--include/video/imx-ipu-v3.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
index f5a4e1ac2b50..49ee990b4d1f 100644
--- a/drivers/gpu/ipu-v3/ipu-common.c
+++ b/drivers/gpu/ipu-v3/ipu-common.c
@@ -101,6 +101,19 @@ enum ipu_color_space ipu_pixelformat_to_colorspace(u32 pixelformat)
101} 101}
102EXPORT_SYMBOL_GPL(ipu_pixelformat_to_colorspace); 102EXPORT_SYMBOL_GPL(ipu_pixelformat_to_colorspace);
103 103
104enum ipu_color_space ipu_mbus_code_to_colorspace(u32 mbus_code)
105{
106 switch (mbus_code & 0xf000) {
107 case 0x1000:
108 return IPUV3_COLORSPACE_RGB;
109 case 0x2000:
110 return IPUV3_COLORSPACE_YUV;
111 default:
112 return IPUV3_COLORSPACE_UNKNOWN;
113 }
114}
115EXPORT_SYMBOL_GPL(ipu_mbus_code_to_colorspace);
116
104struct ipuv3_channel *ipu_idmac_get(struct ipu_soc *ipu, unsigned num) 117struct ipuv3_channel *ipu_idmac_get(struct ipu_soc *ipu, unsigned num)
105{ 118{
106 struct ipuv3_channel *channel; 119 struct ipuv3_channel *channel;
diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h
index 49e5954ac033..7c97ccaf39f6 100644
--- a/include/video/imx-ipu-v3.h
+++ b/include/video/imx-ipu-v3.h
@@ -300,6 +300,7 @@ int ipu_smfc_set_watermark(struct ipu_smfc *smfc, u32 set_level, u32 clr_level);
300 300
301enum ipu_color_space ipu_drm_fourcc_to_colorspace(u32 drm_fourcc); 301enum ipu_color_space ipu_drm_fourcc_to_colorspace(u32 drm_fourcc);
302enum ipu_color_space ipu_pixelformat_to_colorspace(u32 pixelformat); 302enum ipu_color_space ipu_pixelformat_to_colorspace(u32 pixelformat);
303enum ipu_color_space ipu_mbus_code_to_colorspace(u32 mbus_code);
303 304
304struct ipu_client_platformdata { 305struct ipu_client_platformdata {
305 int csi; 306 int csi;