summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/ti-vpe/vpdma.c
diff options
context:
space:
mode:
authorBenoit Parrot <bparrot@ti.com>2016-11-18 21:20:42 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-11-22 08:10:49 -0200
commitee1c02949d99be22485c790fe1c26aaa88e77837 (patch)
tree662f84f5fe30dc3cc4b9f0eb403f08547edd5246 /drivers/media/platform/ti-vpe/vpdma.c
parent35be6d865c2b6c0866164fef14832ecc5def9d2b (diff)
downloadlinux-ee1c02949d99be22485c790fe1c26aaa88e77837.tar.bz2
[media] media: ti-vpe: vpdma: Add RAW8 and RAW16 data types
Add RAW8 and RAW16 data type to VPDMA. To handle RAW format we are re-using the YUV CBY422 vpdma data type so that we use the vpdma to re-order the incoming bytes, as the VIP parser assumes that the first byte presented on the bus is the MSB of a 2 bytes value. RAW8 handles from 1 to 8 bits. RAW16 handles from 9 to 16 bits. Signed-off-by: Benoit Parrot <bparrot@ti.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/ti-vpe/vpdma.c')
-rw-r--r--drivers/media/platform/ti-vpe/vpdma.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/media/platform/ti-vpe/vpdma.c b/drivers/media/platform/ti-vpe/vpdma.c
index 2d13644a28a8..c8f842fd7f75 100644
--- a/drivers/media/platform/ti-vpe/vpdma.c
+++ b/drivers/media/platform/ti-vpe/vpdma.c
@@ -191,6 +191,29 @@ const struct vpdma_data_format vpdma_rgb_fmts[] = {
};
EXPORT_SYMBOL(vpdma_rgb_fmts);
+/*
+ * To handle RAW format we are re-using the CBY422
+ * vpdma data type so that we use the vpdma to re-order
+ * the incoming bytes, as the parser assumes that the
+ * first byte presented on the bus is the MSB of a 2
+ * bytes value.
+ * RAW8 handles from 1 to 8 bits
+ * RAW16 handles from 9 to 16 bits
+ */
+const struct vpdma_data_format vpdma_raw_fmts[] = {
+ [VPDMA_DATA_FMT_RAW8] = {
+ .type = VPDMA_DATA_FMT_TYPE_YUV,
+ .data_type = DATA_TYPE_CBY422,
+ .depth = 8,
+ },
+ [VPDMA_DATA_FMT_RAW16] = {
+ .type = VPDMA_DATA_FMT_TYPE_YUV,
+ .data_type = DATA_TYPE_CBY422,
+ .depth = 16,
+ },
+};
+EXPORT_SYMBOL(vpdma_raw_fmts);
+
const struct vpdma_data_format vpdma_misc_fmts[] = {
[VPDMA_DATA_FMT_MV] = {
.type = VPDMA_DATA_FMT_TYPE_MISC,