hwc: Add secure display attribute

- External displays can be secure or non-secure based on HDCP
- Propogate this to the SF with the getDisplayConfig
- Non-virtual displays(pri and hdmi) are considered to be secure
- For WFD using V4L2 archiecture, read the HDCP status from the
  sysfs and update accordingly

Change-Id: I4aaf303f0770201b8ca4f8a1c578bed61054bcfb
This commit is contained in:
Arun Kumar K.R
2014-08-21 18:43:53 -07:00
committed by Gerrit - the friendly Code Review server
parent 8f3e80c320
commit 074c9cfdaf
3 changed files with 10 additions and 0 deletions

View File

@@ -128,6 +128,10 @@ void updateDisplayInfo(hwc_context_t* ctx, int dpy) {
ctx->dpyAttr[dpy].yres = ctx->mHDMIDisplay->getHeight();
ctx->dpyAttr[dpy].mMDPScalingMode = ctx->mHDMIDisplay->getMDPScalingMode();
ctx->dpyAttr[dpy].vsync_period = ctx->mHDMIDisplay->getVsyncPeriod();
//FIXME: for now assume HDMI as secure
//Will need to read the HDCP status from the driver
//and update this accordingly
ctx->dpyAttr[dpy].secure = true;
ctx->mViewFrame[dpy].left = 0;
ctx->mViewFrame[dpy].top = 0;
ctx->mViewFrame[dpy].right = ctx->dpyAttr[dpy].xres;
@@ -224,6 +228,7 @@ static int openFramebufferDevice(hwc_context_t *ctx)
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].ydpi = ydpi;
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].refreshRate = (uint32_t)fps;
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].dynRefreshRate = (uint32_t)fps;
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].secure = true;
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].vsync_period =
(uint32_t)(1000000000l / fps);