4 * This work is licensed under the terms of the GNU GPLv2 or later.
5 * See the COPYING file in the top-level directory.
11 #include "linux/fbdev.h"
13 static struct vout_fbdev *fbdev;
16 int pl_fbdev_init(void)
18 const char *fbdev_name;
21 fbdev_name = getenv("FBDEV");
22 if (fbdev_name == NULL)
23 fbdev_name = "/dev/fb0";
27 fbdev = vout_fbdev_init(fbdev_name, &w, &h, 0);
31 pl_fbdev_buf = vout_fbdev_flip(fbdev);
36 int pl_fbdev_set_mode(int w, int h, int bpp)
38 printf("set mode %dx%d@%d\n", w, h, bpp);
39 return vout_fbdev_resize(fbdev, w, h, 0, 0, 0, 0, 0);
42 void *pl_fbdev_flip(void)
44 pl_fbdev_buf = vout_fbdev_flip(fbdev);
48 void pl_fbdev_finish(void)
51 vout_fbdev_finish(fbdev);