hwc: Set DMA state at the start of composition
* Set DMA state at the start of the composition cycle based on the following. Set it to LINE_MODE if the number of active rotator sessions are 0. Set it to BLOCK_MODE if ** A yuv-layer for any display-device requires rotation ** (or) mExtOrientation is set ** (or) mBufferMirrorMode is set * Separate out the reset helper function into more modular ones Change-Id: I6a22ac4379565cd1fd2d875a7a417f4ed3ee0f1e
This commit is contained in:
@@ -865,13 +865,6 @@ void setListStats(hwc_context_t *ctx,
|
||||
ctx->listStats[dpy].yuv4k2kIndices[yuv4k2kCount] = (int)i;
|
||||
yuv4k2kCount++;
|
||||
}
|
||||
|
||||
if((layer->transform & HWC_TRANSFORM_ROT_90) &&
|
||||
canUseRotator(ctx, dpy)) {
|
||||
if(ctx->mOverlay->isPipeTypeAttached(OV_MDP_PIPE_DMA))
|
||||
ctx->isPaddingRound = true;
|
||||
Overlay::setDMAMode(Overlay::DMA_BLOCK_MODE);
|
||||
}
|
||||
}
|
||||
if(layer->blending == HWC_BLENDING_PREMULT)
|
||||
ctx->listStats[dpy].preMultipliedAlpha = true;
|
||||
@@ -894,25 +887,6 @@ void setListStats(hwc_context_t *ctx,
|
||||
}
|
||||
}
|
||||
}
|
||||
if(dpy) {
|
||||
//uncomment the below code for testing purpose.
|
||||
/* char value[PROPERTY_VALUE_MAX];
|
||||
property_get("sys.ext_orientation", value, "0");
|
||||
// Assuming the orientation value is in terms of HAL_TRANSFORM,
|
||||
// This needs mapping to HAL, if its in different convention
|
||||
ctx->mExtOrientation = atoi(value); */
|
||||
// Assuming the orientation value is in terms of HAL_TRANSFORM,
|
||||
// This needs mapping to HAL, if its in different convention
|
||||
if(ctx->mExtOrientation || ctx->mBufferMirrorMode) {
|
||||
ALOGD_IF(HWC_UTILS_DEBUG, "%s: ext orientation = %d"
|
||||
"BufferMirrorMode = %d", __FUNCTION__,
|
||||
ctx->mExtOrientation, ctx->mBufferMirrorMode);
|
||||
if(ctx->mOverlay->isPipeTypeAttached(OV_MDP_PIPE_DMA)) {
|
||||
ctx->isPaddingRound = true;
|
||||
}
|
||||
Overlay::setDMAMode(Overlay::DMA_BLOCK_MODE);
|
||||
}
|
||||
}
|
||||
|
||||
//The marking of video begin/end is useful on some targets where we need
|
||||
//to have a padding round to be able to shift pipes across mixers.
|
||||
|
||||
Reference in New Issue
Block a user