summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaldev Sahu <bsahu@codeaurora.org>2014-11-13 17:58:18 +0530
committerEthan Chen <intervigil@gmail.com>2015-03-16 13:42:19 -0700
commitb01ae24693ba7076410ecb8cfb93f3908f84fe7c (patch)
tree41f49b45a6218ff15844f00f040cd3151496cc27
parent8ebdf61dcb7263479707a0d4c35bde084e222bec (diff)
downloadandroid_hardware_qcom_display-cm-12.0-caf-8916.tar.gz
android_hardware_qcom_display-cm-12.0-caf-8916.tar.bz2
android_hardware_qcom_display-cm-12.0-caf-8916.zip
- 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: I7ac273aeb845c4762dc0690c7b88841c911c044b
-rw-r--r--libhwcomposer/hwc.cpp4
-rw-r--r--libhwcomposer/hwc_utils.cpp1
-rw-r--r--libhwcomposer/hwc_utils.h1
3 files changed, 6 insertions, 0 deletions
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index 68f301fd9..69faf7b7f 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -780,6 +780,7 @@ int hwc_getDisplayAttributes(struct hwc_composer_device_1* dev, int disp,
HWC_DISPLAY_HEIGHT,
HWC_DISPLAY_DPI_X,
HWC_DISPLAY_DPI_Y,
+ HWC_DISPLAY_SECURE,
HWC_DISPLAY_NO_ATTRIBUTE,
};
@@ -814,6 +815,9 @@ int hwc_getDisplayAttributes(struct hwc_composer_device_1* dev, int disp,
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]);
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index 651084c03..be2e1f351 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -227,6 +227,7 @@ static int openFramebufferDevice(hwc_context_t *ctx)
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].dynRefreshRate = (uint32_t)fps;
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].vsync_period =
(uint32_t)(1000000000l / fps);
+ ctx->dpyAttr[HWC_DISPLAY_PRIMARY].secure = true;
//To change resolution of primary display
changeResolution(ctx, info.xres, info.yres, info.width, info.height);
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index 61aeb917c..5a6b2a394 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -88,6 +88,7 @@ struct DisplayAttributes {
uint32_t stride;
float xdpi;
float ydpi;
+ bool secure;
int fd;
bool connected; //Applies only to pluggable disp.
//Connected does not mean it ready to use.