Commit f4e917f7 authored by Xaver Hugl's avatar Xaver Hugl
Browse files

backends/drm: release buffers for disabled objects

BUG: 456686
parent a6cc4b55
Pipeline #217308 passed with stage
in 13 minutes and 20 seconds
......@@ -187,6 +187,7 @@ void DrmPlane::disable()
{
setPending(PropertyIndex::CrtcId, 0);
setPending(PropertyIndex::FbId, 0);
m_next = nullptr;
}
void DrmPlane::releaseBuffers()
......
......@@ -165,8 +165,15 @@ DrmPipeline::Error DrmPipeline::commitPipelinesAtomic(const QVector<DrmPipeline
return errnoToError();
}
std::for_each(pipelines.begin(), pipelines.end(), std::mem_fn(&DrmPipeline::atomicModesetSuccessful));
std::for_each(unusedObjects.begin(), unusedObjects.end(), std::mem_fn(&DrmObject::commitPending));
std::for_each(unusedObjects.begin(), unusedObjects.end(), std::mem_fn(&DrmObject::commit));
for (const auto &obj : unusedObjects) {
obj->commitPending();
obj->commit();
if (auto crtc = dynamic_cast<DrmCrtc *>(obj)) {
crtc->flipBuffer();
} else if (auto plane = dynamic_cast<DrmPlane *>(obj)) {
plane->flipBuffer();
}
}
return Error::None;
}
case CommitMode::Test: {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment