|
@@ -132,6 +132,20 @@ static const struct soc_mbus_pixelfmt mbus_fmt[] = {
|
|
|
},
|
|
|
};
|
|
|
|
|
|
+int soc_mbus_samples_per_pixel(const struct soc_mbus_pixelfmt *mf)
|
|
|
+{
|
|
|
+ switch (mf->packing) {
|
|
|
+ case SOC_MBUS_PACKING_NONE:
|
|
|
+ case SOC_MBUS_PACKING_EXTEND16:
|
|
|
+ return 1;
|
|
|
+ case SOC_MBUS_PACKING_2X8_PADHI:
|
|
|
+ case SOC_MBUS_PACKING_2X8_PADLO:
|
|
|
+ return 2;
|
|
|
+ }
|
|
|
+ return -EINVAL;
|
|
|
+}
|
|
|
+EXPORT_SYMBOL(soc_mbus_samples_per_pixel);
|
|
|
+
|
|
|
s32 soc_mbus_bytes_per_line(u32 width, const struct soc_mbus_pixelfmt *mf)
|
|
|
{
|
|
|
switch (mf->packing) {
|