Merge "hwc: Add support for secure RGB layer"

This commit is contained in:
Linux Build Service Account
2014-08-24 13:52:07 -07:00
committed by Gerrit - the friendly Code Review server
4 changed files with 145 additions and 15 deletions

View File

@@ -840,6 +840,7 @@ void setListStats(hwc_context_t *ctx,
ctx->listStats[dpy].yuv4k2kCount = 0;
ctx->dpyAttr[dpy].mActionSafePresent = isActionSafePresent(ctx, dpy);
ctx->listStats[dpy].renderBufIndexforABC = -1;
ctx->listStats[dpy].secureRGBCount = 0;
resetROI(ctx, dpy);
@@ -867,6 +868,12 @@ void setListStats(hwc_context_t *ctx,
if (isSecureBuffer(hnd)) {
ctx->listStats[dpy].isSecurePresent = true;
if(not isYuvBuffer(hnd)) {
// cache secureRGB layer parameters like we cache for YUV layers
int& secureRGBCount = ctx->listStats[dpy].secureRGBCount;
ctx->listStats[dpy].secureRGBIndices[secureRGBCount] = (int)i;
secureRGBCount++;
}
}
if (isSkipLayer(&list->hwLayers[i])) {
@@ -1472,22 +1479,20 @@ void setMdpFlags(hwc_context_t *ctx, hwc_layer_1_t *layer,
ovutils::OV_MDP_BLEND_FG_PREMULT);
}
if(isYuvBuffer(hnd)) {
if(isSecureBuffer(hnd)) {
ovutils::setMdpFlags(mdpFlags,
ovutils::OV_MDP_SECURE_OVERLAY_SESSION);
}
if(metadata && (metadata->operation & PP_PARAM_INTERLACED) &&
metadata->interlaced) {
ovutils::setMdpFlags(mdpFlags,
ovutils::OV_MDP_DEINTERLACE);
}
if(metadata && (metadata->operation & PP_PARAM_INTERLACED) &&
metadata->interlaced) {
ovutils::setMdpFlags(mdpFlags,
ovutils::OV_MDP_DEINTERLACE);
}
// Mark MDP flags with SECURE_OVERLAY_SESSION for driver
if(isSecureBuffer(hnd)) {
ovutils::setMdpFlags(mdpFlags,
ovutils::OV_MDP_SECURE_OVERLAY_SESSION);
}
if(isSecureDisplayBuffer(hnd)) {
// Secure display needs both SECURE_OVERLAY and SECURE_DISPLAY_OV
ovutils::setMdpFlags(mdpFlags,
ovutils::OV_MDP_SECURE_OVERLAY_SESSION);
// Mark MDP flags with SECURE_DISPLAY_OVERLAY_SESSION for driver
ovutils::setMdpFlags(mdpFlags,
ovutils::OV_MDP_SECURE_DISPLAY_OVERLAY_SESSION);
}