aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Stratiienko <roman.o.stratiienko@globallogic.com>2022-06-22 12:14:22 +0300
committerRoman Stratiienko <roman.o.stratiienko@globallogic.com>2022-06-30 20:25:30 +0300
commitaf862a52c15e3f6b89f55bc442dbc9b08e45c2d0 (patch)
tree0c5b7ae06751d85d99871520ba4e1598ac1a1dff
parent554743de468d7213620828faf62e93aa95fa627c (diff)
downloaddrm_hwcomposer-af862a52c15e3f6b89f55bc442dbc9b08e45c2d0.tar.gz
drm_hwcomposer: Split the composition cleanup and display's deactivation
When drm_hwcomposer is used with drm/sun4i driver, 'adb shell stop && adb shell start' sequence causes noise on the unused planes during the bootanimation. It looks like some bug in the drivers or DRM frontend itself, which keeps the plane assigned to the CRTC if the atomic commit contains CRTC deactivation. We need more time to investigate it. For now we can split disposal into 2 atomic commits, which fixes the noise issue. Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-rw-r--r--hwc2_device/HwcDisplay.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/hwc2_device/HwcDisplay.cpp b/hwc2_device/HwcDisplay.cpp
index 9a31ac8..58b888e 100644
--- a/hwc2_device/HwcDisplay.cpp
+++ b/hwc2_device/HwcDisplay.cpp
@@ -118,9 +118,11 @@ void HwcDisplay::SetPipeline(DrmDisplayPipeline *pipeline) {
void HwcDisplay::Deinit() {
if (pipeline_ != nullptr) {
AtomicCommitArgs a_args{};
- a_args.active = false;
a_args.composition = std::make_shared<DrmKmsPlan>();
GetPipe().atomic_state_manager->ExecuteAtomicCommit(a_args);
+ a_args.composition = {};
+ a_args.active = false;
+ GetPipe().atomic_state_manager->ExecuteAtomicCommit(a_args);
vsync_worker_.Init(nullptr, [](int64_t) {});
current_plan_.reset();