I'm trying to get hardware scaling working and followed the guide from the wiki, but when i use mmap in my code, mmap fails by returning MAP_FAILED.
from my understandings, it should be enough to do the following
first in my launch script
ofbset -fb /dev/fb1 -pos 0 0 -size 800 480 -mem 384000 -en 1
fbset -fb /dev/fb1 -g 400 240 400 480 16
./app
part of app code
int width = 400;
int height = 240;
int bytepp = 2;
int pages = 2;
int fbdev = open("/dev/fb1", O_RDWR)
void* buffer = mmap(0, width*height*bytepp*pages, PROT_READ|PROT_WRITE, MAP_SHARED, fbdev, 0);
and afterwards i should have the pointer to the first framebuffer "page" in buffer. but all i get is MAP_FAILED.
any help is appreciated
from my understandings, it should be enough to do the following
first in my launch script
ofbset -fb /dev/fb1 -pos 0 0 -size 800 480 -mem 384000 -en 1
fbset -fb /dev/fb1 -g 400 240 400 480 16
./app
part of app code
int width = 400;
int height = 240;
int bytepp = 2;
int pages = 2;
int fbdev = open("/dev/fb1", O_RDWR)
void* buffer = mmap(0, width*height*bytepp*pages, PROT_READ|PROT_WRITE, MAP_SHARED, fbdev, 0);
and afterwards i should have the pointer to the first framebuffer "page" in buffer. but all i get is MAP_FAILED.
any help is appreciated
Last edited by a moderator: