hwc: Add support for Secure display

- Identify secure display layer in the hwc_list
- Need to set both SECURE_OVERLAY and SECURE_DISPLAY flags for the secure
  display layer
- Disable idle timeout for secure display usecase, as GPU should not be
  accessing secure display layer

Change-Id: I555910db77c466b5e103b24b4f0ec7f47bb210a5
This commit is contained in:
Ramkumar Radhakrishnan
2013-08-30 18:41:07 -07:00
committed by Arun Kumar K.R
parent 164f6d038e
commit ba713389c2
6 changed files with 27 additions and 1 deletions

View File

@@ -710,6 +710,7 @@ void setListStats(hwc_context_t *ctx,
ctx->listStats[dpy].isDisplayAnimating = false;
ctx->listStats[dpy].roi = ovutils::Dim(0, 0,
(int)ctx->dpyAttr[dpy].xres, (int)ctx->dpyAttr[dpy].yres);
ctx->listStats[dpy].secureUI = false;
optimizeLayerRects(ctx, list, dpy);
@@ -721,6 +722,9 @@ void setListStats(hwc_context_t *ctx,
if (layer->flags & HWC_SCREENSHOT_ANIMATOR_LAYER) {
ctx->listStats[dpy].isDisplayAnimating = true;
}
if(isSecureDisplayBuffer(hnd)) {
ctx->listStats[dpy].secureUI = true;
}
#endif
// continue if number of app layers exceeds MAX_NUM_APP_LAYERS
if(ctx->listStats[dpy].numAppLayers > MAX_NUM_APP_LAYERS)
@@ -1246,6 +1250,13 @@ void setMdpFlags(hwc_layer_1_t *layer,
}
}
if(isSecureDisplayBuffer(hnd)) {
// Secure display needs both SECURE_OVERLAY and SECURE_DISPLAY_OV
ovutils::setMdpFlags(mdpFlags,
ovutils::OV_MDP_SECURE_OVERLAY_SESSION);
ovutils::setMdpFlags(mdpFlags,
ovutils::OV_MDP_SECURE_DISPLAY_OVERLAY_SESSION);
}
//No 90 component and no rot-downscale then flips done by MDP
//If we use rot then it might as well do flips
if(!(transform & HWC_TRANSFORM_ROT_90) && !rotDownscale) {