Skip to content

Commit

Permalink
media: rcar-vin: Use correct pixel format when aligning format
Browse files Browse the repository at this point in the history
When aligning the format the pixel format that is being processed shall
be used to figure out alignment constraints, not the currently active
pixel format. The alignment might be part of a try operation and shall
not be effected by the active format. Fix this by looking at the correct
pixel format.

Signed-off-by: Niklas Söderlund <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
Niklas Söderlund authored and mchehab committed Jan 23, 2020
1 parent 2a0a0bc commit 1fd4d9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/platform/rcar-vin/rcar-v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static void rvin_format_align(struct rvin_dev *vin, struct v4l2_pix_format *pix)
}

/* HW limit width to a multiple of 32 (2^5) for NV12/16 else 2 (2^1) */
switch (vin->format.pixelformat) {
switch (pix->pixelformat) {
case V4L2_PIX_FMT_NV12:
case V4L2_PIX_FMT_NV16:
walign = 5;
Expand Down

0 comments on commit 1fd4d9c

Please sign in to comment.