media: rcar-vin: Fix RAW10

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: 1b7e7240ea ("media: rcar-vin: Add support for RAW10")
Cc: stable@vger.kernel.org
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/20250424-rcar-fix-raw-v2-4-f6afca378124@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
This commit is contained in:
Tomi Valkeinen 2025-04-24 10:05:36 +03:00 committed by Hans Verkuil
parent 17b5496c30
commit 94bf847ae5
2 changed files with 5 additions and 5 deletions

View File

@ -870,7 +870,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",

View File

@ -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,
},
};