diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-03-28 07:03:58 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-03-28 07:03:58 -0400 |
commit | cdccfc8dc0bf62a1da327324a8d639139acc9279 (patch) | |
tree | dca7934b27d510c9c006558979ebc48e07a531cf /drivers/media/video/soc_mediabus.c | |
parent | b21a8ee67013372f439fbd1591e91d09de49bb9c (diff) | |
parent | c6b358748e19ce7e230b0926ac42696bc485a562 (diff) |
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'drivers/media/video/soc_mediabus.c')
-rw-r--r-- | drivers/media/video/soc_mediabus.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/media/video/soc_mediabus.c b/drivers/media/video/soc_mediabus.c index 91391214c682..ed77aa055b63 100644 --- a/drivers/media/video/soc_mediabus.c +++ b/drivers/media/video/soc_mediabus.c | |||
@@ -88,7 +88,7 @@ static const struct soc_mbus_pixelfmt mbus_fmt[] = { | |||
88 | .packing = SOC_MBUS_PACKING_EXTEND16, | 88 | .packing = SOC_MBUS_PACKING_EXTEND16, |
89 | .order = SOC_MBUS_ORDER_LE, | 89 | .order = SOC_MBUS_ORDER_LE, |
90 | }, | 90 | }, |
91 | [MBUS_IDX(GREY8_1X8)] = { | 91 | [MBUS_IDX(Y8_1X8)] = { |
92 | .fourcc = V4L2_PIX_FMT_GREY, | 92 | .fourcc = V4L2_PIX_FMT_GREY, |
93 | .name = "Grey", | 93 | .name = "Grey", |
94 | .bits_per_sample = 8, | 94 | .bits_per_sample = 8, |
@@ -132,6 +132,20 @@ static const struct soc_mbus_pixelfmt mbus_fmt[] = { | |||
132 | }, | 132 | }, |
133 | }; | 133 | }; |
134 | 134 | ||
135 | int soc_mbus_samples_per_pixel(const struct soc_mbus_pixelfmt *mf) | ||
136 | { | ||
137 | switch (mf->packing) { | ||
138 | case SOC_MBUS_PACKING_NONE: | ||
139 | case SOC_MBUS_PACKING_EXTEND16: | ||
140 | return 1; | ||
141 | case SOC_MBUS_PACKING_2X8_PADHI: | ||
142 | case SOC_MBUS_PACKING_2X8_PADLO: | ||
143 | return 2; | ||
144 | } | ||
145 | return -EINVAL; | ||
146 | } | ||
147 | EXPORT_SYMBOL(soc_mbus_samples_per_pixel); | ||
148 | |||
135 | s32 soc_mbus_bytes_per_line(u32 width, const struct soc_mbus_pixelfmt *mf) | 149 | s32 soc_mbus_bytes_per_line(u32 width, const struct soc_mbus_pixelfmt *mf) |
136 | { | 150 | { |
137 | switch (mf->packing) { | 151 | switch (mf->packing) { |