display: Add QC Display utils
* Rename qcomui directory to qdutils
* Avoid inclusion of qcom_ui header
* Add class to get MDP version
* Add namespace for qdutils to prevent collison
Change-Id: I9a3f440e6b0fea1cfcc478ddca90af5df3bbb897
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index 13873f8..79e09f7 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -16,6 +16,7 @@
*/
#include "hwc_utils.h"
+#include "mdp_version.h"
namespace qhwc {
void initContext(hwc_context_t *ctx)
@@ -24,6 +25,9 @@
openFramebufferDevice(ctx);
ctx->mOverlay = overlay::Overlay::getInstance();
ctx->qbuf = new QueuedBufferStore();
+ ctx->mdpVersion = qdutils::MDPVersion::getInstance().getMDPVersion();
+ ctx->hasOverlay = qdutils::MDPVersion::getInstance().hasOverlay();
+ ALOGI("MDP version: %d",ctx->mdpVersion);
}
@@ -89,7 +93,7 @@
(private_handle_t *)layer->handle;
//XXX: Handle targets not using overlay
if(prepareOverlay(ctx, layer)) {
- layer->compositionType = HWC_USE_OVERLAY;
+ layer->compositionType = HWC_OVERLAY;
layer->hints |= HWC_HINT_CLEAR_FB;
}
}