Implement display blank function.
am: ddb9b7fce0
Change-Id: I2a90a68a2363455e8bc4f5713accd1804c7a1fde
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 @@
{
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 @@
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