mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
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: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
parent
879c5a458e
commit
cb88d8289f
@ -1320,9 +1320,15 @@ static int rvin_mc_validate_format(struct rvin_dev *vin, struct v4l2_subdev *sd,
|
||||
if (!vin->scaler)
|
||||
return -EPIPE;
|
||||
} else {
|
||||
if (fmt.format.width != vin->format.width ||
|
||||
fmt.format.height != vin->format.height)
|
||||
return -EPIPE;
|
||||
if (vin->format.pixelformat == V4L2_PIX_FMT_NV12) {
|
||||
if (ALIGN(fmt.format.width, 32) != vin->format.width ||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user