OSDN Git Service

libdrm: drmCheckModesettingSupported: fix for FreeBSD
authorEmmanuel Vadot <manu@FreeBSD.org>
Fri, 24 Jan 2020 19:43:05 +0000 (20:43 +0100)
committerEmmanuel Vadot <manu@FreeBSD.org>
Tue, 21 Apr 2020 17:26:54 +0000 (19:26 +0200)
FreeBSD only support up to 10 GPUs not 16.

Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
xf86drmMode.c

index 6fa2e83..4052e03 100644 (file)
@@ -806,7 +806,7 @@ drm_public int drmCheckModesettingSupported(const char *busid)
        size_t len;
 
        /* How many GPUs do we expect in the machine ? */
-       for (i = 0; i < 16; i++) {
+       for (i = 0; i < 10; i++) {
                snprintf(oid, sizeof(oid), "hw.dri.%d.busid", i);
                len = sizeof(sbusid);
                ret = sysctlbyname(oid, sbusid, &len, NULL, 0);