]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
staging: media: tegra-video: tegra20: adjust luma buffer stride
authorSvyatoslav Ryhel <clamor95@gmail.com>
Tue, 3 Mar 2026 08:42:37 +0000 (10:42 +0200)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Thu, 19 Mar 2026 07:18:36 +0000 (08:18 +0100)
Luma buffer stride is calculated by multiplying height in pixels of image
by bytes per line. Adjust that value accordingly.

Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # tegra20, parallel camera
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/staging/media/tegra-video/tegra20.c

index 36a57078d539a286fc5138aa68f06de15b144bc5..1b8f2a2213f2414a32c032e6ccd67794278b8365 100644 (file)
@@ -504,7 +504,7 @@ static void tegra20_camera_capture_setup(struct tegra_vi_channel *chan)
        u32 data_type = chan->fmtinfo->img_dt;
        int width  = chan->format.width;
        int height = chan->format.height;
-       int stride_l = chan->format.bytesperline;
+       int stride_l = chan->format.bytesperline * height;
        int stride_c = (output_fourcc == V4L2_PIX_FMT_YUV420 ||
                        output_fourcc == V4L2_PIX_FMT_YVU420) ? 1 : 0;
        enum tegra_vi_out output_channel = (data_type == TEGRA_IMAGE_DT_RAW8 ||