aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/ipu-v3
diff options
context:
space:
mode:
authorSteve Longerbeam <slongerbeam@gmail.com>2014-06-25 21:05:38 -0400
committerPhilipp Zabel <p.zabel@pengutronix.de>2014-09-02 08:55:47 -0400
commit4cea940d34319fb5d5e2f4d554e23f766c228e90 (patch)
tree5d5a443941cedd219c01fc58c8af4504fd98a771 /drivers/gpu/ipu-v3
parentf835f386a119c3f78f5acb93e86a4f025211739a (diff)
gpu: ipu-v3: Add helper function checking if pixfmt is planar
Add simple helper function returning true if passed pixel format is one of supported planar ones. Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu/ipu-v3')
-rw-r--r--drivers/gpu/ipu-v3/ipu-common.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
index a1d42eed5d06..18563c240f10 100644
--- a/drivers/gpu/ipu-v3/ipu-common.c
+++ b/drivers/gpu/ipu-v3/ipu-common.c
@@ -101,6 +101,18 @@ 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
104bool ipu_pixelformat_is_planar(u32 pixelformat)
105{
106 switch (pixelformat) {
107 case V4L2_PIX_FMT_YUV420:
108 case V4L2_PIX_FMT_YVU420:
109 return true;
110 }
111
112 return false;
113}
114EXPORT_SYMBOL_GPL(ipu_pixelformat_is_planar);
115
104enum ipu_color_space ipu_mbus_code_to_colorspace(u32 mbus_code) 116enum ipu_color_space ipu_mbus_code_to_colorspace(u32 mbus_code)
105{ 117{
106 switch (mbus_code & 0xf000) { 118 switch (mbus_code & 0xf000) {