diff options
author | Phil Edworthy <phil.edworthy@renesas.com> | 2013-03-18 07:47:59 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-04 18:40:08 -0400 |
commit | 7b88fc086a217be7d16ec68a7f66093d344e39d7 (patch) | |
tree | 3554f9079054ba08316881b89db97e310e772751 /include | |
parent | 64e171e3f66d75d792029ad53d203e4c113e9f0d (diff) |
[media] soc_camera: Add RGB666 & RGB888 formats
Based on work done by Katsuya Matsubara.
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/media/soc_camera.h | 7 | ||||
-rw-r--r-- | include/media/soc_mediabus.h | 3 | ||||
-rw-r--r-- | include/uapi/linux/v4l2-mediabus.h | 6 |
3 files changed, 14 insertions, 2 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index 2cc70cf318bf..ff77d08c30fd 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h | |||
@@ -292,12 +292,17 @@ struct soc_camera_sense { | |||
292 | #define SOCAM_DATAWIDTH_8 SOCAM_DATAWIDTH(8) | 292 | #define SOCAM_DATAWIDTH_8 SOCAM_DATAWIDTH(8) |
293 | #define SOCAM_DATAWIDTH_9 SOCAM_DATAWIDTH(9) | 293 | #define SOCAM_DATAWIDTH_9 SOCAM_DATAWIDTH(9) |
294 | #define SOCAM_DATAWIDTH_10 SOCAM_DATAWIDTH(10) | 294 | #define SOCAM_DATAWIDTH_10 SOCAM_DATAWIDTH(10) |
295 | #define SOCAM_DATAWIDTH_12 SOCAM_DATAWIDTH(12) | ||
295 | #define SOCAM_DATAWIDTH_15 SOCAM_DATAWIDTH(15) | 296 | #define SOCAM_DATAWIDTH_15 SOCAM_DATAWIDTH(15) |
296 | #define SOCAM_DATAWIDTH_16 SOCAM_DATAWIDTH(16) | 297 | #define SOCAM_DATAWIDTH_16 SOCAM_DATAWIDTH(16) |
298 | #define SOCAM_DATAWIDTH_18 SOCAM_DATAWIDTH(18) | ||
299 | #define SOCAM_DATAWIDTH_24 SOCAM_DATAWIDTH(24) | ||
297 | 300 | ||
298 | #define SOCAM_DATAWIDTH_MASK (SOCAM_DATAWIDTH_4 | SOCAM_DATAWIDTH_8 | \ | 301 | #define SOCAM_DATAWIDTH_MASK (SOCAM_DATAWIDTH_4 | SOCAM_DATAWIDTH_8 | \ |
299 | SOCAM_DATAWIDTH_9 | SOCAM_DATAWIDTH_10 | \ | 302 | SOCAM_DATAWIDTH_9 | SOCAM_DATAWIDTH_10 | \ |
300 | SOCAM_DATAWIDTH_15 | SOCAM_DATAWIDTH_16) | 303 | SOCAM_DATAWIDTH_12 | SOCAM_DATAWIDTH_15 | \ |
304 | SOCAM_DATAWIDTH_16 | SOCAM_DATAWIDTH_18 | \ | ||
305 | SOCAM_DATAWIDTH_24) | ||
301 | 306 | ||
302 | static inline void soc_camera_limit_side(int *start, int *length, | 307 | static inline void soc_camera_limit_side(int *start, int *length, |
303 | unsigned int start_min, | 308 | unsigned int start_min, |
diff --git a/include/media/soc_mediabus.h b/include/media/soc_mediabus.h index 0dc6f4625b92..d33f6d059692 100644 --- a/include/media/soc_mediabus.h +++ b/include/media/soc_mediabus.h | |||
@@ -26,6 +26,8 @@ | |||
26 | * @SOC_MBUS_PACKING_VARIABLE: compressed formats with variable packing | 26 | * @SOC_MBUS_PACKING_VARIABLE: compressed formats with variable packing |
27 | * @SOC_MBUS_PACKING_1_5X8: used for packed YUV 4:2:0 formats, where 4 | 27 | * @SOC_MBUS_PACKING_1_5X8: used for packed YUV 4:2:0 formats, where 4 |
28 | * pixels occupy 6 bytes in RAM | 28 | * pixels occupy 6 bytes in RAM |
29 | * @SOC_MBUS_PACKING_EXTEND32: sample width (e.g., 24 bits) has to be extended | ||
30 | * to 32 bits | ||
29 | */ | 31 | */ |
30 | enum soc_mbus_packing { | 32 | enum soc_mbus_packing { |
31 | SOC_MBUS_PACKING_NONE, | 33 | SOC_MBUS_PACKING_NONE, |
@@ -34,6 +36,7 @@ enum soc_mbus_packing { | |||
34 | SOC_MBUS_PACKING_EXTEND16, | 36 | SOC_MBUS_PACKING_EXTEND16, |
35 | SOC_MBUS_PACKING_VARIABLE, | 37 | SOC_MBUS_PACKING_VARIABLE, |
36 | SOC_MBUS_PACKING_1_5X8, | 38 | SOC_MBUS_PACKING_1_5X8, |
39 | SOC_MBUS_PACKING_EXTEND32, | ||
37 | }; | 40 | }; |
38 | 41 | ||
39 | /** | 42 | /** |
diff --git a/include/uapi/linux/v4l2-mediabus.h b/include/uapi/linux/v4l2-mediabus.h index b9b7bea04537..6ee63d09b32d 100644 --- a/include/uapi/linux/v4l2-mediabus.h +++ b/include/uapi/linux/v4l2-mediabus.h | |||
@@ -37,7 +37,7 @@ | |||
37 | enum v4l2_mbus_pixelcode { | 37 | enum v4l2_mbus_pixelcode { |
38 | V4L2_MBUS_FMT_FIXED = 0x0001, | 38 | V4L2_MBUS_FMT_FIXED = 0x0001, |
39 | 39 | ||
40 | /* RGB - next is 0x1009 */ | 40 | /* RGB - next is 0x100d */ |
41 | V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE = 0x1001, | 41 | V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE = 0x1001, |
42 | V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE = 0x1002, | 42 | V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE = 0x1002, |
43 | V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE = 0x1003, | 43 | V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE = 0x1003, |
@@ -46,6 +46,10 @@ enum v4l2_mbus_pixelcode { | |||
46 | V4L2_MBUS_FMT_BGR565_2X8_LE = 0x1006, | 46 | V4L2_MBUS_FMT_BGR565_2X8_LE = 0x1006, |
47 | V4L2_MBUS_FMT_RGB565_2X8_BE = 0x1007, | 47 | V4L2_MBUS_FMT_RGB565_2X8_BE = 0x1007, |
48 | V4L2_MBUS_FMT_RGB565_2X8_LE = 0x1008, | 48 | V4L2_MBUS_FMT_RGB565_2X8_LE = 0x1008, |
49 | V4L2_MBUS_FMT_RGB666_1X18 = 0x1009, | ||
50 | V4L2_MBUS_FMT_RGB888_1X24 = 0x100a, | ||
51 | V4L2_MBUS_FMT_RGB888_2X12_BE = 0x100b, | ||
52 | V4L2_MBUS_FMT_RGB888_2X12_LE = 0x100c, | ||
49 | 53 | ||
50 | /* YUV (including grey) - next is 0x2017 */ | 54 | /* YUV (including grey) - next is 0x2017 */ |
51 | V4L2_MBUS_FMT_Y8_1X8 = 0x2001, | 55 | V4L2_MBUS_FMT_Y8_1X8 = 0x2001, |