Message ID | 20191106232546.2332745-1-niklas.soderlund+renesas@ragnatech.se (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | rcar-vin: Use correct pixel format when aligning format | expand |
Hello! On 07.11.2019 2:25, Niklas Söderlund wrote: > When aligning the format the pixel format that are being processed shall a/are/is/? > 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 <niklas.soderlund+renesas@ragnatech.se> [...] MBR, Sergei
diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c index 62d308a4ddaee82e..339cb2de111de166 100644 --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c @@ -149,7 +149,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;
When aligning the format the pixel format that are 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 <niklas.soderlund+renesas@ragnatech.se> --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)