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,24 +174,33 @@ int KMSSink::configurePipeline(const libcamera::PixelFormat &format)
crtc_ = crtc; crtc_ = crtc;
plane_ = plane; plane_ = plane;
format_ = format; format_ = format;
return 0; break;
} }
if (plane->supportsFormat(xFormat)) { if (plane->supportsFormat(xFormat)) {
crtc_ = crtc; crtc_ = crtc;
plane_ = plane; plane_ = plane;
format_ = xFormat; format_ = xFormat;
return 0; break;
} }
} }
} }
} }
if (!crtc_) {
std::cerr std::cerr
<< "Unable to find display pipeline for format " << "Unable to find display pipeline for format "
<< format.toString() << std::endl; << format.toString() << std::endl;
return -EPIPE; return -EPIPE;
}
std::cout
<< "Using KMS plane " << plane_->id() << ", CRTC " << crtc_->id()
<< ", connector " << connector_->name()
<< " (" << connector_->id() << ")" << std::endl;
return 0;
} }
int KMSSink::start() int KMSSink::start()