Finally... in continuation to this post, after some elaboration on the forum I managed to get down to testing this properly - it appears that the changes in the fb driver can be made to work! Replace the 'switch page' by either (ioctl version):
or (mailbox version):
Curiously the order has to be pan first - wait for vsync after... Obviously if going for the 'ioctl only version' one can scrap all the extra code and there is no need to create the char_dev node etc.
// switch page
// ioctl version
vinfo.yoffset = cur_page * vinfo.yres;
ioctl(fbfd, FBIOPAN_DISPLAY, &vinfo);
ioctl(fbfd, FBIO_WAITFORVSYNC, 0);
// switch page
// mailbox version
vx = 0;
vy = cur_page * vinfo.yres;
set_fb_voffs(&vx, &vy);
ioctl(fbfd, FBIO_WAITFORVSYNC, 0);
Cleaned up 'pure Linux fb' version of the code available in GitHub. Compile with (as I took out the timing code no need for the rt lib):
gcc -O2 -o fbtestXIV fbtestXIV.c
fbset -depth 8 ./fbtestXIV
time ./fbtestXIV
Update on the screen blanking issue in next post http://raspberrycompote.blogspot.com/2015/01/low-level-graphics-on-raspberry-pi-part_27.html
ReplyDelete