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.cpp b/libhwcomposer/hwc.cpp
index 0a7f940..c96eb1e 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -799,6 +799,7 @@
HWC_DISPLAY_HEIGHT,
HWC_DISPLAY_DPI_X,
HWC_DISPLAY_DPI_Y,
+ HWC_DISPLAY_SECURE,
HWC_DISPLAY_NO_ATTRIBUTE,
};
@@ -844,6 +845,9 @@
case HWC_DISPLAY_DPI_Y:
values[i] = (int32_t) (ctx->dpyAttr[disp].ydpi*1000.0);
break;
+ case HWC_DISPLAY_SECURE:
+ values[i] = (int32_t) (ctx->dpyAttr[disp].secure);
+ break;
default:
ALOGE("Unknown display attribute %d",
attributes[i]);