mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
backend/drm: Exit-early if 0 crtcs
This fixes an assertion failure if we're using a device that has 0 crtcs as a renderer. This would happen on some laptops with discrete GPUs.
This commit is contained in:
parent
b3f42548d0
commit
46dc4100d6
1 changed files with 8 additions and 0 deletions
|
|
@ -1140,6 +1140,14 @@ static uint32_t get_possible_crtcs(int fd, drmModeRes *res,
|
|||
}
|
||||
|
||||
void scan_drm_connectors(struct wlr_drm_backend *drm) {
|
||||
/*
|
||||
* This GPU is not really a modesetting device.
|
||||
* It's just being used as a renderer.
|
||||
*/
|
||||
if (drm->num_crtcs == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
wlr_log(WLR_INFO, "Scanning DRM connectors");
|
||||
|
||||
drmModeRes *res = drmModeGetResources(drm->fd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue