Skip to content

Commit

Permalink
media: rzg2l-cru: Add support to capture 8bit raw sRGB
Browse files Browse the repository at this point in the history
Add support to capture 8bit Bayer formats.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20241018133446.223516-22-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
  • Loading branch information
Lad Prabhakar authored and Hans Verkuil committed Oct 22, 2024
1 parent c6ed80f commit 0477b08
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ struct rzg2l_csi2_format {

static const struct rzg2l_csi2_format rzg2l_csi2_formats[] = {
{ .code = MEDIA_BUS_FMT_UYVY8_1X16, .bpp = 16 },
{ .code = MEDIA_BUS_FMT_SBGGR8_1X8, .bpp = 8, },
{ .code = MEDIA_BUS_FMT_SGBRG8_1X8, .bpp = 8, },
{ .code = MEDIA_BUS_FMT_SGRBG8_1X8, .bpp = 8, },
{ .code = MEDIA_BUS_FMT_SRGGB8_1X8, .bpp = 8, },
};

static inline struct rzg2l_csi2 *sd_to_csi2(struct v4l2_subdev *sd)
Expand Down
28 changes: 28 additions & 0 deletions drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,34 @@ static const struct rzg2l_cru_ip_format rzg2l_cru_ip_formats[] = {
.bpp = 2,
.icndmr = ICnDMR_YCMODE_UYVY,
},
{
.code = MEDIA_BUS_FMT_SBGGR8_1X8,
.format = V4L2_PIX_FMT_SBGGR8,
.datatype = MIPI_CSI2_DT_RAW8,
.bpp = 1,
.icndmr = 0,
},
{
.code = MEDIA_BUS_FMT_SGBRG8_1X8,
.format = V4L2_PIX_FMT_SGBRG8,
.datatype = MIPI_CSI2_DT_RAW8,
.bpp = 1,
.icndmr = 0,
},
{
.code = MEDIA_BUS_FMT_SGRBG8_1X8,
.format = V4L2_PIX_FMT_SGRBG8,
.datatype = MIPI_CSI2_DT_RAW8,
.bpp = 1,
.icndmr = 0,
},
{
.code = MEDIA_BUS_FMT_SRGGB8_1X8,
.format = V4L2_PIX_FMT_SRGGB8,
.datatype = MIPI_CSI2_DT_RAW8,
.bpp = 1,
.icndmr = 0,
},
};

const struct rzg2l_cru_ip_format *rzg2l_cru_ip_code_to_fmt(unsigned int code)
Expand Down

0 comments on commit 0477b08

Please sign in to comment.