summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Hu <austin.hu@intel.com>2017-05-10 07:17:35 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-05-10 07:17:35 +0000
commit5771ac857c7101382c8487d1a73c32bf549b541d (patch)
treeb542391dbb1f5d709d4cf1c3d474120fc2d9e0fd
parent7fe2b490b8b3e9c8c82ac9eeb3d0422e18d3eae8 (diff)
parentddb9b7fce03c36a660cd633b19191d9ce23c023b (diff)
downloadhwcomposer-5771ac857c7101382c8487d1a73c32bf549b541d.tar.gz
Implement display blank function.
am: ddb9b7fce0 Change-Id: I2a90a68a2363455e8bc4f5713accd1804c7a1fde
-rwxr-xr-xmoorefield_hdmi/common/base/Drm.cpp4
-rw-r--r--moorefield_hdmi/ips/common/BlankControl.cpp6
2 files changed, 6 insertions, 4 deletions
diff --git a/moorefield_hdmi/common/base/Drm.cpp b/moorefield_hdmi/common/base/Drm.cpp
index 3e5138a..e1c7a46 100755
--- a/moorefield_hdmi/common/base/Drm.cpp
+++ b/moorefield_hdmi/common/base/Drm.cpp
@@ -509,6 +509,10 @@ bool Drm::setDpmsMode(int device, int mode)
{
Mutex::Autolock _l(mLock);
+#ifdef INTEL_SUPPORT_HDMI_PRIMARY
+ device = IDisplayDevice::DEVICE_EXTERNAL;
+#endif
+
int output = getOutputIndex(device);
if (output < 0 ) {
return false;
diff --git a/moorefield_hdmi/ips/common/BlankControl.cpp b/moorefield_hdmi/ips/common/BlankControl.cpp
index 53e2bc7..4d7c197 100644
--- a/moorefield_hdmi/ips/common/BlankControl.cpp
+++ b/moorefield_hdmi/ips/common/BlankControl.cpp
@@ -33,10 +33,8 @@ BlankControl::~BlankControl()
bool BlankControl::blank(int disp, bool blank)
{
- // current do nothing but return true
- // use PM to trigger screen blank/unblank
- VLOGTRACE("blank is not supported yet, disp %d, blank %d", disp, blank);
- return true;
+ Drm *drm = Hwcomposer::getInstance().getDrm();
+ return drm->setDpmsMode(disp, !blank);
}
} // namespace intel