hwc: Handle layers marked as PROTECTED flag as secure
- All secure layers are marked with GRALLOC_USAGE_PROTECTED,
irrespective of L1/L3, which should not fallback to GPU.
- In HWC, treat this layer as secure so that any fallbacks
will be avoided.
Change-Id: I399740bfb5910f3fda4c4f395e2f7b49ea8619a9
Crs-fixed: 842071
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index 4849baf..35bdbee 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -537,12 +537,12 @@
(hnd->width > maxPipeWidth));
}
-// Returns true if the buffer is secure
+// Returns true if the buffer is secure(using secure heap)
static inline bool isSecureBuffer(const private_handle_t* hnd) {
return (hnd && (private_handle_t::PRIV_FLAGS_SECURE_BUFFER & hnd->flags));
}
-// Returns true if the buffer is protected
+// Returns true if the buffer is protected(L3 using IOMMU heap)
static inline bool isProtectedBuffer(const private_handle_t* hnd) {
return (hnd && (private_handle_t::PRIV_FLAGS_PROTECTED_BUFFER & hnd->flags));
}