]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
[media] media: ti-vpe: vpdma: Corrected YUV422 data type label
authorBenoit Parrot <bparrot@ti.com>
Fri, 18 Nov 2016 23:20:31 +0000 (21:20 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 22 Nov 2016 10:05:26 +0000 (08:05 -0200)
The YUV data type definition below are taken from
both the TRM and i839 Errata information.
Use the correct data type considering byte
reordering of components.

Added the 2 missing YUV422 variant.
Also since the single use of "C" in the 422 case
to mean "Cr" (i.e. V component). It was decided
to explicitly label them CR to remove any confusion.
Bear in mind that the type label refer to the memory
packed order (LSB - MSB).

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>
drivers/media/platform/ti-vpe/vpdma.c
drivers/media/platform/ti-vpe/vpdma.h
drivers/media/platform/ti-vpe/vpdma_priv.h
drivers/media/platform/ti-vpe/vpe.c

index f85727a0ac44b91e917396027c14787918f84806..8f0d608c70f6c063de5ed2ad30fb076b4ee8261d 100644 (file)
@@ -59,9 +59,9 @@ const struct vpdma_data_format vpdma_yuv_fmts[] = {
                .data_type      = DATA_TYPE_C420,
                .depth          = 4,
        },
-       [VPDMA_DATA_FMT_YC422] = {
+       [VPDMA_DATA_FMT_YCR422] = {
                .type           = VPDMA_DATA_FMT_TYPE_YUV,
-               .data_type      = DATA_TYPE_YC422,
+               .data_type      = DATA_TYPE_YCR422,
                .depth          = 16,
        },
        [VPDMA_DATA_FMT_YC444] = {
@@ -69,9 +69,19 @@ const struct vpdma_data_format vpdma_yuv_fmts[] = {
                .data_type      = DATA_TYPE_YC444,
                .depth          = 24,
        },
-       [VPDMA_DATA_FMT_CY422] = {
+       [VPDMA_DATA_FMT_CRY422] = {
                .type           = VPDMA_DATA_FMT_TYPE_YUV,
-               .data_type      = DATA_TYPE_CY422,
+               .data_type      = DATA_TYPE_CRY422,
+               .depth          = 16,
+       },
+       [VPDMA_DATA_FMT_CBY422] = {
+               .type           = VPDMA_DATA_FMT_TYPE_YUV,
+               .data_type      = DATA_TYPE_CBY422,
+               .depth          = 16,
+       },
+       [VPDMA_DATA_FMT_YCB422] = {
+               .type           = VPDMA_DATA_FMT_TYPE_YUV,
+               .data_type      = DATA_TYPE_YCB422,
                .depth          = 16,
        },
 };
index ccf871ad880089574556a1d37ad551fa4b5c1843..405a6febc254f24ab68dd43e2fd77f937173ea0e 100644 (file)
@@ -74,9 +74,11 @@ enum vpdma_yuv_formats {
        VPDMA_DATA_FMT_C444,
        VPDMA_DATA_FMT_C422,
        VPDMA_DATA_FMT_C420,
-       VPDMA_DATA_FMT_YC422,
+       VPDMA_DATA_FMT_YCR422,
        VPDMA_DATA_FMT_YC444,
-       VPDMA_DATA_FMT_CY422,
+       VPDMA_DATA_FMT_CRY422,
+       VPDMA_DATA_FMT_CBY422,
+       VPDMA_DATA_FMT_YCB422,
 };
 
 enum vpdma_rgb_formats {
index 54b6aa866c74c614c365bb8d7b5595502d67a28e..f974a803fa273a555c7cf7dc2d2e803530c8169a 100644 (file)
 #define VPDMA_LIST_TYPE_SHFT           16
 #define VPDMA_LIST_SIZE_MASK           0xffff
 
-/* VPDMA data type values for data formats */
+/*
+ * The YUV data type definition below are taken from
+ * both the TRM and i839 Errata information.
+ * Use the correct data type considering byte
+ * reordering of components.
+ *
+ * Also since the single use of "C" in the 422 case
+ * to mean "Cr" (i.e. V component). It was decided
+ * to explicitly label them CR to remove any confusion.
+ * Bear in mind that the type label refer to the memory
+ * packed order (LSB - MSB).
+ */
 #define DATA_TYPE_Y444                         0x0
 #define DATA_TYPE_Y422                         0x1
 #define DATA_TYPE_Y420                         0x2
 #define DATA_TYPE_C444                         0x4
 #define DATA_TYPE_C422                         0x5
 #define DATA_TYPE_C420                         0x6
-#define DATA_TYPE_YC422                                0x7
 #define DATA_TYPE_YC444                                0x8
-#define DATA_TYPE_CY422                                0x27
+#define DATA_TYPE_YCB422                       0x7
+#define DATA_TYPE_YCR422                       0x17
+#define DATA_TYPE_CBY422                       0x27
+#define DATA_TYPE_CRY422                       0x37
 
 #define DATA_TYPE_RGB16_565                    0x0
 #define DATA_TYPE_ARGB_1555                    0x1
index 05b793595ce9beac3f4e068cefbd78032aec3647..ef55fb45d0be31a7feee0585845fd7b3111a1c96 100644 (file)
@@ -237,7 +237,7 @@ struct vpe_fmt {
 
 static struct vpe_fmt vpe_formats[] = {
        {
-               .name           = "YUV 422 co-planar",
+               .name           = "NV16 YUV 422 co-planar",
                .fourcc         = V4L2_PIX_FMT_NV16,
                .types          = VPE_FMT_TYPE_CAPTURE | VPE_FMT_TYPE_OUTPUT,
                .coplanar       = 1,
@@ -246,7 +246,7 @@ static struct vpe_fmt vpe_formats[] = {
                                  },
        },
        {
-               .name           = "YUV 420 co-planar",
+               .name           = "NV12 YUV 420 co-planar",
                .fourcc         = V4L2_PIX_FMT_NV12,
                .types          = VPE_FMT_TYPE_CAPTURE | VPE_FMT_TYPE_OUTPUT,
                .coplanar       = 1,
@@ -259,7 +259,7 @@ static struct vpe_fmt vpe_formats[] = {
                .fourcc         = V4L2_PIX_FMT_YUYV,
                .types          = VPE_FMT_TYPE_CAPTURE | VPE_FMT_TYPE_OUTPUT,
                .coplanar       = 0,
-               .vpdma_fmt      = { &vpdma_yuv_fmts[VPDMA_DATA_FMT_YC422],
+               .vpdma_fmt      = { &vpdma_yuv_fmts[VPDMA_DATA_FMT_YCB422],
                                  },
        },
        {
@@ -267,7 +267,7 @@ static struct vpe_fmt vpe_formats[] = {
                .fourcc         = V4L2_PIX_FMT_UYVY,
                .types          = VPE_FMT_TYPE_CAPTURE | VPE_FMT_TYPE_OUTPUT,
                .coplanar       = 0,
-               .vpdma_fmt      = { &vpdma_yuv_fmts[VPDMA_DATA_FMT_CY422],
+               .vpdma_fmt      = { &vpdma_yuv_fmts[VPDMA_DATA_FMT_CBY422],
                                  },
        },
        {