omap: reserve enough memory for 24bpp modes
authornotaz <notasas@gmail.com>
Mon, 27 Dec 2010 00:08:31 +0000 (02:08 +0200)
committernotaz <notasas@gmail.com>
Mon, 27 Dec 2010 00:08:31 +0000 (02:08 +0200)
frontend/linux/fbdev.c
frontend/plat_omap.c

index bcef0fc..224f42d 100644 (file)
@@ -126,8 +126,9 @@ void *vout_fbdev_resize(struct vout_fbdev *fbdev, int w, int h, int bpp,
 
        fbdev->mem = mmap(0, mem_size, PROT_WRITE|PROT_READ, MAP_SHARED, fbdev->fd, 0);
        if (fbdev->mem == MAP_FAILED && fbdev->buffer_count > 1) {
-               fprintf(stderr, "Warning: can't map %zd bytes, doublebuffering disabled\n", fbdev->mem_size);
+               fprintf(stderr, "Warning: can't map %zd bytes, doublebuffering disabled\n", mem_size);
                fbdev->buffer_count = 1;
+               fbdev->buffer_write = 0;
                mem_size = fbdev->fb_size;
                fbdev->mem = mmap(0, mem_size, PROT_WRITE|PROT_READ, MAP_SHARED, fbdev->fd, 0);
        }
index d31fa50..710a45b 100644 (file)
@@ -91,7 +91,7 @@ static int omap_setup_layer_(int fd, int enabled, int x, int y, int w, int h, in
        }
 
        if (first_call) {
-               mi.size = 640*512*2*3;
+               mi.size = 640*512*3*3;
                ret = ioctl(fd, OMAPFB_SETUP_MEM, &mi);
                if (ret != 0) {
                        perror("SETUP_MEM");