diff --git a/libgralloc/Android.mk b/libgralloc/Android.mk index bd8c3e8..718baf1 100644 --- a/libgralloc/Android.mk +++ b/libgralloc/Android.mk @@ -33,6 +33,7 @@ LOCAL_SRC_FILES := framebuffer.cpp \ pmem_bestfit_alloc.cpp LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM) +LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS:= -DLOG_TAG=\"$(TARGET_BOARD_PLATFORM).gralloc\" -DHOST -DDEBUG_CALC_FPS -DUSE_ION ifeq ($(call is-board-platform,msm7627_surf msm7627_6x),true) @@ -40,8 +41,8 @@ ifeq ($(call is-board-platform,msm7627_surf msm7627_6x),true) endif ifeq ($(TARGET_HAVE_HDMI_OUT),true) - LOCAL_CFLAGS += -DHDMI_DUAL_DISPLAY - LOCAL_C_INCLUDES += hardware/msm7k/liboverlay +# LOCAL_CFLAGS += -DHDMI_DUAL_DISPLAY + LOCAL_C_INCLUDES += hardware/qcom/display/liboverlay LOCAL_SHARED_LIBRARIES += liboverlay endif @@ -66,5 +67,6 @@ LOCAL_SRC_FILES := ionalloc.cpp \ alloc_controller.cpp LOCAL_CFLAGS:= -DLOG_TAG=\"memalloc\" -DLOG_NDDEBUG=0 -DUSE_ION LOCAL_MODULE := libmemalloc +LOCAL_MODULE_TAGS := optional include $(BUILD_SHARED_LIBRARY) endif #TARGET_USES_ION diff --git a/libgralloc/framebuffer.cpp b/libgralloc/framebuffer.cpp index 8259f96..4cdb9ed 100644 --- a/libgralloc/framebuffer.cpp +++ b/libgralloc/framebuffer.cpp @@ -641,15 +641,15 @@ static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer) // post/queue the new buffer pthread_mutex_lock(&(m->avail[nxtIdx].lock)); if (m->avail[nxtIdx].is_avail != true) { - LOGE_IF(m->swapInterval != 0, "Found %d buf to be not avail", nxtIdx); + //LOGE_IF(m->swapInterval != 0, "Found %d buf to be not avail", nxtIdx); } m->avail[nxtIdx].is_avail = false; if (m->avail[nxtIdx].state != AVL) { - LOGD("[%d] state %c, expected %c", nxtIdx, - framebufferStateName[m->avail[nxtIdx].state], - framebufferStateName[AVL]); + //LOGD("[%d] state %c, expected %c", nxtIdx, + // framebufferStateName[m->avail[nxtIdx].state], + // framebufferStateName[AVL]); } m->avail[nxtIdx].state = SUB; @@ -824,6 +824,9 @@ int mapFrameBufferLocked(struct private_module_t* module) /* * Request NUM_BUFFERS screens (at lest 2 for page flipping) */ + // XXX Disable triple FB for now + int numberOfBuffers = NUM_FRAMEBUFFERS_MIN; +#if 0 int numberOfBuffers = (int)(finfo.smem_len/(info.yres * info.xres * (info.bits_per_pixel/8))); LOGV("num supported framebuffers in kernel = %d", numberOfBuffers); @@ -833,7 +836,7 @@ int mapFrameBufferLocked(struct private_module_t* module) numberOfBuffers = num; } } - +#endif if (numberOfBuffers > NUM_FRAMEBUFFERS_MAX) numberOfBuffers = NUM_FRAMEBUFFERS_MAX; @@ -1046,7 +1049,11 @@ int fb_device_open(hw_module_t const* module, const char* name, dev->device.post = fb_post; dev->device.setUpdateRect = 0; dev->device.compositionComplete = fb_compositionComplete; + // XXX triple buffering related changes + // are disabled +#if 0 dev->device.lockBuffer = fb_lockBuffer; +#endif #if defined(HDMI_DUAL_DISPLAY) dev->device.orientationChanged = fb_orientationChanged; dev->device.videoOverlayStarted = fb_videoOverlayStarted; @@ -1069,8 +1076,9 @@ int fb_device_open(hw_module_t const* module, const char* name, const_cast(dev->device.fps) = m->fps; const_cast(dev->device.minSwapInterval) = private_module_t::PRIV_MIN_SWAP_INTERVAL; const_cast(dev->device.maxSwapInterval) = private_module_t::PRIV_MAX_SWAP_INTERVAL; +#if 0 const_cast(dev->device.numFramebuffers) = m->numBuffers; - +#endif if (m->finfo.reserved[0] == 0x5444 && m->finfo.reserved[1] == 0x5055) { dev->device.setUpdateRect = fb_setUpdateRect; diff --git a/libgralloc/gpu.cpp b/libgralloc/gpu.cpp index 135d84f..ad3cb28 100644 --- a/libgralloc/gpu.cpp +++ b/libgralloc/gpu.cpp @@ -69,7 +69,9 @@ gpu_context_t::gpu_context_t(const private_module_t* module, common.module = const_cast(&module->base.common); common.close = gralloc_close; alloc = gralloc_alloc; +#if 0 allocSize = gralloc_alloc_size; +#endif free = gralloc_free; } diff --git a/libgralloc/mapper.cpp b/libgralloc/mapper.cpp index e2ec899..e217b7c 100644 --- a/libgralloc/mapper.cpp +++ b/libgralloc/mapper.cpp @@ -337,7 +337,7 @@ int gralloc_perform(struct gralloc_module_t const* module, int res = -EINVAL; va_list args; va_start(args, operation); - +#if 0 switch (operation) { case GRALLOC_MODULE_PERFORM_CREATE_HANDLE_FROM_BUFFER: { @@ -398,7 +398,7 @@ int gralloc_perform(struct gralloc_module_t const* module, default: break; } - +#endif va_end(args); return res; }