Finally managed to find the cause for the (intermittent - reproducible at will only straight after boot) screen blanking issue (mentioned in previous post): the changes in the framebuffer driver seem to require the calls to KDSETMODE to be inside the FBIOPUT_VSCREENINFO calls... Fixed code now in GitHub
Tuesday, 27 January 2015
Tuesday, 6 January 2015
Low-level Graphics on Raspberry Pi (part X update II)
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
Subscribe to:
Posts (Atom)