From a9b1e1661cc95486eb919b7864b0667da6dca917 Mon Sep 17 00:00:00 2001 From: freexperia Date: Wed, 30 Nov 2011 10:53:34 +0200 Subject: [PATCH] msm: idef TARGET_USES_ION for targets that dont have ION (msm7x30) but use C2D_COMPOSITION Change-Id: Idbea7db9a9f3241980cbe31ea2f8e6ad8dabc484 --- libcopybit/Android.mk | 3 +++ libcopybit/copybit_c2d.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/libcopybit/Android.mk b/libcopybit/Android.mk index bba5679..45c4fa2 100644 --- a/libcopybit/Android.mk +++ b/libcopybit/Android.mk @@ -28,6 +28,9 @@ ifeq ($(TARGET_USES_C2D_COMPOSITION),true) LOCAL_CFLAGS += -DCOPYBIT_Z180=1 -DC2D_SUPPORT_DISPLAY=1 LOCAL_MODULE_TAGS := optional include $(BUILD_SHARED_LIBRARY) +ifeq ($(TARGET_USES_ION),true) + LOCAL_CFLAGS += -DUSE_ION +endif else ifneq ($(TARGET_BOARD_PLATFORM),msm7x30) include $(CLEAR_VARS) diff --git a/libcopybit/copybit_c2d.cpp b/libcopybit/copybit_c2d.cpp index f703f05..7680ab0 100644 --- a/libcopybit/copybit_c2d.cpp +++ b/libcopybit/copybit_c2d.cpp @@ -213,8 +213,10 @@ static uint32 c2d_get_gpuaddr(int device_fd, struct private_handle_t *handle) param.memtype = KGSL_USER_MEM_TYPE_PMEM; else if (handle->flags & private_handle_t::PRIV_FLAGS_USES_ASHMEM) param.memtype = KGSL_USER_MEM_TYPE_ASHMEM; +#ifdef USE_ION else if (handle->flags & private_handle_t::PRIV_FLAGS_USES_ION) param.memtype = KGSL_USER_MEM_TYPE_ION; +#endif else { LOGE("Invalid handle flags: 0x%x", handle->flags); return 0;