linux/drivers/media/platform/renesas/rcar-vin
Tomi Valkeinen 40c6da8a9c media: renesas: vin: Fix RAW8 (again)
Commit e7376745ad ("media: rcar-vin: Fix stride setting for RAW8
formats") removed dividing the stride by two for RAW8 formats. It is
unclear how this was tested, but in any of the recent tests this does
not seem to work and produces quite distorted images.

However, reverting the patch fixes the issues only partially. VNIS_REG
requires alignment to 16 bytes, and when dividing the stride by 2, in
some cases we end up with a non-aligned stride, producing a tilted
image. This issue has to be fixed in rvin_format_bytesperline() where we
do the alignment for bytesperline.

Adding back the stride division and increasing the alignment for RAW8
formats to 0x20 fixes the problems related to RAW8.

Fixes: e7376745ad ("media: rcar-vin: Fix stride setting for RAW8 formats")
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>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-03-24 11:58:02 +01:00
..
Kconfig media: rcar-csi2: Move driver to renesas directory 2024-02-16 11:46:32 +01:00
Makefile media: rcar-csi2: Move driver to renesas directory 2024-02-16 11:46:32 +01:00
rcar-core.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
rcar-dma.c media: renesas: vin: Fix RAW8 (again) 2026-03-24 11:58:02 +01:00
rcar-v4l2.c media: renesas: vin: Fix RAW8 (again) 2026-03-24 11:58:02 +01:00
rcar-vin.h media: rcar-vin: Enable media-graph on Gen2 2025-06-16 08:52:15 +02:00