summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoram Park <boram1288.park@samsung.com>2016-01-22 18:57:20 +0900
committerBoram Park <boram1288.park@samsung.com>2016-01-22 02:02:31 -0800
commit5cd80c9b382dc7cfa5d321ebd2980883843097c9 (patch)
treea16cbb88a13f5933e94deba89165a81f4db6f542
parentf7900faf4ef7c89e7d73eb08fc2af863d4dc975d (diff)
downloadlibtdm-drm-accepted/tizen/mobile/20160125.011554.tar.gz
libtdm-drm-accepted/tizen/mobile/20160125.011554.tar.bz2
libtdm-drm-accepted/tizen/mobile/20160125.011554.zip
Change-Id: I89805b3cb097994d35eba5d25a26ca16b20e3826
-rw-r--r--configure.ac7
-rw-r--r--src/tdm_drm.c2
2 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 642db2e..f9c2bbd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,13 @@ fi
AC_SUBST(TDM_DRM_CFLAGS)
AC_SUBST(TDM_DRM_LIBS)
+AC_DEFINE_UNQUOTED(LIBDRM_MAJOR_VERSION, [`pkg-config --modversion libdrm | cut -d '.' -f 1`], dnl
+ [libdrm major version])
+AC_DEFINE_UNQUOTED(LIBDRM_MIROR_VERSION, [`pkg-config --modversion libdrm | cut -d '.' -f 2`], dnl
+ [libdrm major version])
+AC_DEFINE_UNQUOTED(LIBDRM_MICRO_VERSION, [`pkg-config --modversion libdrm | cut -d '.' -f 3`], dnl
+ [libdrm major version])
+
# set the dir for the tbm module
DEFAULT_TDM_MODULE_PATH="${libdir}/tdm"
AC_ARG_WITH(tdm-module-path, AS_HELP_STRING([--with-tdm-module-path=PATH], [tdm module dir]),
diff --git a/src/tdm_drm.c b/src/tdm_drm.c
index b47afec..a07f70f 100644
--- a/src/tdm_drm.c
+++ b/src/tdm_drm.c
@@ -216,8 +216,10 @@ tdm_drm_init(tdm_display *dpy, tdm_error *error)
goto failed;
}
+#if LIBDRM_MAJOR_VERSION >= 2 && LIBDRM_MINOR_VERSION >= 4 && LIBDRM_MICRO_VERSION >= 47
if (drmSetClientCap(drm_data->drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1) < 0)
TDM_WRN("Set DRM_CLIENT_CAP_UNIVERSAL_PLANES failed");
+#endif
drm_data->mode_res = drmModeGetResources(drm_data->drm_fd);
if (!drm_data->mode_res)