media: rockchip: isp: add Y8/Y10/Y12 format for dmatx/dmarx

Change-Id: I1b3b24c4c5af78c211afd52e2766bc56da5007fa
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
Cai YiWei
2020-08-05 12:01:09 +08:00
committed by Tao Huang
parent f67add1eda
commit bd9dc64e59
3 changed files with 42 additions and 1 deletions

View File

@@ -474,6 +474,11 @@ static const struct capture_fmt dmatx_fmts[] = {
.fmt_type = FMT_BAYER,
.bpp = { 8 },
.mplanes = 1,
}, {
.fourcc = V4L2_PIX_FMT_GREY,
.fmt_type = FMT_BAYER,
.bpp = { 8 },
.mplanes = 1,
}, {
.fourcc = V4L2_PIX_FMT_SRGGB10,
.fmt_type = FMT_BAYER,
@@ -494,6 +499,11 @@ static const struct capture_fmt dmatx_fmts[] = {
.fmt_type = FMT_BAYER,
.bpp = { 10 },
.mplanes = 1,
}, {
.fourcc = V4L2_PIX_FMT_Y10,
.fmt_type = FMT_BAYER,
.bpp = { 10 },
.mplanes = 1,
}, {
.fourcc = V4L2_PIX_FMT_SRGGB12,
.fmt_type = FMT_BAYER,
@@ -514,7 +524,12 @@ static const struct capture_fmt dmatx_fmts[] = {
.fmt_type = FMT_BAYER,
.bpp = { 12 },
.mplanes = 1,
},
}, {
.fourcc = V4L2_PIX_FMT_Y12,
.fmt_type = FMT_BAYER,
.bpp = { 12 },
.mplanes = 1,
}
};
static struct stream_config rkisp_mp_stream_config = {

View File

@@ -121,6 +121,11 @@ static const struct capture_fmt rawrd_fmts[] = {
.fmt_type = FMT_BAYER,
.bpp = { 8 },
.mplanes = 1,
}, {
.fourcc = V4L2_PIX_FMT_GREY,
.fmt_type = FMT_BAYER,
.bpp = { 8 },
.mplanes = 1,
}, {
.fourcc = V4L2_PIX_FMT_SRGGB10,
.fmt_type = FMT_BAYER,
@@ -141,6 +146,11 @@ static const struct capture_fmt rawrd_fmts[] = {
.fmt_type = FMT_BAYER,
.bpp = { 10 },
.mplanes = 1,
}, {
.fourcc = V4L2_PIX_FMT_Y10,
.fmt_type = FMT_BAYER,
.bpp = { 10 },
.mplanes = 1,
}, {
.fourcc = V4L2_PIX_FMT_SRGGB12,
.fmt_type = FMT_BAYER,
@@ -161,6 +171,11 @@ static const struct capture_fmt rawrd_fmts[] = {
.fmt_type = FMT_BAYER,
.bpp = { 12 },
.mplanes = 1,
}, {
.fourcc = V4L2_PIX_FMT_Y12,
.fmt_type = FMT_BAYER,
.bpp = { 12 },
.mplanes = 1,
}
};
@@ -293,12 +308,14 @@ static int rawrd_config_mi(struct rkisp_stream *stream)
case V4L2_PIX_FMT_SBGGR8:
case V4L2_PIX_FMT_SGRBG8:
case V4L2_PIX_FMT_SGBRG8:
case V4L2_PIX_FMT_GREY:
val = CIF_CSI2_DT_RAW8;
break;
case V4L2_PIX_FMT_SRGGB10:
case V4L2_PIX_FMT_SBGGR10:
case V4L2_PIX_FMT_SGRBG10:
case V4L2_PIX_FMT_SGBRG10:
case V4L2_PIX_FMT_Y10:
val = CIF_CSI2_DT_RAW10;
break;
default:

View File

@@ -392,6 +392,9 @@ u32 rkisp_mbus_pixelcode_to_v4l2(u32 pixelcode)
u32 pixelformat;
switch (pixelcode) {
case MEDIA_BUS_FMT_Y8_1X8:
pixelformat = V4L2_PIX_FMT_GREY;
break;
case MEDIA_BUS_FMT_SBGGR8_1X8:
pixelformat = V4L2_PIX_FMT_SBGGR8;
break;
@@ -404,6 +407,9 @@ u32 rkisp_mbus_pixelcode_to_v4l2(u32 pixelcode)
case MEDIA_BUS_FMT_SRGGB8_1X8:
pixelformat = V4L2_PIX_FMT_SRGGB8;
break;
case MEDIA_BUS_FMT_Y10_1X10:
pixelformat = V4L2_PIX_FMT_Y10;
break;
case MEDIA_BUS_FMT_SBGGR10_1X10:
pixelformat = V4L2_PIX_FMT_SBGGR10;
break;
@@ -416,6 +422,9 @@ u32 rkisp_mbus_pixelcode_to_v4l2(u32 pixelcode)
case MEDIA_BUS_FMT_SRGGB10_1X10:
pixelformat = V4L2_PIX_FMT_SRGGB10;
break;
case MEDIA_BUS_FMT_Y12_1X12:
pixelformat = V4L2_PIX_FMT_Y12;
break;
case MEDIA_BUS_FMT_SBGGR12_1X12:
pixelformat = V4L2_PIX_FMT_SBGGR12;
break;