# Checks for header files.
AC_HEADER_STDC
+AC_CHECK_FILES( /usr/include/xorg/dri3.h /usr/include/xorg/present.h, [dri3=yes], [dri3=no])
+AM_CONDITIONAL(ENABLE_DRI3_PRESENT, [test "x$dri3" = xyes])
+if test "x$dri3" = xyes; then
+ AC_DEFINE(HAVE_DRI3_PRESENT_H, 1, [ DRI3 and Present is enabled ])
+fi
+
AC_SUBST([EXYNOS_CFLAGS])
AC_SUBST([EXYNOS_LIBS])
exynos_drv_la_SOURCES += \
accel/sec_exa.c \
accel/sec_exa_sw.c \
- accel/sec_present.c \
- accel/sec_dri3.c \
accel/sec_dri2.c
AM_CFLAGS += -I@top_srcdir@/src/accel
+if ENABLE_DRI3_PRESENT
+exynos_drv_la_SOURCES += \
+ accel/sec_present.c \
+ accel/sec_dri3.c
+endif
+
# xv
exynos_drv_la_SOURCES += \
xv/sec_video_tvout.c \
}
}
+#ifdef HAVE_DRI3_PRESENT_H
/* present */
if (xf86ReturnOptValBool (pSec->Options, OPTION_PRESENT, FALSE))
{
{
pSec->is_dri3 = TRUE;
}
+#endif
/* rotate */
pSec->rotate = RR_Rotate_0;
"DRI2 initialization failed\n");
}
}
-
+
+#ifdef HAVE_DRI3_PRESENT_H
if (pSec->is_present)
{
if(!secPresentScreenInit(pScreen))
"DRI3 initialization failed\n");
}
}
+#endif
}
}
{
SECPtr pSec = SECPTR (pScrn);
- return _secFbCreateBo2(pSec->pFb, -1, -1, width, height, carr_bo);
+ tbm_bo tbo = _secFbCreateBo2(pSec->pFb, -1, -1, width, height, carr_bo);
+
+ return tbo ? 1 : 0;
}
tbm_bo