Merge "Display and wfd synchronization during teardown"

This commit is contained in:
Linux Build Service Account
2014-04-17 03:52:54 -07:00
committed by Gerrit - the friendly Code Review server
9 changed files with 118 additions and 31 deletions

View File

@@ -184,6 +184,7 @@ static int openFramebufferDevice(hwc_context_t *ctx)
void initContext(hwc_context_t *ctx)
{
openFramebufferDevice(ctx);
char value[PROPERTY_VALUE_MAX];
ctx->mMDP.version = qdutils::MDPVersion::getInstance().getMDPVersion();
ctx->mMDP.hasOverlay = qdutils::MDPVersion::getInstance().hasOverlay();
ctx->mMDP.panel = qdutils::MDPVersion::getInstance().getPanelType();
@@ -225,7 +226,14 @@ void initContext(hwc_context_t *ctx)
ctx->mMDPComp[HWC_DISPLAY_PRIMARY] =
MDPComp::getObject(ctx, HWC_DISPLAY_PRIMARY);
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].connected = true;
ctx->mHWCVirtual = HWCVirtualBase::getObject();
ctx->mVDSEnabled = false;
if((property_get("persist.hwc.enable_vds", value, NULL) > 0)) {
if(atoi(value) != 0) {
ctx->mVDSEnabled = true;
}
}
ctx->mHWCVirtual = HWCVirtualBase::getObject(ctx->mVDSEnabled);
for (uint32_t i = 0; i < HWC_NUM_DISPLAY_TYPES; i++) {
ctx->mHwcDebug[i] = new HwcDebug(i);
@@ -262,7 +270,6 @@ void initContext(hwc_context_t *ctx)
// Read the system property to determine if downscale feature is enabled.
ctx->mMDPDownscaleEnabled = false;
char value[PROPERTY_VALUE_MAX];
if(property_get("sys.hwc.mdp_downscale_enabled", value, "false")
&& !strcmp(value, "true")) {
ctx->mMDPDownscaleEnabled = true;
@@ -642,6 +649,21 @@ int getMirrorModeOrientation(hwc_context_t *ctx) {
return extOrientation;
}
/* Get External State names */
const char* getExternalDisplayState(uint32_t external_state) {
static const char* externalStates[EXTERNAL_MAXSTATES] = {0};
externalStates[EXTERNAL_OFFLINE] = STR(EXTERNAL_OFFLINE);
externalStates[EXTERNAL_ONLINE] = STR(EXTERNAL_ONLINE);
externalStates[EXTERNAL_PAUSE] = STR(EXTERNAL_PAUSE);
externalStates[EXTERNAL_RESUME] = STR(EXTERNAL_RESUME);
if(external_state >= EXTERNAL_MAXSTATES) {
return "EXTERNAL_INVALID";
}
return externalStates[external_state];
}
bool isDownscaleRequired(hwc_layer_1_t const* layer) {
hwc_rect_t displayFrame = layer->displayFrame;
hwc_rect_t sourceCrop = integerizeSourceCrop(layer->sourceCropf);