From 2cb4655298083c0c05f68941fa7e4f37b6b51ebd Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 27 Dec 2010 02:08:31 +0200 Subject: [PATCH] omap: reserve enough memory for 24bpp modes --- frontend/linux/fbdev.c | 3 ++- frontend/plat_omap.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/linux/fbdev.c b/frontend/linux/fbdev.c index bcef0fc9..224f42d8 100644 --- a/frontend/linux/fbdev.c +++ b/frontend/linux/fbdev.c @@ -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); } diff --git a/frontend/plat_omap.c b/frontend/plat_omap.c index d31fa50f..710a45be 100644 --- a/frontend/plat_omap.c +++ b/frontend/plat_omap.c @@ -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"); -- 2.39.5