Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge "hwc: Support swap interval zero"

  • Loading branch information...
commit 34272439f7f1a909f187a7dcdccdd62278600301 2 parents a348159 + 94baddc
Linux Build Service Account authored Gerrit - the friendly Code Review server committed
View
4 common.mk
@@ -25,6 +25,10 @@ ifeq ($(ARCH_ARM_HAVE_NEON),true)
common_flags += -D__ARM_HAVE_NEON
endif
+ifeq ($(TARGET_BOARD_PLATFORM), msm8974)
+ common_flags += -DVENUS_COLOR_FORMAT
+endif
+
common_deps :=
kernel_includes :=
View
6 libcopybit/Android.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2008 The Android Open Source Project
+# Copyright (C) 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,15 +15,15 @@
LOCAL_PATH:= $(call my-dir)
include $(LOCAL_PATH)/../common.mk
include $(CLEAR_VARS)
+
LOCAL_MODULE := copybit.$(TARGET_BOARD_PLATFORM)
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
LOCAL_SHARED_LIBRARIES := $(common_libs) libdl libmemalloc
-LOCAL_CFLAGS := $(common_flags)
+LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdcopybit\"
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
-
ifeq ($(TARGET_USES_C2D_COMPOSITION),true)
LOCAL_CFLAGS += -DCOPYBIT_Z180=1 -DC2D_SUPPORT_DISPLAY=1
LOCAL_SRC_FILES := copybit_c2d.cpp software_converter.cpp
View
3  libcopybit/copybit.cpp
@@ -15,9 +15,6 @@
* limitations under the License.
*/
-
-#define LOG_TAG "copybit"
-
#include <cutils/log.h>
#include <linux/msm_mdp.h>
View
2  libcopybit/copybit_c2d.cpp
@@ -15,8 +15,6 @@
* limitations under the License.
*/
-#define LOG_TAG "copybit_c2d"
-
#include <cutils/log.h>
#include <stdint.h>
View
1  libcopybit/software_converter.cpp
@@ -27,7 +27,6 @@
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#define LOG_TAG "copybit"
#include <cutils/log.h>
#include <stdlib.h>
#include <errno.h>
View
3  libexternal/Android.mk
@@ -1,12 +1,13 @@
LOCAL_PATH := $(call my-dir)
include $(LOCAL_PATH)/../common.mk
include $(CLEAR_VARS)
+
LOCAL_MODULE := libexternal
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
LOCAL_SHARED_LIBRARIES := $(common_libs) liboverlay
-LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"external\"
+LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdexternal\"
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
LOCAL_SRC_FILES := external.cpp
View
4 libgenlock/Android.mk
@@ -6,8 +6,8 @@ LOCAL_MODULE := libgenlock
LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := $(common_includes)
LOCAL_SHARED_LIBRARIES := liblog libcutils
-LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"libgenlock\"
+LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdgenlock\"
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
LOCAL_SRC_FILES := genlock.cpp
-include $(BUILD_SHARED_LIBRARY)
+include $(BUILD_SHARED_LIBRARY)
View
11 libgralloc/Android.mk
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-#gralloc module
+# Gralloc module
LOCAL_PATH := $(call my-dir)
include $(LOCAL_PATH)/../common.mk
include $(CLEAR_VARS)
@@ -23,18 +23,21 @@ LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
LOCAL_SHARED_LIBRARIES := $(common_libs) libmemalloc libgenlock
LOCAL_SHARED_LIBRARIES += libqdutils libGLESv1_CM
-LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"gralloc\"
+LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdgralloc\"
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) $(kernel_deps)
LOCAL_SRC_FILES := gpu.cpp gralloc.cpp framebuffer.cpp mapper.cpp
+
include $(BUILD_SHARED_LIBRARY)
-#MemAlloc Library
+# MemAlloc Library
include $(CLEAR_VARS)
+
LOCAL_MODULE := libmemalloc
LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
LOCAL_SHARED_LIBRARIES := $(common_libs) libgenlock
-LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"memalloc\"
+LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdmemalloc\"
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) $(kernel_deps)
LOCAL_SRC_FILES := ionalloc.cpp alloc_controller.cpp
+
include $(BUILD_SHARED_LIBRARY)
View
8 libgralloc/alloc_controller.cpp
@@ -36,6 +36,14 @@
#include "gr.h"
#include "comptype.h"
+#ifdef VENUS_COLOR_FORMAT
+#include <media/msm_media_info.h>
+#else
+#define VENUS_Y_STRIDE(args...) 0
+#define VENUS_Y_SCANLINES(args...) 0
+#define VENUS_BUFFER_SIZE(args...) 0
+#endif
+
using namespace gralloc;
using namespace qdutils;
View
2  libgralloc/framebuffer.cpp
@@ -328,7 +328,7 @@ int mapFrameBufferLocked(struct private_module_t* module)
size_t fbSize = roundUpToPageSize(finfo.line_length * info.yres)*
module->numBuffers;
module->framebuffer = new private_handle_t(fd, fbSize,
- private_handle_t::PRIV_FLAGS_USES_PMEM,
+ private_handle_t::PRIV_FLAGS_USES_ION,
BUFFER_TYPE_UI,
module->fbFormat, info.xres, info.yres);
void* vaddr = mmap(0, fbSize, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
View
15 libgralloc/gpu.cpp
@@ -84,15 +84,14 @@ int gpu_context_t::gralloc_alloc_framebuffer_locked(size_t size, int usage,
return -ENOMEM;
}
- // create a "fake" handles for it
- // Set the PMEM flag as well, since adreno
- // treats the FB memory as pmem
+ // create a "fake" handle for it
intptr_t vaddr = intptr_t(m->framebuffer->base);
- private_handle_t* hnd = new private_handle_t(dup(m->framebuffer->fd), bufferSize,
- private_handle_t::PRIV_FLAGS_USES_PMEM |
- private_handle_t::PRIV_FLAGS_FRAMEBUFFER,
- BUFFER_TYPE_UI, m->fbFormat, m->info.xres,
- m->info.yres);
+ private_handle_t* hnd = new private_handle_t(
+ dup(m->framebuffer->fd), bufferSize,
+ private_handle_t::PRIV_FLAGS_USES_ION |
+ private_handle_t::PRIV_FLAGS_FRAMEBUFFER,
+ BUFFER_TYPE_UI, m->fbFormat, m->info.xres,
+ m->info.yres);
// find a free slot
for (uint32_t i=0 ; i<numBuffers ; i++) {
View
8 libgralloc/ionalloc.cpp
@@ -69,14 +69,18 @@ int IonAlloc::alloc_buffer(alloc_data& data)
struct ion_handle_data handle_data;
struct ion_fd_data fd_data;
struct ion_allocation_data ionAllocData;
-
void *base = 0;
ionAllocData.len = data.size;
ionAllocData.align = data.align;
- ionAllocData.heap_mask = data.flags;
+ ionAllocData.heap_mask = data.flags & ~ION_SECURE;
ionAllocData.flags = data.uncached ? 0 : ION_FLAG_CACHED;
+ // ToDo: replace usage of alloc data structure with
+ // ionallocdata structure.
+ if (data.flags & ION_SECURE)
+ ionAllocData.flags |= ION_SECURE;
+
err = open_device();
if (err)
return err;
View
6 libhwcomposer/Android.mk
@@ -1,6 +1,7 @@
LOCAL_PATH := $(call my-dir)
include $(LOCAL_PATH)/../common.mk
include $(CLEAR_VARS)
+
LOCAL_MODULE := hwcomposer.$(TARGET_BOARD_PLATFORM)
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_MODULE_TAGS := optional
@@ -8,8 +9,7 @@ LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
LOCAL_SHARED_LIBRARIES := $(common_libs) libEGL liboverlay libgenlock \
libexternal libqdutils libhardware_legacy \
libdl libmemalloc libqservice
-
-LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"hwcomposer\"
+LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdhwcomposer\"
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
LOCAL_SRC_FILES := hwc.cpp \
hwc_video.cpp \
@@ -17,6 +17,6 @@ LOCAL_SRC_FILES := hwc.cpp \
hwc_uevents.cpp \
hwc_vsync.cpp \
hwc_fbupdate.cpp \
- hwc_mdpcomp.cpp \
+ hwc_mdpcomp.cpp
include $(BUILD_SHARED_LIBRARY)
View
2  libhwcomposer/hwc.cpp
@@ -127,8 +127,8 @@ static int hwc_prepare_primary(hwc_composer_device_1 *dev,
if(!MDPComp::configure(ctx, list)) {
VideoOverlay::prepare(ctx, list, HWC_DISPLAY_PRIMARY);
FBUpdate::prepare(ctx, fbLayer, HWC_DISPLAY_PRIMARY);
- ctx->mLayerCache[HWC_DISPLAY_PRIMARY]->updateLayerCache(list);
}
+ ctx->mLayerCache[HWC_DISPLAY_PRIMARY]->updateLayerCache(list);
}
}
return 0;
View
27 libhwcomposer/hwc_utils.cpp
@@ -238,15 +238,25 @@ int hwc_sync(hwc_context_t *ctx, hwc_display_contents_1_t* list, int dpy) {
int count = 0;
int releaseFd = -1;
int fbFd = -1;
+ bool swapzero = false;
data.flags = MDP_BUF_SYNC_FLAG_WAIT;
data.acq_fen_fd = acquireFd;
data.rel_fen_fd = &releaseFd;
+ char property[PROPERTY_VALUE_MAX];
+ if(property_get("debug.egl.swapinterval", property, "1") > 0) {
+ if(atoi(property) == 0)
+ swapzero = true;
+ }
+
//Accumulate acquireFenceFds
for(uint32_t i = 0; i < list->numHwLayers; i++) {
if((list->hwLayers[i].compositionType == HWC_OVERLAY ||
list->hwLayers[i].compositionType == HWC_FRAMEBUFFER_TARGET) &&
list->hwLayers[i].acquireFenceFd != -1 ){
- acquireFd[count++] = list->hwLayers[i].acquireFenceFd;
+ if(UNLIKELY(swapzero))
+ acquireFd[count++] = -1;
+ else
+ acquireFd[count++] = list->hwLayers[i].acquireFenceFd;
}
}
@@ -254,7 +264,8 @@ int hwc_sync(hwc_context_t *ctx, hwc_display_contents_1_t* list, int dpy) {
fbFd = ctx->dpyAttr[dpy].fd;
//Waits for acquire fences, returns a release fence
- ret = ioctl(fbFd, MSMFB_BUFFER_SYNC, &data);
+ if(LIKELY(!swapzero))
+ ret = ioctl(fbFd, MSMFB_BUFFER_SYNC, &data);
if(ret < 0) {
ALOGE("ioctl MSMFB_BUFFER_SYNC failed, err=%s",
strerror(errno));
@@ -269,10 +280,18 @@ int hwc_sync(hwc_context_t *ctx, hwc_display_contents_1_t* list, int dpy) {
list->hwLayers[i].acquireFenceFd = -1;
}
//Populate releaseFenceFds.
- list->hwLayers[i].releaseFenceFd = dup(releaseFd);
+ if(UNLIKELY(swapzero))
+ list->hwLayers[i].releaseFenceFd = -1;
+ else
+ list->hwLayers[i].releaseFenceFd = dup(releaseFd);
}
}
- list->retireFenceFd = releaseFd;
+ if(UNLIKELY(swapzero)){
+ list->retireFenceFd = -1;
+ close(releaseFd);
+ } else {
+ list->retireFenceFd = releaseFd;
+ }
return ret;
}
View
1  liblight/Android.mk
@@ -20,6 +20,7 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := lights.c
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_SHARED_LIBRARIES := liblog
+LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdlights\"
LOCAL_MODULE := lights.$(TARGET_BOARD_PLATFORM)
LOCAL_MODULE_TAGS := optional
View
1  liblight/lights.c
@@ -16,7 +16,6 @@
// #define LOG_NDEBUG 0
-#define LOG_TAG "lights"
#include <cutils/log.h>
View
3  liboverlay/Android.mk
@@ -1,12 +1,13 @@
LOCAL_PATH := $(call my-dir)
include $(LOCAL_PATH)/../common.mk
include $(CLEAR_VARS)
+
LOCAL_MODULE := liboverlay
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
LOCAL_SHARED_LIBRARIES := $(common_libs) libqdutils libmemalloc
-LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"overlay\"
+LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdoverlay\"
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
LOCAL_SRC_FILES := \
overlay.cpp \
View
3  liboverlay/overlayMdp.cpp
@@ -18,9 +18,6 @@
#include "overlayUtils.h"
#include "overlayMdp.h"
-#undef ALOG_TAG
-#define ALOG_TAG "overlay"
-
namespace ovutils = overlay::utils;
namespace overlay {
View
6 liboverlay/overlayMdssRot.cpp
@@ -20,6 +20,12 @@
#include "overlayUtils.h"
#include "overlayRotator.h"
+#ifdef VENUS_COLOR_FORMAT
+#include <media/msm_media_info.h>
+#else
+#define VENUS_BUFFER_SIZE(args...) 0
+#endif
+
#ifndef MDSS_MDP_ROT_ONLY
#define MDSS_MDP_ROT_ONLY 0x80
#endif
View
3  libqdutils/Android.mk
@@ -6,8 +6,9 @@ LOCAL_MODULE := libqdutils
LOCAL_MODULE_TAGS := optional
LOCAL_SHARED_LIBRARIES := $(common_libs)
LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
-LOCAL_CFLAGS := $(common_flags)
+LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdutils\"
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
LOCAL_SRC_FILES := profiler.cpp mdp_version.cpp \
idle_invalidator.cpp
+
include $(BUILD_SHARED_LIBRARY)
View
1  libqdutils/profiler.cpp
@@ -27,7 +27,6 @@
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#define LOG_TAG "CALCFPS"
#define LOG_NDDEBUG 0
#include "profiler.h"
View
3  libqservice/Android.mk
@@ -1,12 +1,13 @@
LOCAL_PATH := $(call my-dir)
include $(LOCAL_PATH)/../common.mk
include $(CLEAR_VARS)
+
LOCAL_MODULE := libqservice
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
LOCAL_SHARED_LIBRARIES := $(common_libs) libexternal libbinder
-LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qService\"
+LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdqservice\"
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
LOCAL_SRC_FILES := QService.cpp \
IQService.cpp
View
3  libtilerenderer/Android.mk
@@ -5,6 +5,7 @@ include $(CLEAR_VARS)
ifeq ($(USE_OPENGL_RENDERER),true)
LOCAL_MODULE := libtilerenderer
LOCAL_MODULE_TAGS := optional
+LOCAL_CFLAGS := -DLOG_TAG=\"qdtilerenderer\"
LOCAL_C_INCLUDES := \
frameworks/base/include/utils \
frameworks/base/libs/hwui \
@@ -15,8 +16,8 @@ LOCAL_C_INCLUDES := \
external/skia/include/utils \
hardware/libhardware/include/hardware \
frameworks/base/opengl/include/GLES2
-
LOCAL_SHARED_LIBRARIES := $(common_libs) libGLESv2 libhwui
LOCAL_SRC_FILES := tilerenderer.cpp
+
include $(BUILD_SHARED_LIBRARY)
endif

0 comments on commit 3427243

Please sign in to comment.
Something went wrong with that request. Please try again.