[libcamera-devel] [PATCH 1/3] pipeline: raspberrypi: Split out device enumeration and camera registration
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Fri Nov 19 13:51:06 CET 2021
Hi Naush,
Thank you for the patch.
On Fri, Nov 19, 2021 at 11:09:53AM +0000, Naushir Patuck wrote:
> Split out PipelineHandlerRPi::match() so that media device enumeration and
> acquisition is separated from camera registration. The former logic remains
> in PipelineHandlerRPi::match(), whereas the latter logic is moved into a new
> PipelineHandlerRPi::registerCameras() member function.
>
> Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
Looks simple enough. Assuming that it helps the rest of the series,
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> index 4f6c699a4379..9aa7e9eef5e7 100644
> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> @@ -311,6 +311,7 @@ private:
> return static_cast<RPiCameraData *>(camera->_d());
> }
>
> + bool registerCameras();
> int queueAllBuffers(Camera *camera);
> int prepareBuffers(Camera *camera);
> void freeBuffers(Camera *camera);
> @@ -1010,6 +1011,11 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)
> if (!isp_)
> return false;
>
> + return registerCameras();
> +}
> +
> +bool PipelineHandlerRPi::registerCameras()
> +{
> std::unique_ptr<RPiCameraData> data = std::make_unique<RPiCameraData>(this);
> if (!data->dmaHeap_.isValid())
> return false;
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list