diff --git a/Makefile.common b/Makefile.common index c1327fea7b..b21ac70dff 100644 --- a/Makefile.common +++ b/Makefile.common @@ -677,12 +677,15 @@ OBJ += gfx/video_context_driver.o \ ifeq ($(HAVE_KMS), 1) HAVE_AND_WILL_USE_DRM = 1 - OBJ += gfx/drivers_context/drm_ctx.o \ - gfx/drivers/drm_gfx.o + OBJ += gfx/drivers_context/drm_ctx.o DEFINES += $(GBM_CFLAGS) $(DRM_CFLAGS) $(EGL_CFLAGS) LIBS += $(GBM_LIBS) $(DRM_LIBS) $(EGL_LIBS) endif +ifeq ($(HAVE_PLAIN_DRM), 1) + OBJ += gfx/drivers/drm_gfx.o +endif + ifeq ($(HAVE_GL_CONTEXT), 1) DEFINES += -DHAVE_OPENGL -DHAVE_GLSL OBJ += gfx/drivers/gl.o \ diff --git a/gfx/video_driver.c b/gfx/video_driver.c index e0654af150..95d89858bb 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -200,7 +200,7 @@ static const video_driver_t *video_drivers[] = { #ifdef HAVE_SUNXI &video_sunxi, #endif -#ifdef HAVE_KMS +#ifdef HAVE_PLAIN_DRM &video_drm, #endif &video_null, diff --git a/griffin/griffin.c b/griffin/griffin.c index 9a44f4cc99..505ca47f69 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -278,7 +278,7 @@ VIDEO DRIVER #include "../gfx/drivers/vulkan.c" #endif -#if defined(HAVE_KMS) +#if defined(HAVE_PLAIN_DRM) #include "../gfx/drivers/drm_gfx.c" #endif diff --git a/qb/config.libs.sh b/qb/config.libs.sh index e693821d48..6deb29c4fc 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -309,6 +309,7 @@ fi if [ "$HAVE_KMS" != "no" ]; then check_pkgconf GBM gbm 9.0 check_pkgconf DRM libdrm + check_pkgconf PLAIN_DRM libdrm 2.4.68 if [ "$HAVE_GBM" = "yes" ] && [ "$HAVE_DRM" = "yes" ] && [ "$HAVE_EGL" = "yes" ]; then HAVE_KMS=yes elif [ "$HAVE_KMS" = "yes" ]; then