+ if (mi.size < mem * mem_blocks) {
+ for (; mem_blocks > 0; mem_blocks--) {
+ mi.size = mem * mem_blocks;
+ ret = ioctl(fd, OMAPFB_SETUP_MEM, &mi);
+ if (ret == 0)
+ break;
+ }
+ if (ret != 0 || mem_blocks <= 0) {
+ err("failed to allocate at least %d bytes of vram:\n", mem);