hwc: vds: Add support for black frame generation on PWR suspend
If VDS is connected, do not clear WB object as it will end up
detaching IOMMU. We need to keep the WB session active in order
to send a black frame to WFD sink on power suspend.
For AD use case, we will keep the WB object active.
Change-Id: Ic6db255676ca0baafd468887fc3f88eafc581cea
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index 431757d..34cc6e9 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -341,7 +341,11 @@
ctx->mOverlay->configBegin();
ctx->mOverlay->configDone();
ctx->mRotMgr->clear();
- overlay::Writeback::clear();
+ // If VDS is connected, do not clear WB object as it
+ // will end up detaching IOMMU. This is required
+ // to send black frame to WFD sink on power suspend.
+ // Note: With this change, we keep the WriteBack object
+ // alive on power suspend for AD use case.
}
switch(dpy) {
case HWC_DISPLAY_PRIMARY: