mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-24 09:05:06 +03:00
apps: cam: kms_sink: Drop unique_ptr<> from DRM::AtomicRequest
There is no need to wrap DRM::AtomicRequest in std::unique_ptr<> in KMSSink::start(). Remove it so that the syntax becomes similar to what we have in KMSSink::stop(). No functional changes intended. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
683c6da83f
commit
e191001939
1 changed files with 5 additions and 7 deletions
|
@ -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: "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue