]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] media: mtk-mdp: support pixelformat V4L2_PIX_FMT_MT21C
authorMinghsiu Tsai <minghsiu.tsai@mediatek.com>
Thu, 8 Sep 2016 13:09:05 +0000 (10:09 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 21 Oct 2016 14:09:48 +0000 (12:09 -0200)
Add V4L2_PIX_FMT_MT21C in format list.

[mchehab@s-opensource.org: re-add mtk_mdp_size_align]

Signed-off-by: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c
drivers/media/platform/mtk-mdp/mtk_mdp_regs.c

index 065502757133c68f08f4e773afe83de5e1194a5f..a90972efec5cd0bd5a89c86d56285ec1ff4662ef 100644 (file)
@@ -54,6 +54,14 @@ static struct mtk_mdp_pix_align mtk_mdp_size_align = {
 
 static const struct mtk_mdp_fmt mtk_mdp_formats[] = {
        {
+               .pixelformat    = V4L2_PIX_FMT_MT21C,
+               .depth          = { 8, 4 },
+               .row_depth      = { 8, 8 },
+               .num_planes     = 2,
+               .num_comp       = 2,
+               .align          = &mtk_mdp_size_align,
+               .flags          = MTK_MDP_FMT_FLAG_OUTPUT,
+       }, {
                .pixelformat    = V4L2_PIX_FMT_NV12M,
                .depth          = { 8, 4 },
                .row_depth      = { 8, 8 },
index a5601e1a238c6525a39dfba6c6387e895cbb6b89..86d57f380c970228a5b3770744194050e97e8b13 100644 (file)
@@ -29,6 +29,8 @@ enum MDP_COLOR_ENUM {
        MDP_COLOR_NV12 = MDP_COLORFMT_PACK(0, 2, 1, 1, 1, 8, 1, 0, 12),
        MDP_COLOR_I420 = MDP_COLORFMT_PACK(0, 3, 0, 1, 1, 8, 1, 0, 8),
        MDP_COLOR_YV12 = MDP_COLORFMT_PACK(0, 3, 0, 1, 1, 8, 1, 1, 8),
+       /* Mediatek proprietary format */
+       MDP_COLOR_420_MT21 = MDP_COLORFMT_PACK(5, 2, 1, 1, 1, 256, 1, 0, 12),
 };
 
 static int32_t mtk_mdp_map_color_format(int v4l2_format)
@@ -37,6 +39,8 @@ static int32_t mtk_mdp_map_color_format(int v4l2_format)
        case V4L2_PIX_FMT_NV12M:
        case V4L2_PIX_FMT_NV12:
                return MDP_COLOR_NV12;
+       case V4L2_PIX_FMT_MT21C:
+               return MDP_COLOR_420_MT21;
        case V4L2_PIX_FMT_YUV420M:
        case V4L2_PIX_FMT_YUV420:
                return MDP_COLOR_I420;