"\t-t, --term <TERM> Value of the TERM environment variable\n"
"\t for the child process\n"
"\n"
+ "Video Options:\n"
+ "\t --fbdev Use fbdev instead of DRM\n"
+ "\n"
"Input Device Options:\n"
"\t --xkb-layout <layout> Set XkbLayout for input devices\n"
"\t --xkb-variant <variant> Set XkbVariant for input devices\n"
{ "debug", no_argument, &conf_global.debug, 1 },
{ "silent", no_argument, &conf_global.silent, 1 },
{ "switchvt", no_argument, NULL, 's' },
+ { "fbdev", no_argument, &conf_global.use_fbdev, 1 },
{ "xkb-layout", required_argument, NULL, 1001 },
{ "xkb-variant", required_argument, NULL, 1002 },
{ "xkb-options", required_argument, NULL, 1003 },
static void seat_add_video(struct kmscon_seat *seat,
struct uterm_monitor_dev *dev,
+ unsigned int type,
const char *node)
{
int ret;
+ unsigned int mode;
if (seat->video)
return;
+ if ((type == UTERM_MONITOR_FBDEV) != !!conf_global.use_fbdev)
+ return;
+
+ if (conf_global.use_fbdev)
+ mode = UTERM_VIDEO_FBDEV;
+ else
+ mode = UTERM_VIDEO_DRM;
- ret = uterm_video_new(&seat->video, seat->app->eloop, UTERM_VIDEO_DRM,
- node);
+ ret = uterm_video_new(&seat->video, seat->app->eloop, mode, node);
if (ret)
return;
seat = ev->seat_data;
if (!seat)
break;
- if (ev->dev_type == UTERM_MONITOR_DRM)
- seat_add_video(seat, ev->dev, ev->dev_node);
+ if (ev->dev_type == UTERM_MONITOR_DRM ||
+ ev->dev_type == UTERM_MONITOR_FBDEV)
+ seat_add_video(seat, ev->dev, ev->dev_type,
+ ev->dev_node);
else if (ev->dev_type == UTERM_MONITOR_INPUT)
uterm_input_add_dev(seat->input, ev->dev_node);
break;
seat = ev->seat_data;
if (!seat)
break;
- if (ev->dev_type == UTERM_MONITOR_DRM)
+ if (ev->dev_type == UTERM_MONITOR_DRM ||
+ ev->dev_type == UTERM_MONITOR_FBDEV)
seat_rm_video(seat, ev->dev);
else if (ev->dev_type == UTERM_MONITOR_INPUT)
uterm_input_remove_dev(seat->input, ev->dev_node);