Merge remote-tracking branch 'caf/jb' into jelly

Conflicts:
	common.mk

Change-Id: I512d7e14264192b716e0c5921b685e995853d4f6
This commit is contained in:
Andrew Sutherland 2012-08-07 22:00:43 -05:00
commit 8d111e9b7f
9 changed files with 27 additions and 10 deletions

View File

@ -16,9 +16,12 @@ common_libs := liblog libutils libcutils libhardware
#Common C flags
common_flags := -DDEBUG_CALC_FPS -Wno-missing-field-initializers
common_flags += -Werror
ifeq ($(TARGET_USES_ION),true)
common_flags += -DUSE_ION
endif
ifeq ($(ARCH_ARM_HAVE_NEON),true)
common_flags += -D__ARM_HAVE_NEON
endif

View File

@ -450,7 +450,7 @@ static int set_image( uint32 surfaceId, const struct copybit_image_t *rhs,
info.height = rhs->h;
info.format = rhs->format;
yuvPlaneInfo yuvInfo;
yuvPlaneInfo yuvInfo = {0};
status = calculate_yuv_offset_and_stride(info, yuvInfo);
if(status != COPYBIT_SUCCESS) {
ALOGE("%s: calculate_yuv_offset_and_stride error", __FUNCTION__);
@ -705,7 +705,7 @@ static void set_rects(struct copybit_context_t *ctx,
/** copy the bits */
static int msm_copybit(struct copybit_context_t *dev, blitlist *list, uint32 target)
{
int objects;
unsigned int objects;
for(objects = 0; objects < list->count; objects++) {
list->blitObjects[objects].next = &(list->blitObjects[objects+1]);

View File

@ -20,7 +20,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM)
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := $(common_includes)
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\"

View File

@ -165,7 +165,7 @@ int IonController::allocate(alloc_data& data, int usage)
IMemAlloc* IonController::getAllocator(int flags)
{
IMemAlloc* memalloc;
IMemAlloc* memalloc = NULL;
if (flags & private_handle_t::PRIV_FLAGS_USES_ION) {
memalloc = mIonAlloc;
} else {

View File

@ -125,6 +125,15 @@ void MDPComp::timeout_handler(void *udata) {
proc->invalidate(proc);
}
void MDPComp::reset_comp_type(hwc_layer_list_t* list) {
for(uint32_t i = 0 ; i < list->numHwLayers; i++ ) {
hwc_layer_t* l = &list->hwLayers[i];
if(l->compositionType == HWC_OVERLAY)
l->compositionType = HWC_FRAMEBUFFER;
}
}
void MDPComp::reset( hwc_context_t *ctx, hwc_layer_list_t* list ) {
sCurrentFrame.count = 0;
free(sCurrentFrame.pipe_layer);
@ -333,8 +342,7 @@ int MDPComp::prepare(hwc_context_t *ctx, hwc_layer_t *layer,
* 5. Overlay in use
*/
bool MDPComp::is_doable(hwc_composer_device_t *dev,
const hwc_layer_list_t* list) {
bool MDPComp::is_doable(hwc_composer_device_t *dev, hwc_layer_list_t* list) {
hwc_context_t* ctx = (hwc_context_t*)(dev);
if(!ctx) {
@ -343,7 +351,7 @@ bool MDPComp::is_doable(hwc_composer_device_t *dev,
}
//Number of layers
if(list->numHwLayers < 1 || list->numHwLayers > sMaxLayers) {
if(list->numHwLayers < 1 || list->numHwLayers > (uint32_t) sMaxLayers) {
ALOGD_IF(isDebug(), "%s: Unsupported number of layers",__FUNCTION__);
return false;
}
@ -355,6 +363,7 @@ bool MDPComp::is_doable(hwc_composer_device_t *dev,
//FB composition on idle timeout
if(sIdleFallBack) {
reset_comp_type(list);
ALOGD_IF(isDebug(), "%s: idle fallback",__FUNCTION__);
return false;
}

View File

@ -180,8 +180,7 @@ private:
mdp_pipe_info& mdp_info);
/* checks for conditions where mdpcomp is not possible */
static bool is_doable(hwc_composer_device_t *dev,
const hwc_layer_list_t* list);
static bool is_doable(hwc_composer_device_t *dev, hwc_layer_list_t* list);
static bool setup(hwc_context_t* ctx, hwc_layer_list_t* list);
@ -210,6 +209,8 @@ private:
/* reset state */
static void reset( hwc_context_t *ctx, hwc_layer_list_t* list );
/* reset compostiion type to default */
static void reset_comp_type(hwc_layer_list_t* list);
/* Is feature enabled */
static bool isEnabled() { return sMaxLayers ? true : false; };

View File

@ -79,10 +79,11 @@ static void handle_uevent(hwc_context_t* ctx, const char* udata, int len)
int connected = 0;
if(!(strncmp(str,"online@",strlen("online@")))) {
connected = 1;
ctx->mExtDisplay->setExternalDisplay(connected);
} else if(!(strncmp(str,"offline@",strlen("offline@")))) {
connected = 0;
ctx->mExtDisplay->setExternalDisplay(connected);
}
ctx->mExtDisplay->setExternalDisplay(connected);
}
}

View File

@ -160,6 +160,7 @@ bool UIMirrorOverlay::draw(hwc_context_t *ctx)
while(m->fbPostDone == false) {
pthread_cond_wait(&(m->fbPostCond), &(m->fbPostLock));
}
m->fbPostDone = false;
pthread_mutex_unlock(&m->fbPostLock);
switch (state) {
case ovutils::OV_UI_MIRROR:

View File

@ -160,6 +160,8 @@ bool configPrimVid(hwc_context_t *ctx, hwc_layer_t *layer) {
dcrop.w = sourceCrop.right - sourceCrop.left;
dcrop.h = sourceCrop.bottom - sourceCrop.top;
dpos.x = displayFrame.left;
dpos.y = displayFrame.top;
dpos.w = displayFrame.right - displayFrame.left;
dpos.h = displayFrame.bottom - displayFrame.top;
}