Commit 5c9de1fa authored by Niklas Söderlund's avatar Niklas Söderlund Committed by Mauro Carvalho Chehab

media: rcar-vin: Use bytes per line instead of width for UV offset

The image size is doubled for NV16 and is calculated as bytesperline *
height * 2 to accommodate the split of UV data. When writing the offset
to hardware, the width is used instead of bytesperline, fix this.
Signed-off-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 2a4558c6
...@@ -703,8 +703,8 @@ static int rvin_setup(struct rvin_dev *vin) ...@@ -703,8 +703,8 @@ static int rvin_setup(struct rvin_dev *vin)
switch (vin->format.pixelformat) { switch (vin->format.pixelformat) {
case V4L2_PIX_FMT_NV16: case V4L2_PIX_FMT_NV16:
rvin_write(vin, rvin_write(vin,
ALIGN(vin->format.width * vin->format.height, 0x80), ALIGN(vin->format.bytesperline * vin->format.height,
VNUVAOF_REG); 0x80), VNUVAOF_REG);
dmr = VNDMR_DTMD_YCSEP; dmr = VNDMR_DTMD_YCSEP;
output_is_yuv = true; output_is_yuv = true;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment