hwcomposer : Use system property to set DYN composition threshold

Change-Id: I15c82d46ec846ff2bff7a1fc7a924bb7fcf844f9
This commit is contained in:
Neti Ravi Kumar 2012-08-27 16:21:27 +05:30 committed by Andrew Sutherland
parent 82a40187e0
commit 4c01c36778
3 changed files with 11 additions and 4 deletions

View File

@ -92,9 +92,7 @@ bool CopyBit::canUseCopybitForRGB(hwc_context_t *ctx, hwc_layer_list_t *list) {
if (compositionType & qdutils::COMPOSITION_TYPE_DYN) {
// DYN Composition:
// use copybit, if (TotalRGBRenderArea < 2 * FB Area)
// this is done based on perf inputs in ICS
// TODO: Above condition needs to be re-evaluated in JB
// use copybit, depending on dyn threshold
framebuffer_device_t *fbDev = ctx->mFbDev;
if (!fbDev) {
@ -105,7 +103,7 @@ bool CopyBit::canUseCopybitForRGB(hwc_context_t *ctx, hwc_layer_list_t *list) {
unsigned int renderArea = getRGBRenderingArea(list);
ALOGD_IF (DEBUG_COPYBIT, "%s:renderArea %u, fbArea %u",
__FUNCTION__, renderArea, fbArea);
if (renderArea < (2 * fbArea)) {
if (renderArea < (unsigned int) (ctx->dynThreshold * fbArea)) {
return true;
}
} else if ((compositionType & qdutils::COMPOSITION_TYPE_MDP)) {

View File

@ -59,8 +59,16 @@ void initContext(hwc_context_t *ctx)
property_get("debug.egl.swapinterval", value, "1");
ctx->swapInterval = atoi(value);
//Initialize dyn threshold to 2.0
//system property can override this value
ctx->dynThreshold = 2.0;
property_get("debug.hwc.dynThreshold", value, "3");
ctx->dynThreshold = atof(value);
ALOGI("Initializing Qualcomm Hardware Composer");
ALOGI("MDP version: %d", ctx->mMDP.version);
ALOGI("DYN composition threshold : %f", ctx->dynThreshold);
}
void closeContext(hwc_context_t *ctx)

View File

@ -136,6 +136,7 @@ struct hwc_context_t {
int overlayInUse;
int deviceOrientation;
int swapInterval;
double dynThreshold;
//Framebuffer device
framebuffer_device_t *mFbDev;