From: Changyeon Lee Date: Mon, 11 Apr 2016 11:12:17 +0000 (+0900) Subject: Use surface align 8 in circle target X-Git-Tag: accepted/tizen/common/20160414.142624^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7554728549da2234fbbf3de4bf1dc1ea18b0b603;p=platform%2Fadaptation%2Fsamsung_exynos%2Flibtbm-exynos.git Use surface align 8 in circle target Change-Id: I6e0e2f92b7db456994e6afac65448063df68bd0e --- diff --git a/configure.ac b/configure.ac index 3c07765..d064c86 100644 --- a/configure.ac +++ b/configure.ac @@ -60,6 +60,18 @@ if test "x$BACKEND_CTRL" = xyes; then AC_DEFINE(ALWAYS_BACKEND_CTRL, 1, [Enable always backend ctrl]) fi +AC_ARG_ENABLE([align-eight], + [AC_HELP_STRING([--enable-align-eight], [Enable surface align eight])], + [], [enable_align_eight=no]) + +if test "x$enable_align_eight" = "xyes"; then + AC_DEFINE(ALIGN_EIGHT, 1, [Enable surface align eight]) +fi + +if test "x$BACKEND_CTRL" = xyes; then + AC_DEFINE(ALWAYS_BACKEND_CTRL, 1, [Enable always backend ctrl]) +fi + LIBTBM_EXYNOS_CFLAGS="$LIBDRM_CFLAGS $LIBDRM_EXYNOS_CFLAGS $LIBTBM_CFLAGS $DLOG_CFLAGS $LIBUDEV_CFLAGS" LIBTBM_EXYNOS_LIBS="$LIBDRM_LIBS $LIBDRM_EXYNOS_LIBS $LIBTBM_LIBS $DLOG_LIBS $LIBUDEV_LIBS" AC_SUBST(LIBTBM_EXYNOS_CFLAGS) diff --git a/packaging/libtbm-exynos.spec b/packaging/libtbm-exynos.spec index 8c4bfcc..1446210 100644 --- a/packaging/libtbm-exynos.spec +++ b/packaging/libtbm-exynos.spec @@ -25,6 +25,9 @@ descriptionion: Tizen Buffer manager backend module for exynos %build %reconfigure --prefix=%{_prefix} --libdir=%{_libdir}/bufmgr --disable-cachectrl \ +%if "%_repository" == "target-circle" + --enable-align-eight \ +%endif CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed" make %{?_smp_mflags} diff --git a/src/tbm_bufmgr_exynos.c b/src/tbm_bufmgr_exynos.c index 79d409f..14d82ab 100644 --- a/src/tbm_bufmgr_exynos.c +++ b/src/tbm_bufmgr_exynos.c @@ -112,9 +112,15 @@ char *target_name() #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) #define MAX(a, b) ((a) > (b) ? (a) : (b)) +#ifdef ALIGN_EIGHT +#define TBM_SURFACE_ALIGNMENT_PLANE (8) +#define TBM_SURFACE_ALIGNMENT_PITCH_RGB (8) +#else #define TBM_SURFACE_ALIGNMENT_PLANE (64) -#define TBM_SURFACE_ALIGNMENT_PLANE_NV12 (4096) #define TBM_SURFACE_ALIGNMENT_PITCH_RGB (64) +#endif + +#define TBM_SURFACE_ALIGNMENT_PLANE_NV12 (4096) #define TBM_SURFACE_ALIGNMENT_PITCH_YUV (16) #define SZ_1M 0x00100000