cam: kms_sink: Print display pipeline configuration

It can be useful, for diagnosis purpose, to know what plane and CRTC the
KMS sink auto-selects. Print the display pipeline configuration at start
time.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2021-10-03 17:22:26 +03:00
parent 3c059b9164
commit 1de0f90dd4

View file

@ -174,19 +174,20 @@ int KMSSink::configurePipeline(const libcamera::PixelFormat &format)
crtc_ = crtc;
plane_ = plane;
format_ = format;
return 0;
break;
}
if (plane->supportsFormat(xFormat)) {
crtc_ = crtc;
plane_ = plane;
format_ = xFormat;
return 0;
break;
}
}
}
}
if (!crtc_) {
std::cerr
<< "Unable to find display pipeline for format "
<< format.toString() << std::endl;
@ -194,6 +195,14 @@ int KMSSink::configurePipeline(const libcamera::PixelFormat &format)
return -EPIPE;
}
std::cout
<< "Using KMS plane " << plane_->id() << ", CRTC " << crtc_->id()
<< ", connector " << connector_->name()
<< " (" << connector_->id() << ")" << std::endl;
return 0;
}
int KMSSink::start()
{
std::unique_ptr<DRM::AtomicRequest> request;