OSDN Git Service

minigbm: komeda: Refactor the 'dumb' drivers and add Komeda support
[android-x86/external-minigbm.git] / drv.c
diff --git a/drv.c b/drv.c
index 8db5a5d..3f973c3 100644 (file)
--- a/drv.c
+++ b/drv.c
 #ifdef DRV_AMDGPU
 extern const struct backend backend_amdgpu;
 #endif
-extern const struct backend backend_evdi;
 #ifdef DRV_EXYNOS
 extern const struct backend backend_exynos;
 #endif
 #ifdef DRV_I915
 extern const struct backend backend_i915;
 #endif
-#ifdef DRV_MARVELL
-extern const struct backend backend_marvell;
-#endif
 #ifdef DRV_MEDIATEK
 extern const struct backend backend_mediatek;
 #endif
-#ifdef DRV_MESON
-extern const struct backend backend_meson;
-#endif
 #ifdef DRV_MSM
 extern const struct backend backend_msm;
 #endif
-extern const struct backend backend_nouveau;
-#ifdef DRV_RADEON
-extern const struct backend backend_radeon;
-#endif
 #ifdef DRV_ROCKCHIP
 extern const struct backend backend_rockchip;
 #endif
-#ifdef DRV_SYNAPTICS
-extern const struct backend backend_synaptics;
-#endif
 #ifdef DRV_TEGRA
 extern const struct backend backend_tegra;
 #endif
-extern const struct backend backend_udl;
 #ifdef DRV_VC4
 extern const struct backend backend_vc4;
 #endif
+
+// Dumb / generic drivers
+extern const struct backend backend_evdi;
+extern const struct backend backend_marvell;
+extern const struct backend backend_meson;
+extern const struct backend backend_nouveau;
+extern const struct backend backend_komeda;
+extern const struct backend backend_radeon;
+extern const struct backend backend_synaptics;
 extern const struct backend backend_virtio_gpu;
+extern const struct backend backend_udl;
 
 static const struct backend *drv_get_backend(int fd)
 {
@@ -80,43 +75,26 @@ static const struct backend *drv_get_backend(int fd)
 #ifdef DRV_AMDGPU
                &backend_amdgpu,
 #endif
-               &backend_evdi,
 #ifdef DRV_EXYNOS
                &backend_exynos,
 #endif
 #ifdef DRV_I915
                &backend_i915,
 #endif
-#ifdef DRV_MARVELL
-               &backend_marvell,
-#endif
 #ifdef DRV_MEDIATEK
                &backend_mediatek,
 #endif
-#ifdef DRV_MESON
-               &backend_meson,
-#endif
 #ifdef DRV_MSM
                &backend_msm,
 #endif
-               &backend_nouveau,
-#ifdef DRV_RADEON
-               &backend_radeon,
-#endif
 #ifdef DRV_ROCKCHIP
                &backend_rockchip,
 #endif
-#ifdef DRV_SYNAPTICS
-               &backend_synaptics,
-#endif
-#ifdef DRV_TEGRA
-               &backend_tegra,
-#endif
-               &backend_udl,
 #ifdef DRV_VC4
                &backend_vc4,
 #endif
-               &backend_virtio_gpu,
+               &backend_marvell,  &backend_meson,     &backend_nouveau,    &backend_komeda,
+               &backend_radeon,   &backend_synaptics, &backend_virtio_gpu,
        };
 
        for (i = 0; i < ARRAY_SIZE(backend_list); i++) {