drm_hwcomposer: Use Planner interface to provision planes
Use the new Planner interface to handle the layer->plane mapping.
This allows us to simplify the Plan() function by offloading the
plane provisioning to the platform specific code.
BUG=b/28117135
TEST=Tested on ryu with a variety of window layouts/workloads
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: I75a0c5d87a9096e7a83ecbc848c75fee42ee1131
diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp
index 10a1ffc..0b2506f 100644
--- a/drmdisplaycompositor.cpp
+++ b/drmdisplaycompositor.cpp
@@ -1048,7 +1048,8 @@
int pre_comp_layer_index;
- int ret = dst->Init(drm_, src->crtc(), src->importer(), src->frame_no());
+ int ret = dst->Init(drm_, src->crtc(), src->importer(), src->planner(),
+ src->frame_no());
if (ret) {
ALOGE("Failed to init squash all composition %d", ret);
return ret;
@@ -1065,8 +1066,10 @@
goto move_layers_back;
}
- if (comp_plane.type() == DrmCompositionPlane::Type::kDisable)
+ if (comp_plane.type() == DrmCompositionPlane::Type::kDisable) {
+ dst->AddPlaneDisable(comp_plane.plane());
continue;
+ }
for (auto i : comp_plane.source_layers()) {
DrmHwcLayer &layer = src_layers[i];