intel: Relax the has-kms test slightly

Do not rely on a fully populated set of CRTCs, but merely note that the
GETRESOURCES ioctl returns an error if KMS is not enabled.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-03-07 09:07:19 +00:00
parent c6a59bee3b
commit b84db39edb
1 changed files with 1 additions and 3 deletions

View File

@ -423,9 +423,7 @@ static Bool has_kernel_mode_setting(const struct pci_device *dev)
struct drm_mode_card_res res;
memset(&res, 0, sizeof(res));
if (drmIoctl(fd, DRM_IOCTL_MODE_GETRESOURCES, &res) == 0)
ret = res.count_crtcs != 0;
else
if (drmIoctl(fd, DRM_IOCTL_MODE_GETRESOURCES, &res))
ret = FALSE;
}
close(fd);