hwc: mdpcomp: Remove redundant function to program MDP
The programYUV used for video-only cases is the same as programMDP
function. Remove the redundant function
Change-Id: I1d891404a77b2a47f90c236d4d6dcbbd02143d93
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index 431136e..48d9575 100644
--- a/libhwcomposer/hwc_mdpcomp.cpp
+++ b/libhwcomposer/hwc_mdpcomp.cpp
@@ -1148,46 +1148,6 @@
return true;
}
-bool MDPComp::programYUV(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
- if(!allocLayerPipes(ctx, list)) {
- ALOGD_IF(isDebug(), "%s: Unable to allocate MDP pipes", __FUNCTION__);
- return false;
- }
- //If we are in this block, it means we have yuv + rgb layers both
- int mdpIdx = 0;
- for (int index = 0; index < mCurrentFrame.layerCount; index++) {
- if(!mCurrentFrame.isFBComposed[index]) {
- hwc_layer_1_t* layer = &list->hwLayers[index];
- int mdpIndex = mCurrentFrame.layerToMDP[index];
- MdpPipeInfo* cur_pipe =
- mCurrentFrame.mdpToLayer[mdpIndex].pipeInfo;
- cur_pipe->zOrder = mdpIdx++;
-
- private_handle_t *hnd = (private_handle_t *)layer->handle;
- if(is4kx2kYuvBuffer(hnd) && sEnable4k2kYUVSplit){
- if(configure4k2kYuv(ctx, layer,
- mCurrentFrame.mdpToLayer[mdpIndex])
- != 0 ){
- ALOGD_IF(isDebug(), "%s: Failed to configure split pipes \
- for layer %d",__FUNCTION__, index);
- return false;
- }
- else{
- mdpIdx++;
- }
- continue;
- }
- if(configure(ctx, layer,
- mCurrentFrame.mdpToLayer[mdpIndex]) != 0 ){
- ALOGD_IF(isDebug(), "%s: Failed to configure overlay for \
- layer %d",__FUNCTION__, index);
- return false;
- }
- }
- }
- return true;
-}
-
bool MDPComp::resourceCheck(hwc_context_t *ctx,
hwc_display_contents_1_t *list) {
const bool fbUsed = mCurrentFrame.fbCount;
@@ -1369,7 +1329,7 @@
goto exit;
}
}
- if(!programYUV(ctx, list)) {
+ if(!programMDP(ctx, list)) {
reset(numLayers, list);
ctx->mOverlay->clear(mDpy);
ret = -1;
diff --git a/libhwcomposer/hwc_mdpcomp.h b/libhwcomposer/hwc_mdpcomp.h
index 7e646d7..986b0e6 100644
--- a/libhwcomposer/hwc_mdpcomp.h
+++ b/libhwcomposer/hwc_mdpcomp.h
@@ -209,7 +209,6 @@
void updateYUV(hwc_context_t* ctx, hwc_display_contents_1_t* list,
bool secureOnly);
bool programMDP(hwc_context_t *ctx, hwc_display_contents_1_t* list);
- bool programYUV(hwc_context_t *ctx, hwc_display_contents_1_t* list);
void reset(const int& numAppLayers, hwc_display_contents_1_t* list);
bool isSupportedForMDPComp(hwc_context_t *ctx, hwc_layer_1_t* layer);
bool resourceCheck(hwc_context_t *ctx, hwc_display_contents_1_t *list);