Message ID | 20250604131403.1729356-1-antoine.bouyer@nxp.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
Hi Antoine, Thank you for the patch. On Wed, Jun 04, 2025 at 03:14:02PM +0200, Antoine Bouyer wrote: > Change indentation to pass checkstyle script. There should be a blank line here. > Fixes: 680cde600509 ("libcamera: imx8-isi: Split Bayer/YUV config generation") > And none here. > Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com> > --- > src/libcamera/pipeline/imx8-isi/imx8-isi.cpp | 46 ++++++++++---------- > 1 file changed, 22 insertions(+), 24 deletions(-) > > diff --git a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp > index ecda426..dc20ab2 100644 > --- a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp > +++ b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp > @@ -761,30 +761,28 @@ PipelineHandlerISI::generateConfiguration(Camera *camera, > */ > StreamConfiguration cfg; > > - switch (role) { > - case StreamRole::StillCapture: > - case StreamRole::Viewfinder: > - case StreamRole::VideoRecording: { > - Size size = role == StreamRole::StillCapture > - ? data->sensor_->resolution() > - : PipelineHandlerISI::kPreviewSize; > - cfg = generateYUVConfiguration(camera, size); > - if (cfg.pixelFormat.isValid()) > - break; > - > - > - /* > - * Fallback to use a Bayer format if that's what the > - * sensor supports. > - */ > - [[fallthrough]]; > - > - } > - > - case StreamRole::Raw: { > - cfg = generateRawConfiguration(camera); > - break; > - } > + switch (role) { > + case StreamRole::StillCapture: > + case StreamRole::Viewfinder: > + case StreamRole::VideoRecording: { > + Size size = role == StreamRole::StillCapture > + ? data->sensor_->resolution() > + : PipelineHandlerISI::kPreviewSize; This is one of clang-format false-positives :-/ It should be Size size = role == StreamRole::StillCapture ? data->sensor_->resolution() : PipelineHandlerISI::kPreviewSize; No need to resubmit the patch, I'll make the adjustements locally. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > + cfg = generateYUVConfiguration(camera, size); > + if (cfg.pixelFormat.isValid()) > + break; > + > + /* > + * Fallback to use a Bayer format if that's what the > + * sensor supports. > + */ > + [[fallthrough]]; > + } > + > + case StreamRole::Raw: { > + cfg = generateRawConfiguration(camera); > + break; > + } > > default: > LOG(ISI, Error) << "Requested stream role not supported: " << role;
diff --git a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp index ecda426..dc20ab2 100644 --- a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp +++ b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp @@ -761,30 +761,28 @@ PipelineHandlerISI::generateConfiguration(Camera *camera, */ StreamConfiguration cfg; - switch (role) { - case StreamRole::StillCapture: - case StreamRole::Viewfinder: - case StreamRole::VideoRecording: { - Size size = role == StreamRole::StillCapture - ? data->sensor_->resolution() - : PipelineHandlerISI::kPreviewSize; - cfg = generateYUVConfiguration(camera, size); - if (cfg.pixelFormat.isValid()) - break; - - - /* - * Fallback to use a Bayer format if that's what the - * sensor supports. - */ - [[fallthrough]]; - - } - - case StreamRole::Raw: { - cfg = generateRawConfiguration(camera); - break; - } + switch (role) { + case StreamRole::StillCapture: + case StreamRole::Viewfinder: + case StreamRole::VideoRecording: { + Size size = role == StreamRole::StillCapture + ? data->sensor_->resolution() + : PipelineHandlerISI::kPreviewSize; + cfg = generateYUVConfiguration(camera, size); + if (cfg.pixelFormat.isValid()) + break; + + /* + * Fallback to use a Bayer format if that's what the + * sensor supports. + */ + [[fallthrough]]; + } + + case StreamRole::Raw: { + cfg = generateRawConfiguration(camera); + break; + } default: LOG(ISI, Error) << "Requested stream role not supported: " << role;
Change indentation to pass checkstyle script. Fixes: 680cde600509 ("libcamera: imx8-isi: Split Bayer/YUV config generation") Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com> --- src/libcamera/pipeline/imx8-isi/imx8-isi.cpp | 46 ++++++++++---------- 1 file changed, 22 insertions(+), 24 deletions(-)