8 #include <linux/omapfb.h>
13 struct fb_var_screeninfo fbvar;
14 struct omapfb_plane_info pi;
15 struct omapfb_mem_info mi;
16 int ret, fbdev, kbdfd;
18 fbdev = open("/dev/fb0", O_RDWR);
24 ret = ioctl(fbdev, FBIOGET_VSCREENINFO, &fbvar);
26 perror("FBIOGET_VSCREENINFO ioctl");
30 if (fbvar.yoffset != 0) {
31 printf("fixing yoffset.. ");
33 ret = ioctl(fbdev, FBIOPAN_DISPLAY, &fbvar);
35 perror("ioctl FBIOPAN_DISPLAY");
44 fbdev = open("/dev/fb1", O_RDWR);
50 ret = ioctl(fbdev, OMAPFB_QUERY_PLANE, &pi);
51 ret |= ioctl(fbdev, OMAPFB_QUERY_MEM, &mi);
56 ret = ioctl(fbdev, OMAPFB_SETUP_PLANE, &pi);
58 perror("SETUP_PLANE");
61 ret = ioctl(fbdev, OMAPFB_SETUP_MEM, &mi);
69 kbdfd = open("/dev/tty", O_RDWR);
71 perror("open /dev/tty");
75 if (ioctl(kbdfd, KDSETMODE, KD_TEXT) == -1)
76 perror("KDSETMODE KD_TEXT");