diff options
author | Anatolij Gustschin <agust@denx.de> | 2011-05-13 05:05:08 -0400 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2011-05-24 10:28:51 -0400 |
commit | dcdf2f7e7e154957f913e5468e3715e1a0401138 (patch) | |
tree | 8aab5f567d215e70b25161b10de4fe78e5893a56 /drivers | |
parent | af1ce6b2fad7d572aef040d61a935da28a861853 (diff) |
video: mb862xxfb: correct fix.smem_len field initialization
Initialize smem_len field to the actual frame buffer size and
not to the whole video RAM size. This prevents overwriting
other video memory (which could be used by other layers, cursors
or accelerated drivers) by frame buffer applications relying on
fix.smem_len.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/mb862xx/mb862xxfb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/mb862xx/mb862xxfb.c b/drivers/video/mb862xx/mb862xxfb.c index c76e663a6cd4..825795894daa 100644 --- a/drivers/video/mb862xx/mb862xxfb.c +++ b/drivers/video/mb862xx/mb862xxfb.c | |||
@@ -336,7 +336,6 @@ static int mb862xxfb_init_fbinfo(struct fb_info *fbi) | |||
336 | 336 | ||
337 | strcpy(fbi->fix.id, DRV_NAME); | 337 | strcpy(fbi->fix.id, DRV_NAME); |
338 | fbi->fix.smem_start = (unsigned long)par->fb_base_phys; | 338 | fbi->fix.smem_start = (unsigned long)par->fb_base_phys; |
339 | fbi->fix.smem_len = par->mapped_vram; | ||
340 | fbi->fix.mmio_start = (unsigned long)par->mmio_base_phys; | 339 | fbi->fix.mmio_start = (unsigned long)par->mmio_base_phys; |
341 | fbi->fix.mmio_len = par->mmio_len; | 340 | fbi->fix.mmio_len = par->mmio_len; |
342 | fbi->fix.accel = FB_ACCEL_NONE; | 341 | fbi->fix.accel = FB_ACCEL_NONE; |
@@ -420,6 +419,7 @@ static int mb862xxfb_init_fbinfo(struct fb_info *fbi) | |||
420 | FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR; | 419 | FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR; |
421 | fbi->fix.line_length = (fbi->var.xres_virtual * | 420 | fbi->fix.line_length = (fbi->var.xres_virtual * |
422 | fbi->var.bits_per_pixel) / 8; | 421 | fbi->var.bits_per_pixel) / 8; |
422 | fbi->fix.smem_len = fbi->fix.line_length * fbi->var.yres_virtual; | ||
423 | return 0; | 423 | return 0; |
424 | } | 424 | } |
425 | 425 | ||