| From e55fab9635160436279b7d2245cf57a250f918af Mon Sep 17 00:00:00 2001 |
| From: Koji Matsuoka <koji.matsuoka.xm@renesas.com> |
| Date: Thu, 12 Apr 2018 22:18:13 -0400 |
| Subject: [PATCH 1279/1795] media: rcar-vin: Fix image alignment for setting |
| pre clipping |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| In Video Pixel/Line Pre-Clip Register, the setting value can be |
| set in 1 line unit, but it can only be specified as a multiple of |
| 4 by v4l_bound_align_image function(). |
| So correct that it can be specified in 1 line unit with this patch. |
| |
| Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> |
| Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
| Acked-by: Niklas Sรถderlund <niklas.soderlund+renesas@ragnatech.se> |
| Signed-off-by: Hans Verkuil <hansverk@cisco.com> |
| Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> |
| (cherry picked from commit 536f0f55384cfcc25d1f8f3cfd4a44048dca3b46) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> |
| --- |
| drivers/media/platform/rcar-vin/rcar-v4l2.c | 4 ++-- |
| 1 file changed, 2 insertions(+), 2 deletions(-) |
| |
| diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c |
| index b479b882da12..a3c2daca1bf3 100644 |
| --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c |
| +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c |
| @@ -405,8 +405,8 @@ static int rvin_s_selection(struct file *file, void *fh, |
| max_rect.height = vin->source.height; |
| v4l2_rect_map_inside(&r, &max_rect); |
| |
| - v4l_bound_align_image(&r.width, 2, vin->source.width, 1, |
| - &r.height, 4, vin->source.height, 2, 0); |
| + v4l_bound_align_image(&r.width, 6, vin->source.width, 0, |
| + &r.height, 2, vin->source.height, 0, 0); |
| |
| r.top = clamp_t(s32, r.top, 0, vin->source.height - r.height); |
| r.left = clamp_t(s32, r.left, 0, vin->source.width - r.width); |
| -- |
| 2.19.0 |
| |