aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov2014-09-07 11:54:39 -0500
committerEmil Velikov2014-09-28 11:09:34 -0500
commitf3fd11beaa70b0624ab1d6c7d8e25c65eea942ac (patch)
tree45ba3d2286daac712e1e55e72585c0037ddd64c8 /libkms/linux.c
parentbe7d29717239f1b5230dffecf7060b57fcbab20a (diff)
downloadexternal-libgbm-f3fd11beaa70b0624ab1d6c7d8e25c65eea942ac.tar.gz
external-libgbm-f3fd11beaa70b0624ab1d6c7d8e25c65eea942ac.tar.xz
external-libgbm-f3fd11beaa70b0624ab1d6c7d8e25c65eea942ac.zip
libkms: build the intel backend only when needed
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Diffstat (limited to 'libkms/linux.c')
-rw-r--r--libkms/linux.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/libkms/linux.c b/libkms/linux.c
index 17e1d588..77a0bbe9 100644
--- a/libkms/linux.c
+++ b/libkms/linux.c
@@ -103,25 +103,31 @@ linux_from_sysfs(int fd, struct kms_driver **out)
103 if (ret) 103 if (ret)
104 return ret; 104 return ret;
105 105
106#ifdef HAVE_INTEL
106 if (!strcmp(name, "intel")) 107 if (!strcmp(name, "intel"))
107 ret = intel_create(fd, out); 108 ret = intel_create(fd, out);
109 else
110#endif
108#ifdef HAVE_VMWGFX 111#ifdef HAVE_VMWGFX
109 else if (!strcmp(name, "vmwgfx")) 112 if (!strcmp(name, "vmwgfx"))
110 ret = vmwgfx_create(fd, out); 113 ret = vmwgfx_create(fd, out);
114 else
111#endif 115#endif
112#ifdef HAVE_NOUVEAU 116#ifdef HAVE_NOUVEAU
113 else if (!strcmp(name, "nouveau")) 117 if (!strcmp(name, "nouveau"))
114 ret = nouveau_create(fd, out); 118 ret = nouveau_create(fd, out);
119 else
115#endif 120#endif
116#ifdef HAVE_RADEON 121#ifdef HAVE_RADEON
117 else if (!strcmp(name, "radeon")) 122 if (!strcmp(name, "radeon"))
118 ret = radeon_create(fd, out); 123 ret = radeon_create(fd, out);
124 else
119#endif 125#endif
120#ifdef HAVE_EXYNOS 126#ifdef HAVE_EXYNOS
121 else if (!strcmp(name, "exynos")) 127 if (!strcmp(name, "exynos"))
122 ret = exynos_create(fd, out); 128 ret = exynos_create(fd, out);
123#endif
124 else 129 else
130#endif
125 ret = -ENOSYS; 131 ret = -ENOSYS;
126 132
127 free(name); 133 free(name);