Hello Tomi, Thanks for your work. On 2025-04-24 10:05:36 +0300, Tomi Valkeinen wrote: > Fix the following to get RAW10 formats working: > > In rvin_formats, the bpp is set to 4 for RAW10. As VIN unpacks RAW10 to > 16-bit containers, the bpp should be 2. > > Don't set VNDMR_YC_THR to the VNDMR register. The YC_THR is "YC Data > Through Mode", used for YUV formats and should not be set for RAW10. > > Fixes: 1b7e7240eaf3 ("media: rcar-vin: Add support for RAW10") > Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@xxxxxxxxxxxxxxxx> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx> > --- > drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 2 +- > drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c | 8 ++++---- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c > index a38c7b835231..9de1d3d91fa6 100644 > --- a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c > +++ b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c > @@ -890,7 +890,7 @@ static int rvin_setup(struct rvin_dev *vin) > case V4L2_PIX_FMT_SGBRG10: > case V4L2_PIX_FMT_SGRBG10: > case V4L2_PIX_FMT_SRGGB10: > - dmr = VNDMR_RMODE_RAW10 | VNDMR_YC_THR; > + dmr = VNDMR_RMODE_RAW10; > break; > default: > vin_err(vin, "Invalid pixelformat (0x%x)\n", > diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c b/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c > index 756fdfdbce61..65da8d513b52 100644 > --- a/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c > +++ b/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c > @@ -88,19 +88,19 @@ static const struct rvin_video_format rvin_formats[] = { > }, > { > .fourcc = V4L2_PIX_FMT_SBGGR10, > - .bpp = 4, > + .bpp = 2, > }, > { > .fourcc = V4L2_PIX_FMT_SGBRG10, > - .bpp = 4, > + .bpp = 2, > }, > { > .fourcc = V4L2_PIX_FMT_SGRBG10, > - .bpp = 4, > + .bpp = 2, > }, > { > .fourcc = V4L2_PIX_FMT_SRGGB10, > - .bpp = 4, > + .bpp = 2, > }, > }; > > > -- > 2.43.0 > -- Kind Regards, Niklas Söderlund