aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/soc_mediabus.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/soc_mediabus.h')
-rw-r--r--include/media/soc_mediabus.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/media/soc_mediabus.h b/include/media/soc_mediabus.h
index 73f1e7eb60f3..0dc6f4625b92 100644
--- a/include/media/soc_mediabus.h
+++ b/include/media/soc_mediabus.h
@@ -47,6 +47,24 @@ enum soc_mbus_order {
47}; 47};
48 48
49/** 49/**
50 * enum soc_mbus_layout - planes layout in memory
51 * @SOC_MBUS_LAYOUT_PACKED: color components packed
52 * @SOC_MBUS_LAYOUT_PLANAR_2Y_U_V: YUV components stored in 3 planes (4:2:2)
53 * @SOC_MBUS_LAYOUT_PLANAR_2Y_C: YUV components stored in a luma and a
54 * chroma plane (C plane is half the size
55 * of Y plane)
56 * @SOC_MBUS_LAYOUT_PLANAR_Y_C: YUV components stored in a luma and a
57 * chroma plane (C plane is the same size
58 * as Y plane)
59 */
60enum soc_mbus_layout {
61 SOC_MBUS_LAYOUT_PACKED = 0,
62 SOC_MBUS_LAYOUT_PLANAR_2Y_U_V,
63 SOC_MBUS_LAYOUT_PLANAR_2Y_C,
64 SOC_MBUS_LAYOUT_PLANAR_Y_C,
65};
66
67/**
50 * struct soc_mbus_pixelfmt - Data format on the media bus 68 * struct soc_mbus_pixelfmt - Data format on the media bus
51 * @name: Name of the format 69 * @name: Name of the format
52 * @fourcc: Fourcc code, that will be obtained if the data is 70 * @fourcc: Fourcc code, that will be obtained if the data is
@@ -60,6 +78,7 @@ struct soc_mbus_pixelfmt {
60 u32 fourcc; 78 u32 fourcc;
61 enum soc_mbus_packing packing; 79 enum soc_mbus_packing packing;
62 enum soc_mbus_order order; 80 enum soc_mbus_order order;
81 enum soc_mbus_layout layout;
63 u8 bits_per_sample; 82 u8 bits_per_sample;
64}; 83};
65 84
@@ -80,6 +99,8 @@ const struct soc_mbus_pixelfmt *soc_mbus_find_fmtdesc(
80const struct soc_mbus_pixelfmt *soc_mbus_get_fmtdesc( 99const struct soc_mbus_pixelfmt *soc_mbus_get_fmtdesc(
81 enum v4l2_mbus_pixelcode code); 100 enum v4l2_mbus_pixelcode code);
82s32 soc_mbus_bytes_per_line(u32 width, const struct soc_mbus_pixelfmt *mf); 101s32 soc_mbus_bytes_per_line(u32 width, const struct soc_mbus_pixelfmt *mf);
102s32 soc_mbus_image_size(const struct soc_mbus_pixelfmt *mf,
103 u32 bytes_per_line, u32 height);
83int soc_mbus_samples_per_pixel(const struct soc_mbus_pixelfmt *mf, 104int soc_mbus_samples_per_pixel(const struct soc_mbus_pixelfmt *mf,
84 unsigned int *numerator, unsigned int *denominator); 105 unsigned int *numerator, unsigned int *denominator);
85unsigned int soc_mbus_config_compatible(const struct v4l2_mbus_config *cfg, 106unsigned int soc_mbus_config_compatible(const struct v4l2_mbus_config *cfg,