summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Tasayco Loarte <victorx.tasayco.loarte@intel.com>2017-12-04 02:45:06 -0800
committerAndriy Naborskyy <andriyn@google.com>2018-02-07 10:45:25 -0800
commitfeda861bb4a8d792ddbd2bd00917b4f324db87c2 (patch)
tree8bf9daaab702c2c8703f2f172ea418fe7e46df3d
parent59fd80804d6dfa8d1e99b69f8e43fb071cad3a5a (diff)
downloadhwcomposer-feda861bb4a8d792ddbd2bd00917b4f324db87c2.tar.gz
Cherry-pick from CL 3577634 on partner gerrit When there's no buffer handle update for a given plan, current HWC implementation will assume no content update and will not commit/flip the new content to display. When the layer stack is changing (new layer added/removed...This's advertised by SF through GEOMETRY_CHANGED flag), this assumption is no longer valid. This patch will reset the current data buffer attached to the given plan when it's being reclaimed. This should happen when rebuilding the new layer stack to be composed, by the time we deinit the current layer list. This way we can prevent black screen issue that may occur when a new activity's layer keeps using the same buffer handle attached to the previous layer. Change-Id: I4c24c963466db478633121dadcb6434208fc1b4a Tracked-On: https://jira01.devtools.intel.com/browse/AW-7570 Signed-off-by: Zaghdoud Walidx <walidx.zaghdoud@intel.com>
-rw-r--r--merrifield/common/planes/DisplayPlane.cpp6
-rw-r--r--merrifield/common/planes/DisplayPlaneManager.cpp1
-rw-r--r--merrifield/include/DisplayPlane.h2
3 files changed, 8 insertions, 1 deletions
diff --git a/merrifield/common/planes/DisplayPlane.cpp b/merrifield/common/planes/DisplayPlane.cpp
index 2a1ca51..cbab8e0 100644
--- a/merrifield/common/planes/DisplayPlane.cpp
+++ b/merrifield/common/planes/DisplayPlane.cpp
@@ -326,6 +326,12 @@ void DisplayPlane::invalidateBufferCache()
mCurrentDataBuffer = 0;
}
+void DisplayPlane::resetCurrentBuffer()
+{
+ // reset current data buffer
+ mCurrentDataBuffer = 0;
+}
+
bool DisplayPlane::assignToDevice(int disp)
{
RETURN_FALSE_IF_NOT_INIT();
diff --git a/merrifield/common/planes/DisplayPlaneManager.cpp b/merrifield/common/planes/DisplayPlaneManager.cpp
index 1b60d93..0461ef0 100644
--- a/merrifield/common/planes/DisplayPlaneManager.cpp
+++ b/merrifield/common/planes/DisplayPlaneManager.cpp
@@ -269,6 +269,7 @@ void DisplayPlaneManager::reclaimPlane(int dsp, DisplayPlane& plane)
}
putPlane(index, mReclaimedPlanes[type]);
+ plane.resetCurrentBuffer();
// NOTE: don't invalidate plane's data cache here because the reclaimed
// plane might be re-assigned to the same layer later
diff --git a/merrifield/include/DisplayPlane.h b/merrifield/include/DisplayPlane.h
index 250d485..6110152 100644
--- a/merrifield/include/DisplayPlane.h
+++ b/merrifield/include/DisplayPlane.h
@@ -87,7 +87,7 @@ public:
// data source
virtual bool setDataBuffer(buffer_handle_t handle);
-
+ virtual void resetCurrentBuffer();
virtual void invalidateBufferCache();
// display device