"\t --fbdev [off] Use fbdev instead of DRM\n"
"\t --dumb [off] Use dumb DRM instead of hardware-\n"
"\t accelerated DRM devices\n"
+ "\t --primary-gpu-only [off] Use primary GPU only\n"
+ "\t --all-gpus [off] Use all GPUs unconditionally\n"
"\t --fps [50] Limit frame-rate\n"
"\t --render-engine <eng> [-] Console renderer\n"
"\t --render-timing [off] Print renderer timing information\n"
/* Video Options */
CONF_OPTION_BOOL(0, "fbdev", &conf->fbdev, false),
CONF_OPTION_BOOL(0, "dumb", &conf->dumb, false),
+ CONF_OPTION_BOOL(0, "primary-gpu-only", &conf->primary_gpu_only, false),
+ CONF_OPTION_BOOL(0, "all-gpus", &conf->all_gpus, false),
CONF_OPTION_UINT(0, "fps", &conf->fps, 50),
CONF_OPTION_STRING(0, "render-engine", &conf->render_engine, NULL),
CONF_OPTION_BOOL(0, "render-timing", &conf->render_timing, false),
}
}
+ if (!seat->conf->all_gpus) {
+ if (seat->conf->primary_gpu_only && !(flags & UTERM_MONITOR_PRIMARY)) {
+ log_info("ignoring video device %s on seat %s as it is no primary GPU",
+ node, seat->name);
+ return -ERANGE;
+ }
+ if (!(flags & (UTERM_MONITOR_PRIMARY | UTERM_MONITOR_AUX))) {
+ log_info("ignoring video device %s on seat %s as it is neither a primary nor auxiliary GPU",
+ node, seat->name);
+ return -ERANGE;
+ }
+ }
+
log_debug("new video device %s on seat %s", node, seat->name);
vid = malloc(sizeof(*vid));