hwc: mdpcomp: one full screen update in screen refresh
When screen refresh is triggered, make sure at least one
full screen update when partial update is enabled.
Screen refresh is requested after post processing has been
sent to kernel, full screen update is needed so that the
pp setting applies to the whole screen.
Change-Id: I7885c451a313666c1fcef8c3d55cb86b8479de1c
diff --git a/msm8994/libhwcomposer/hwc_mdpcomp.cpp b/msm8994/libhwcomposer/hwc_mdpcomp.cpp
index 7bff091..2b5c29b 100644
--- a/msm8994/libhwcomposer/hwc_mdpcomp.cpp
+++ b/msm8994/libhwcomposer/hwc_mdpcomp.cpp
@@ -51,6 +51,7 @@
int MDPComp::sMaxSecLayers = 1;
bool MDPComp::enablePartialUpdateForMDP3 = false;
bool MDPComp::sIsPartialUpdateActive = true;
+bool MDPComp::sIsSingleFullScreenUpdate = false;
void *MDPComp::sLibPerfHint = NULL;
int MDPComp::sPerfLockHandle = 0;
int (*MDPComp::sPerfLockAcquire)(int, int, int*, int) = NULL;
@@ -1304,6 +1305,11 @@
}
if(ctx->listStats[mDpy].secureUI)
return false;
+ if (sIsSingleFullScreenUpdate) {
+ // make sure one full screen update
+ sIsSingleFullScreenUpdate = false;
+ return false;
+ }
return true;
}
diff --git a/msm8994/libhwcomposer/hwc_mdpcomp.h b/msm8994/libhwcomposer/hwc_mdpcomp.h
index ab690aa..ca03392 100644
--- a/msm8994/libhwcomposer/hwc_mdpcomp.h
+++ b/msm8994/libhwcomposer/hwc_mdpcomp.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012-2013, The Linux Foundation. All rights reserved.
+ * Copyright (C) 2012-2015, The Linux Foundation. All rights reserved.
*
* Not a Contribution, Apache license notifications and license are retained
* for attribution purposes only.
@@ -59,6 +59,7 @@
static int setPartialUpdatePref(hwc_context_t *ctx, bool enable);
static bool getPartialUpdatePref(hwc_context_t *ctx);
void setDynRefreshRate(hwc_context_t *ctx, hwc_display_contents_1_t* list);
+ static void setSingleFullScreenUpdate() { sIsSingleFullScreenUpdate = true; }
protected:
enum ePipeType {
@@ -264,6 +265,7 @@
static int sMaxPipesPerMixer;
static bool sSrcSplitEnabled;
static IdleInvalidator *sIdleInvalidator;
+ static bool sIsSingleFullScreenUpdate;
static int sMaxSecLayers;
static bool sIsPartialUpdateActive;
struct FrameInfo mCurrentFrame;
diff --git a/msm8994/libhwcomposer/hwc_qclient.cpp b/msm8994/libhwcomposer/hwc_qclient.cpp
index 1c7c4dc..c2c09c6 100644
--- a/msm8994/libhwcomposer/hwc_qclient.cpp
+++ b/msm8994/libhwcomposer/hwc_qclient.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-14, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-15, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -373,6 +373,7 @@
unsecuring(mHwcContext, inParcel->readInt32());
break;
case IQService::SCREEN_REFRESH:
+ qhwc::MDPComp::setSingleFullScreenUpdate();
return screenRefresh(mHwcContext);
break;
case IQService::EXTERNAL_ORIENTATION: