Merge "hwc: Add msm8x09 version checks in HAL."

This commit is contained in:
Linux Build Service Account
2014-10-11 21:21:45 -07:00
committed by Gerrit - the friendly Code Review server
3 changed files with 15 additions and 8 deletions

View File

@@ -352,7 +352,8 @@ bool CopyBit::prepare(hwc_context_t *ctx, hwc_display_contents_1_t *list,
}
//Allocate render buffers if they're not allocated
if (ctx->mMDP.version != qdutils::MDP_V3_0_4 &&
if ((ctx->mMDP.version != qdutils::MDP_V3_0_4 &&
ctx->mMDP.version != qdutils::MDP_V3_0_5) &&
(useCopybitForYUV || useCopybitForRGB)) {
int ret = allocRenderBuffers(mAlignedWidth,
mAlignedHeight,
@@ -378,7 +379,8 @@ bool CopyBit::prepare(hwc_context_t *ctx, hwc_display_contents_1_t *list,
for (int i = ctx->listStats[dpy].numAppLayers-1; i >= 0 ; i--) {
layerProp[i].mFlags |= HWC_COPYBIT;
#ifdef QCOM_BSP
if (ctx->mMDP.version == qdutils::MDP_V3_0_4)
if (ctx->mMDP.version == qdutils::MDP_V3_0_4 ||
ctx->mMDP.version == qdutils::MDP_V3_0_5)
list->hwLayers[i].compositionType = HWC_BLIT;
else
#endif
@@ -499,7 +501,8 @@ bool CopyBit::draw(hwc_context_t *ctx, hwc_display_contents_1_t *list,
return true;
}
//render buffer
if (ctx->mMDP.version == qdutils::MDP_V3_0_4) {
if (ctx->mMDP.version == qdutils::MDP_V3_0_4 ||
ctx->mMDP.version == qdutils::MDP_V3_0_5) {
last = (uint32_t)list->numHwLayers - 1;
renderBuffer = (private_handle_t *)list->hwLayers[last].handle;
} else {
@@ -574,7 +577,8 @@ bool CopyBit::draw(hwc_context_t *ctx, hwc_display_contents_1_t *list,
copybit_device_t *copybit = getCopyBitDevice();
// Async mode
copybit->flush_get_fence(copybit, fd);
if(ctx->mMDP.version == qdutils::MDP_V3_0_4 &&
if((ctx->mMDP.version == qdutils::MDP_V3_0_4 ||
ctx->mMDP.version == qdutils::MDP_V3_0_5) &&
list->hwLayers[last].acquireFenceFd >= 0) {
close(list->hwLayers[last].acquireFenceFd);
list->hwLayers[last].acquireFenceFd = -1;

View File

@@ -283,8 +283,10 @@ void initContext(hwc_context_t *ctx)
// Only MDP copybit is used
if ((compositionType & (qdutils::COMPOSITION_TYPE_DYN |
qdutils::COMPOSITION_TYPE_MDP)) &&
((qdutils::MDPVersion::getInstance().getMDPVersion() ==
qdutils::MDP_V3_0_4) ||
(qdutils::MDPVersion::getInstance().getMDPVersion() ==
qdutils::MDP_V3_0_4)) {
qdutils::MDP_V3_0_5))) {
ctx->mCopyBit[HWC_DISPLAY_PRIMARY] = new CopyBit(ctx,
HWC_DISPLAY_PRIMARY);
}
@@ -2189,7 +2191,8 @@ bool canUseRotator(hwc_context_t *ctx, int dpy) {
if(dpy == HWC_DISPLAY_PRIMARY)
return false;
}
if(ctx->mMDP.version == qdutils::MDP_V3_0_4)
if((ctx->mMDP.version == qdutils::MDP_V3_0_4)
||(ctx->mMDP.version == qdutils::MDP_V3_0_5))
return false;
return true;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -387,7 +387,7 @@ int Overlay::initOverlay() {
}
}
if (mdpVersion < qdutils::MDSS_V5 && mdpVersion != qdutils::MDP_V3_0_4) {
if (mdpVersion < qdutils::MDSS_V5 && mdpVersion > qdutils::MDP_V3_0_5) {
msmfb_mixer_info_req req;
mdp_mixer_info *minfo = NULL;
char name[64];