summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Hu <austin.hu@intel.com>2017-05-10 07:22:37 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-05-10 07:22:37 +0000
commit0f9d9dadc97db305a9962e2e603c5fa700fdc48a (patch)
treeb542391dbb1f5d709d4cf1c3d474120fc2d9e0fd
parent84d443eeb91c2cf051ead7ab2391d9b126c9ca25 (diff)
parent5771ac857c7101382c8487d1a73c32bf549b541d (diff)
downloadhwcomposer-0f9d9dadc97db305a9962e2e603c5fa700fdc48a.tar.gz
Implement display blank function. am: ddb9b7fce0
am: 5771ac857c Change-Id: I6bd70326e3cb394f8fe9cb7200d19d149e877bef
-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