display: Enable copybit on msm8610
This change is the hwc and copybit changes need to enable
composition to go through mdp on msm8610.
Change-Id: If0df3a247c5f4f4310966d14fe8fd839bf84b9d5
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index 9bf0c45..be3d21f 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -144,13 +144,10 @@
if(fbZOrder >= 0)
ctx->mFBUpdate[dpy]->prepare(ctx, list, fbZOrder);
- /* Temporarily commenting out C2D until we support partial
- copybit composition for mixed mode MDP
-
- // Use Copybit, when MDP comp fails
- if((fbZOrder >= 0) && ctx->mCopyBit[dpy])
- ctx->mCopyBit[dpy]->prepare(ctx, list, dpy);
- */
+ if (ctx->mMDP.version < qdutils::MDP_V4_0) {
+ if((fbZOrder >= 0) && ctx->mCopyBit[dpy])
+ ctx->mCopyBit[dpy]->prepare(ctx, list, dpy);
+ }
}
}
return 0;
diff --git a/libhwcomposer/hwc_copybit.cpp b/libhwcomposer/hwc_copybit.cpp
index 3f40753..8cdf467 100644
--- a/libhwcomposer/hwc_copybit.cpp
+++ b/libhwcomposer/hwc_copybit.cpp
@@ -21,6 +21,7 @@
#define DEBUG_COPYBIT 0
#include <copybit.h>
#include <utils/Timers.h>
+#include <mdp_version.h>
#include "hwc_copybit.h"
#include "comptype.h"
#include "gr.h"
@@ -244,11 +245,13 @@
mRelFd[0] = -1;
}
- //Clear the visible region on the render buffer
- //XXX: Do this only when needed.
- hwc_rect_t clearRegion;
- getNonWormholeRegion(list, clearRegion);
- clear(renderBuffer, clearRegion);
+ if (ctx->mMDP.version >= qdutils::MDP_V4_0) {
+ //Clear the visible region on the render buffer
+ //XXX: Do this only when needed.
+ hwc_rect_t clearRegion;
+ getNonWormholeRegion(list, clearRegion);
+ clear(renderBuffer, clearRegion);
+ }
// numAppLayers-1, as we iterate from 0th layer index with HWC_COPYBIT flag
for (int i = 0; i <= (ctx->listStats[dpy].numAppLayers-1); i++) {
hwc_layer_1_t *layer = &list->hwLayers[i];