libhwcomposer: libgralloc Set MDP_SMP_FORCE_ALLOC flag
For PROTECTED but NON SECURE layers set MDP_SMP_FORCE_ALLOC flag
to allow SMP allocation and prevent GPU fallback
In Such cases if video resolution changes dynamically
it fails to display layer due to GPU fallback.
Use this flag for FB layer composition and depricate
MDP_BACKEND_COMPOSITION flag.
Change-Id: I9ab7cbdd2e12b56dfa67d5b4b3ff6b2dcd0096be
diff --git a/libhwcomposer/hwc_fbupdate.cpp b/libhwcomposer/hwc_fbupdate.cpp
index 43ae916..3e16072 100644
--- a/libhwcomposer/hwc_fbupdate.cpp
+++ b/libhwcomposer/hwc_fbupdate.cpp
@@ -157,6 +157,8 @@
}
ovutils::eMdpFlags mdpFlags = ovutils::OV_MDP_BLEND_FG_PREMULT;
+ ovutils::setMdpFlags(mdpFlags,
+ ovutils::OV_MDP_SMP_FORCE_ALLOC);
ovutils::eZorder zOrder = static_cast<ovutils::eZorder>(fbZorder);
hwc_rect_t sourceCrop = integerizeSourceCrop(layer->sourceCropf);
@@ -280,6 +282,8 @@
overlay::Overlay& ov = *(ctx->mOverlay);
ovutils::eMdpFlags mdpFlags = ovutils::OV_MDP_BLEND_FG_PREMULT;
+ ovutils::setMdpFlags(mdpFlags,
+ ovutils::OV_MDP_SMP_FORCE_ALLOC);
ovutils::eZorder zOrder = static_cast<ovutils::eZorder>(fbZorder);
ovutils::eTransform orient =
static_cast<ovutils::eTransform>(layer->transform);
@@ -442,6 +446,8 @@
mTileEnabled));
ovutils::eMdpFlags mdpFlags = OV_MDP_BLEND_FG_PREMULT;
+ ovutils::setMdpFlags(mdpFlags,
+ ovutils::OV_MDP_SMP_FORCE_ALLOC);
ovutils::eZorder zOrder = static_cast<ovutils::eZorder>(fbZorder);
ovutils::PipeArgs parg(mdpFlags,