Lines Matching refs:vi
45 static struct fb_var_screeninfo vi; variable
50 struct fb_var_screeninfo *vi);
67 if(ioctl(fd, FBIOGET_VSCREENINFO, &vi) < 0) { in get_framebuffer()
72 if (bpp && vi.bits_per_pixel != bpp) { in get_framebuffer()
74 vi.bits_per_pixel = bpp; in get_framebuffer()
75 if(ioctl(fd, FBIOPUT_VSCREENINFO, &vi) < 0) { in get_framebuffer()
86 dumpinfo(&fi, &vi); in get_framebuffer()
94 bytes_per_pixel = vi.bits_per_pixel >> 3; in get_framebuffer()
96 fb->width = vi.xres; in get_framebuffer()
97 fb->height = vi.yres; in get_framebuffer()
100 fb->bpp = vi.bits_per_pixel; in get_framebuffer()
104 fb->width = vi.xres; in get_framebuffer()
105 fb->height = vi.yres; in get_framebuffer()
108 vi.yres * vi.xres * bytes_per_pixel); in get_framebuffer()
109 fb->bpp = vi.bits_per_pixel; in get_framebuffer()
117 vi.yres_virtual = vi.yres * 2; in set_active_framebuffer()
118 vi.yoffset = n * vi.yres; in set_active_framebuffer()
119 if(ioctl(gr_fb_fd, FBIOPUT_VSCREENINFO, &vi) < 0) { in set_active_framebuffer()
125 static void dumpinfo(struct fb_fix_screeninfo *fi, struct fb_var_screeninfo *vi) in dumpinfo() argument
127 fprintf(stderr,"vi.xres = %d\n", vi->xres); in dumpinfo()
128 fprintf(stderr,"vi.yres = %d\n", vi->yres); in dumpinfo()
129 fprintf(stderr,"vi.xresv = %d\n", vi->xres_virtual); in dumpinfo()
130 fprintf(stderr,"vi.yresv = %d\n", vi->yres_virtual); in dumpinfo()
131 fprintf(stderr,"vi.xoff = %d\n", vi->xoffset); in dumpinfo()
132 fprintf(stderr,"vi.yoff = %d\n", vi->yoffset); in dumpinfo()
133 fprintf(stderr, "vi.bits_per_pixel = %d\n", vi->bits_per_pixel); in dumpinfo()
210 int stride = fi.line_length / (vi.bits_per_pixel >> 3); in draw_grid()
216 if (vi.bits_per_pixel == 16) in draw_grid()
221 if (vi.bits_per_pixel == 16) in draw_grid()
229 if (vi.bits_per_pixel == 16) in draw_grid()
234 if (vi.bits_per_pixel == 16) in draw_grid()
245 int stride = fi.line_length / (vi.bits_per_pixel >> 3); in clear_screen()
251 if (vi.bits_per_pixel == 16) in clear_screen()
275 w = vi.xres; in main()
276 h = vi.yres; in main()
279 clear_screen(vi.xres, vi.yres, gr_fbs[0].data); in main()
280 clear_screen(vi.xres, vi.yres, gr_fbs[1].data); in main()