summaryrefslogtreecommitdiff
path: root/drmdisplaycomposition.cpp
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2015-07-09 17:22:22 -0400
committerSean Paul <seanpaul@chromium.org>2015-07-13 11:57:56 -0400
commit2e46fbd90b1aae158ec0437f564dd610e7392f7a (patch)
tree6268d4171507fb2e962976473a2ba7ac4b708202 /drmdisplaycomposition.cpp
parent9099aa5e280c094154fd312f415336c1aabb4b8e (diff)
downloaddrm_hwcomposer-2e46fbd90b1aae158ec0437f564dd610e7392f7a.tar.gz
drm_hwcomposer-2e46fbd90b1aae158ec0437f564dd610e7392f7a.tar.xz
drm_hwcomposer: Disable unused planes
Right before queuing up a composition, go through the list of unused planes and add disable markers such that they don't remain active when the new frame is posted. BUG=chrome-os-parter:42311 TEST=Tested on smaug, turned on/off bunch of times, no dup icons Change-Id: Ic2e5e210873efb6dc41fd43682fe00db33c2a28e Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'drmdisplaycomposition.cpp')
-rw-r--r--drmdisplaycomposition.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/drmdisplaycomposition.cpp b/drmdisplaycomposition.cpp
index 2f8d651..364a64e 100644
--- a/drmdisplaycomposition.cpp
+++ b/drmdisplaycomposition.cpp
@@ -51,7 +51,7 @@ DrmDisplayComposition::DrmDisplayComposition()
DrmDisplayComposition::~DrmDisplayComposition() {
for (DrmCompositionLayerVector_t::iterator iter = layers_.begin();
iter != layers_.end(); ++iter) {
- if (importer_)
+ if (importer_ && iter->bo.fb_id)
importer_->ReleaseBuffer(&iter->bo);
if (iter->layer.acquireFenceFd >= 0)
@@ -119,6 +119,14 @@ int DrmDisplayComposition::AddDpmsMode(uint32_t dpms_mode) {
return 0;
}
+int DrmDisplayComposition::AddPlaneDisable(DrmPlane *plane) {
+ DrmCompositionLayer_t c_layer;
+ c_layer.crtc = NULL;
+ c_layer.plane = plane;
+ layers_.push_back(c_layer);
+ return 0;
+}
+
int DrmDisplayComposition::FinishComposition() {
int ret = sw_sync_timeline_inc(timeline_fd_, timeline_);
if (ret)