summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/apps/cam/kms_sink.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/apps/cam/kms_sink.cpp b/src/apps/cam/kms_sink.cpp
index 353209cd..6991c3fa 100644
--- a/src/apps/cam/kms_sink.cpp
+++ b/src/apps/cam/kms_sink.cpp
@@ -303,24 +303,22 @@ int KMSSink::configurePipeline(const libcamera::PixelFormat &format)
int KMSSink::start()
{
- std::unique_ptr<DRM::AtomicRequest> request;
-
int ret = FrameSink::start();
if (ret < 0)
return ret;
/* Disable all CRTCs and planes to start from a known valid state. */
- request = std::make_unique<DRM::AtomicRequest>(&dev_);
+ DRM::AtomicRequest request(&dev_);
for (const DRM::Crtc &crtc : dev_.crtcs())
- request->addProperty(&crtc, "ACTIVE", 0);
+ request.addProperty(&crtc, "ACTIVE", 0);
for (const DRM::Plane &plane : dev_.planes()) {
- request->addProperty(&plane, "CRTC_ID", 0);
- request->addProperty(&plane, "FB_ID", 0);
+ request.addProperty(&plane, "CRTC_ID", 0);
+ request.addProperty(&plane, "FB_ID", 0);
}
- ret = request->commit(DRM::AtomicRequest::FlagAllowModeset);
+ ret = request.commit(DRM::AtomicRequest::FlagAllowModeset);
if (ret < 0) {
std::cerr
<< "Failed to disable CRTCs and planes: "