mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-08 13:29:45 -05:00
backend/drm: properly handle GPUs without CRTCs
This commit is contained in:
parent
eb44d18cdd
commit
776008da69
1 changed files with 5 additions and 0 deletions
|
|
@ -156,6 +156,11 @@ bool init_drm_resources(struct wlr_drm_backend *drm) {
|
|||
wlr_log(WLR_INFO, "Found %d DRM CRTCs", res->count_crtcs);
|
||||
|
||||
drm->num_crtcs = res->count_crtcs;
|
||||
if (drm->num_crtcs == 0) {
|
||||
drmModeFreeResources(res);
|
||||
return true;
|
||||
}
|
||||
|
||||
drm->crtcs = calloc(drm->num_crtcs, sizeof(drm->crtcs[0]));
|
||||
if (!drm->crtcs) {
|
||||
wlr_log_errno(WLR_ERROR, "Allocation failed");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue