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
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index b091ae2..5f5a887 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -128,6 +128,10 @@
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 @@
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);