diff options
author | Jingoo Han <jg1.han@samsung.com> | 2011-06-09 00:26:38 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-06-09 01:59:52 -0400 |
commit | 13e6af8886f3225fb9141dc3b6915d84bd4ad4de (patch) | |
tree | fb0b1bbd96741f068221f111fe121f365794e03b /drivers/video/s3c-fb.c | |
parent | 72ba4cb608e7937792f3d61349ef616bbffda832 (diff) |
video: s3c-fb: fix virtual resolution checking
This patch fixes mishandling in virtual resolution checking.
Previously, virtual resolution is changed to virtual_x and virtual_y
which mean the size for buffer allocation, when s3c_fb_check_var is
called by fb_check_var. However, it is meaningless, since virtual_x
and virtual_y are fixed and user cannot change virtual resolution.
Therefore, virtual resolution should be more than resolution
such as xres and yres.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video/s3c-fb.c')
-rw-r--r-- | drivers/video/s3c-fb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index 148e19dbdbc5..dfc2b64dde25 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c | |||
@@ -235,13 +235,12 @@ static int s3c_fb_check_var(struct fb_var_screeninfo *var, | |||
235 | struct fb_info *info) | 235 | struct fb_info *info) |
236 | { | 236 | { |
237 | struct s3c_fb_win *win = info->par; | 237 | struct s3c_fb_win *win = info->par; |
238 | struct s3c_fb_pd_win *windata = win->windata; | ||
239 | struct s3c_fb *sfb = win->parent; | 238 | struct s3c_fb *sfb = win->parent; |
240 | 239 | ||
241 | dev_dbg(sfb->dev, "checking parameters\n"); | 240 | dev_dbg(sfb->dev, "checking parameters\n"); |
242 | 241 | ||
243 | var->xres_virtual = max((unsigned int)windata->virtual_x, var->xres); | 242 | var->xres_virtual = max(var->xres_virtual, var->xres); |
244 | var->yres_virtual = max((unsigned int)windata->virtual_y, var->yres); | 243 | var->yres_virtual = max(var->yres_virtual, var->yres); |
245 | 244 | ||
246 | if (!s3c_fb_validate_win_bpp(win, var->bits_per_pixel)) { | 245 | if (!s3c_fb_validate_win_bpp(win, var->bits_per_pixel)) { |
247 | dev_dbg(sfb->dev, "win %d: unsupported bpp %d\n", | 246 | dev_dbg(sfb->dev, "win %d: unsupported bpp %d\n", |