Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114859
b: refs/heads/master
c: f928ac0
h: refs/heads/master
i:
  114857: 12e1548
  114855: 0b21af6
v: v3
  • Loading branch information
Stanislaw Gruszka authored and Linus Torvalds committed Oct 16, 2008
1 parent cb4ec06 commit c542cce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 486ff387c0f27030a3cfb142469ba140f2d8976e
refs/heads/master: f928ac0a9810d46c8ba3bde7c969984340da9f5d
7 changes: 7 additions & 0 deletions trunk/drivers/video/atmel_lcdfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,13 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var,
var->transp.offset = var->transp.length = 0;
var->xoffset = var->yoffset = 0;

if (info->fix.smem_len) {
unsigned int smem_len = (var->xres_virtual * var->yres_virtual
* ((var->bits_per_pixel + 7) / 8));
if (smem_len > info->fix.smem_len)
return -EINVAL;
}

/* Saturate vertical and horizontal timings at maximum values */
var->vsync_len = min_t(u32, var->vsync_len,
(ATMEL_LCDC_VPW >> ATMEL_LCDC_VPW_OFFSET) + 1);
Expand Down

0 comments on commit c542cce

Please sign in to comment.