aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/s5p-tv
diff options
context:
space:
mode:
authorTomasz Stanislawski <t.stanislaws@samsung.com>2011-11-25 03:56:18 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-10 20:19:40 -0500
commit392d9e1d02edcbe9bc94bc292dd364339556f8ec (patch)
tree169fb3f23dad76b908cdc9c3b6ec892f75e740f9 /drivers/media/video/s5p-tv
parent0d066d3f6fdfd189bef5fe653477f5f9db2eb225 (diff)
[media] v4l: s5p-tv: mixer: fix setup of VP scaling
Adjusting of Video Processor's scaling factors was flawed. It bounded scaling to range 1/16 to 1/1. The correct range should be 1/4 to 4/1. This patch fixes this bug. Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/s5p-tv')
-rw-r--r--drivers/media/video/s5p-tv/mixer_vp_layer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/s5p-tv/mixer_vp_layer.c b/drivers/media/video/s5p-tv/mixer_vp_layer.c
index e41ec2ec45f8..3d13a636877b 100644
--- a/drivers/media/video/s5p-tv/mixer_vp_layer.c
+++ b/drivers/media/video/s5p-tv/mixer_vp_layer.c
@@ -172,10 +172,10 @@ static void mxr_vp_fix_geometry(struct mxr_layer *layer,
172 y_center = src->y_offset + src->height / 2; 172 y_center = src->y_offset + src->height / 2;
173 173
174 /* ensure scaling is between 0.25x .. 16x */ 174 /* ensure scaling is between 0.25x .. 16x */
175 src->width = clamp(src->width, round_up(dst->width, 4), 175 src->width = clamp(src->width, round_up(dst->width / 16, 4),
176 dst->width * 16); 176 dst->width * 4);
177 src->height = clamp(src->height, round_up(dst->height, 4), 177 src->height = clamp(src->height, round_up(dst->height / 16, 4),
178 dst->height * 16); 178 dst->height * 4);
179 179
180 /* hardware limits */ 180 /* hardware limits */
181 src->width = clamp(src->width, 32U, 2047U); 181 src->width = clamp(src->width, 32U, 2047U);