summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaldev Sahu <bsahu@codeaurora.org>2014-11-13 17:58:18 +0530
committerSteve Kondik <steve@cyngn.com>2015-03-25 21:08:17 -0700
commita106a78b14553a6b877f5d4d00a60a19436a6c20 (patch)
treecd2006ecfaf1cbf6b485e1fb4c1de39afa40bd4c
parentcb45efb60744d651afb4e535dd40bb0fb495dff7 (diff)
downloadandroid_hardware_qcom_display-stable/cm-12.1-caf-8916-YOG3C.tar.gz
android_hardware_qcom_display-stable/cm-12.1-caf-8916-YOG3C.tar.bz2
android_hardware_qcom_display-stable/cm-12.1-caf-8916-YOG3C.zip
hwc: Add secure display attributestable/cm-12.1-caf-8916-YOG3C
- 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 15334d91e..9a66d89a6 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -786,6 +786,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,
};
@@ -820,6 +821,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 3874e9bdd..75d4698bd 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -229,6 +229,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 c67fa7a11..8545e14c8 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -92,6 +92,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.