[libcamera-devel] [PATCH 04/13] libcamera: ipu3: Remove usage of IPU3CameraData from ImgUDevice
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Sat Jun 27 18:11:36 CEST 2020
Hi Niklas,
Thank you for the patch.
On Sat, Jun 27, 2020 at 05:00:34AM +0200, Niklas Söderlund wrote:
> The IPU3CameraData argument to allocateBuffers() and freeBuffers() is no
> longer used and can be removed.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> src/libcamera/pipeline/ipu3/ipu3.cpp | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index 5a473e18c082cee8..36413a824ebbf564 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -34,8 +34,6 @@ namespace libcamera {
>
> LOG_DEFINE_CATEGORY(IPU3)
>
> -class IPU3CameraData;
> -
> class ImgUDevice
> {
> public:
> @@ -75,8 +73,8 @@ public:
> const StreamConfiguration &cfg,
> V4L2DeviceFormat *outputFormat);
>
> - int allocateBuffers(IPU3CameraData *data, unsigned int bufferCount);
> - void freeBuffers(IPU3CameraData *data);
> + int allocateBuffers(unsigned int bufferCount);
> + void freeBuffers();
>
> int start();
> int stop();
> @@ -665,7 +663,7 @@ int PipelineHandlerIPU3::allocateBuffers(Camera *camera)
> data->rawStream_.configuration().bufferCount,
> });
>
> - ret = imgu->allocateBuffers(data, bufferCount);
> + ret = imgu->allocateBuffers(bufferCount);
> if (ret < 0)
> return ret;
>
> @@ -676,7 +674,7 @@ int PipelineHandlerIPU3::freeBuffers(Camera *camera)
> {
> IPU3CameraData *data = cameraData(camera);
>
> - data->imgu_->freeBuffers(data);
> + data->imgu_->freeBuffers();
>
> return 0;
> }
> @@ -1121,7 +1119,7 @@ int ImgUDevice::configureOutput(ImgUOutput *output,
> /**
> * \brief Allocate buffers for all the ImgU video devices
> */
> -int ImgUDevice::allocateBuffers(IPU3CameraData *data, unsigned int bufferCount)
> +int ImgUDevice::allocateBuffers(unsigned int bufferCount)
> {
> /* Share buffers between CIO2 output and ImgU input. */
> int ret = input_->importBuffers(bufferCount);
> @@ -1158,7 +1156,7 @@ int ImgUDevice::allocateBuffers(IPU3CameraData *data, unsigned int bufferCount)
> return 0;
>
> error:
> - freeBuffers(data);
> + freeBuffers();
>
> return ret;
> }
> @@ -1166,7 +1164,7 @@ error:
> /**
> * \brief Release buffers for all the ImgU video devices
> */
> -void ImgUDevice::freeBuffers(IPU3CameraData *data)
> +void ImgUDevice::freeBuffers()
> {
> int ret;
>
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list