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

media: rcar-vin: Fix NV12 size alignment

When doing format validation for NV12 the width and height should be
aligned to 32 pixels.
Signed-off-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 879c5a45
...@@ -1320,9 +1320,15 @@ static int rvin_mc_validate_format(struct rvin_dev *vin, struct v4l2_subdev *sd, ...@@ -1320,9 +1320,15 @@ static int rvin_mc_validate_format(struct rvin_dev *vin, struct v4l2_subdev *sd,
if (!vin->scaler) if (!vin->scaler)
return -EPIPE; return -EPIPE;
} else { } else {
if (fmt.format.width != vin->format.width || if (vin->format.pixelformat == V4L2_PIX_FMT_NV12) {
fmt.format.height != vin->format.height) if (ALIGN(fmt.format.width, 32) != vin->format.width ||
return -EPIPE; ALIGN(fmt.format.height, 32) != vin->format.height)
return -EPIPE;
} else {
if (fmt.format.width != vin->format.width ||
fmt.format.height != vin->format.height)
return -EPIPE;
}
} }
if (fmt.format.code != vin->mbus_code) if (fmt.format.code != vin->mbus_code)
......
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