session: load GPU devices even if they have zero crtcs/connectors/encoders

On some systems (most notably laptops with two GPUs) there are GPUs that
don't have attached outputs. However, we still want to load those GPUs
because they could still be used by the compositor for rendering.
This commit is contained in:
Ilia Bozhinov 2018-08-07 19:18:18 +03:00
parent 84e87be6df
commit cb42e16f64

View file

@ -220,17 +220,9 @@ static int open_if_kms(struct wlr_session *restrict session, const char *restric
goto out_fd; goto out_fd;
} }
if (res->count_crtcs <= 0 || res->count_connectors <= 0 ||
res->count_encoders <= 0) {
goto out_res;
}
drmModeFreeResources(res); drmModeFreeResources(res);
return fd; return fd;
out_res:
drmModeFreeResources(res);
out_fd: out_fd:
wlr_session_close_file(session, fd); wlr_session_close_file(session, fd);
return -1; return -1;