From 6d678fb683c6ca796e31c719de002585053fb27d Mon Sep 17 00:00:00 2001 From: Raj kamal Date: Mon, 24 Sep 2012 15:36:17 +0530 Subject: [PATCH] libhwcomposer: Check for downscaling with alpha RGB pipe doesnot support downscaling with alpha on targets with MDP 4.1 and less. Abort bypass for those targets if the layer requires downscaling with alpha Change-Id: I3450968458977626dfc90a9f35da593f08ced93c --- libhwcomposer/hwc_mdpcomp.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp index 864a9e3..191c099 100644 --- a/libhwcomposer/hwc_mdpcomp.cpp +++ b/libhwcomposer/hwc_mdpcomp.cpp @@ -17,6 +17,7 @@ */ #include +#include #include "hwc_mdpcomp.h" #include "hwc_qbuf.h" #include "hwc_external.h" @@ -456,7 +457,12 @@ int MDPComp::mark_layers(hwc_layer_list_t* list, layer_mdp_info* layer_info, if((layer_prop & MDPCOMP_LAYER_DOWNSCALE) && (layer_prop & MDPCOMP_LAYER_BLEND)) { - pipe_pref = PIPE_REQ_RGB; + if (qdutils::MDPVersion::getInstance().getMDPVersion() >= + qdutils::MDP_V4_2) { + pipe_pref = PIPE_REQ_RGB; + } else { + return MDPCOMP_ABORT; + } } int allocated_pipe = sPipeMgr.req_for_pipe( pipe_pref);