diff options
author | Roman Stratiienko <r.stratiienko@gmail.com> | 2022-09-29 19:55:01 +0300 |
---|---|---|
committer | Roman Stratiienko <r.stratiienko@gmail.com> | 2022-09-29 20:44:14 +0300 |
commit | ce2ce75a366db0dc60e0a521aaa66daa06701417 (patch) | |
tree | 178d58cfc7101aeb6a2c9690cb3b792ef922174f | |
parent | 7ee6a9ea6b6873742b7716517f1be18ce39a7524 (diff) | |
download | drm_hwcomposer-ce2ce75a366db0dc60e0a521aaa66daa06701417.tar.gz |
drm_hwcomposer: Basic support for shared primary planes
For now just bind the first suitable primary plane to the pipeline
on creation.
Closes: https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/issues/68
Change-Id: Idc4a7a5ac9d768d2614e1cd8a460d742f406a1cc
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
-rw-r--r-- | drm/DrmDisplayPipeline.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drm/DrmDisplayPipeline.cpp b/drm/DrmDisplayPipeline.cpp index f993d28..e81544d 100644 --- a/drm/DrmDisplayPipeline.cpp +++ b/drm/DrmDisplayPipeline.cpp @@ -86,15 +86,15 @@ static auto TryCreatePipeline(DrmDevice &dev, DrmConnector &connector, return {}; } - if (primary_planes.size() > 1) { - ALOGE("Found more than 1 primary plane for CRTC %d", crtc.GetId()); - return {}; + for (const auto &plane : primary_planes) { + pipe->primary_plane = plane->BindPipeline(pipe.get()); + if (pipe->primary_plane) { + break; + } } - pipe->primary_plane = primary_planes[0]->BindPipeline(pipe.get()); if (!pipe->primary_plane) { - ALOGE("Primary plane %d is already owned. Internal error.", - primary_planes[0]->GetId()); + ALOGE("Failed to bind primary plane"); return {}; } |