main: use UTERM_VIDEO_DUMB as fallback when DRM is not available
If the uterm video object fails to initialize the DRM device, then we try again with the dumb device. Only if both devices fail, we drop the device and continue. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
de02874bf6
commit
ffd543f41d
13
src/main.c
13
src/main.c
@ -168,8 +168,17 @@ static void seat_add_video(struct kmscon_seat *seat,
|
||||
mode = UTERM_VIDEO_DRM;
|
||||
|
||||
ret = uterm_video_new(&seat->video, seat->app->eloop, mode, node);
|
||||
if (ret)
|
||||
return;
|
||||
if (ret) {
|
||||
if (mode == UTERM_VIDEO_DRM) {
|
||||
log_info("cannot create drm device; trying dumb drm mode");
|
||||
ret = uterm_video_new(&seat->video, seat->app->eloop,
|
||||
UTERM_VIDEO_DUMB, node);
|
||||
if (ret)
|
||||
return;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ret = kmscon_ui_new(&seat->ui, seat->app->eloop, seat->video,
|
||||
seat->input);
|
||||
|
Loading…
x
Reference in New Issue
Block a user