diff options
Diffstat (limited to 'drivers/media/platform/vimc/vimc-common.c')
-rw-r--r-- | drivers/media/platform/vimc/vimc-common.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/media/platform/vimc/vimc-common.c b/drivers/media/platform/vimc/vimc-common.c index da7f2b7a2e58..9d63c84a9876 100644 --- a/drivers/media/platform/vimc/vimc-common.c +++ b/drivers/media/platform/vimc/vimc-common.c @@ -20,6 +20,10 @@ #include "vimc-common.h" +/* + * NOTE: non-bayer formats need to come first (necessary for enum_mbus_code + * in the scaler) + */ static const struct vimc_pix_map vimc_pix_map_list[] = { /* TODO: add all missing formats */ @@ -28,16 +32,19 @@ static const struct vimc_pix_map vimc_pix_map_list[] = { .code = MEDIA_BUS_FMT_BGR888_1X24, .pixelformat = V4L2_PIX_FMT_BGR24, .bpp = 3, + .bayer = false, }, { .code = MEDIA_BUS_FMT_RGB888_1X24, .pixelformat = V4L2_PIX_FMT_RGB24, .bpp = 3, + .bayer = false, }, { .code = MEDIA_BUS_FMT_ARGB8888_1X32, .pixelformat = V4L2_PIX_FMT_ARGB32, .bpp = 4, + .bayer = false, }, /* Bayer formats */ @@ -45,41 +52,49 @@ static const struct vimc_pix_map vimc_pix_map_list[] = { .code = MEDIA_BUS_FMT_SBGGR8_1X8, .pixelformat = V4L2_PIX_FMT_SBGGR8, .bpp = 1, + .bayer = true, }, { .code = MEDIA_BUS_FMT_SGBRG8_1X8, .pixelformat = V4L2_PIX_FMT_SGBRG8, .bpp = 1, + .bayer = true, }, { .code = MEDIA_BUS_FMT_SGRBG8_1X8, .pixelformat = V4L2_PIX_FMT_SGRBG8, .bpp = 1, + .bayer = true, }, { .code = MEDIA_BUS_FMT_SRGGB8_1X8, .pixelformat = V4L2_PIX_FMT_SRGGB8, .bpp = 1, + .bayer = true, }, { .code = MEDIA_BUS_FMT_SBGGR10_1X10, .pixelformat = V4L2_PIX_FMT_SBGGR10, .bpp = 2, + .bayer = true, }, { .code = MEDIA_BUS_FMT_SGBRG10_1X10, .pixelformat = V4L2_PIX_FMT_SGBRG10, .bpp = 2, + .bayer = true, }, { .code = MEDIA_BUS_FMT_SGRBG10_1X10, .pixelformat = V4L2_PIX_FMT_SGRBG10, .bpp = 2, + .bayer = true, }, { .code = MEDIA_BUS_FMT_SRGGB10_1X10, .pixelformat = V4L2_PIX_FMT_SRGGB10, .bpp = 2, + .bayer = true, }, /* 10bit raw bayer a-law compressed to 8 bits */ @@ -87,21 +102,25 @@ static const struct vimc_pix_map vimc_pix_map_list[] = { .code = MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8, .pixelformat = V4L2_PIX_FMT_SBGGR10ALAW8, .bpp = 1, + .bayer = true, }, { .code = MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8, .pixelformat = V4L2_PIX_FMT_SGBRG10ALAW8, .bpp = 1, + .bayer = true, }, { .code = MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8, .pixelformat = V4L2_PIX_FMT_SGRBG10ALAW8, .bpp = 1, + .bayer = true, }, { .code = MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8, .pixelformat = V4L2_PIX_FMT_SRGGB10ALAW8, .bpp = 1, + .bayer = true, }, /* 10bit raw bayer DPCM compressed to 8 bits */ @@ -109,41 +128,49 @@ static const struct vimc_pix_map vimc_pix_map_list[] = { .code = MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8, .pixelformat = V4L2_PIX_FMT_SBGGR10DPCM8, .bpp = 1, + .bayer = true, }, { .code = MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8, .pixelformat = V4L2_PIX_FMT_SGBRG10DPCM8, .bpp = 1, + .bayer = true, }, { .code = MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8, .pixelformat = V4L2_PIX_FMT_SGRBG10DPCM8, .bpp = 1, + .bayer = true, }, { .code = MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8, .pixelformat = V4L2_PIX_FMT_SRGGB10DPCM8, .bpp = 1, + .bayer = true, }, { .code = MEDIA_BUS_FMT_SBGGR12_1X12, .pixelformat = V4L2_PIX_FMT_SBGGR12, .bpp = 2, + .bayer = true, }, { .code = MEDIA_BUS_FMT_SGBRG12_1X12, .pixelformat = V4L2_PIX_FMT_SGBRG12, .bpp = 2, + .bayer = true, }, { .code = MEDIA_BUS_FMT_SGRBG12_1X12, .pixelformat = V4L2_PIX_FMT_SGRBG12, .bpp = 2, + .bayer = true, }, { .code = MEDIA_BUS_FMT_SRGGB12_1X12, .pixelformat = V4L2_PIX_FMT_SRGGB12, .bpp = 2, + .bayer = true, }, }; |