[v2,0/4] libcamera: Replace IPU3/RkISP1FrameInfo
mbox series

Message ID 20240311123234.32925-1-jacopo.mondi@ideasonboard.com
Headers show
Series
  • libcamera: Replace IPU3/RkISP1FrameInfo
Related show

Message

Jacopo Mondi March 11, 2024, 12:32 p.m. UTC
v1->v2:
- Squash patches 2 and 3 in a single one
- Maintain the existing behaviour for queueing RAW frames to the RkISP1 IPA
- Minor changes to the IPU3 patch as suggested by Dan

Pipeline:
https://gitlab.freedesktop.org/pinchartl/libcamera/-/pipelines/1124683

The RkISP1 and IPU3 pipeline have custom classes that provide the
following features:

- Associate a stat, params and (optionally) a raw buffer with the id used
  to communicate between the pipeline handler and the IPA
- Associate a completed buffer with the Request it belongs to

The same functionalities can be obtained by extending the Request::Private
class with a per-pipeline derived implementation that tracks buffers and ids
reducing code duplications.

Jacopo Mondi (4):
  libcamera: Allow pipeline to provide a Private request
  libcamera: rkisp1: Replace usage of RkISP1FrameInfo
  libcamera: ipu3: Replace IPU3FrameInfo
  libcamera: ipu3: Return Raw buffers on error

 include/libcamera/internal/pipeline_handler.h |   5 +-
 include/libcamera/request.h                   |   3 +-
 src/libcamera/camera.cpp                      |   8 +-
 src/libcamera/pipeline/ipu3/frames.cpp        | 143 -------
 src/libcamera/pipeline/ipu3/frames.h          |  67 ----
 src/libcamera/pipeline/ipu3/ipu3.cpp          | 215 +++++++----
 src/libcamera/pipeline/ipu3/meson.build       |   1 -
 src/libcamera/pipeline/rkisp1/rkisp1.cpp      | 359 +++++++-----------
 src/libcamera/pipeline_handler.cpp            |  38 +-
 src/libcamera/request.cpp                     |  15 +-
 test/camera/statemachine.cpp                  |  12 -
 11 files changed, 328 insertions(+), 538 deletions(-)
 delete mode 100644 src/libcamera/pipeline/ipu3/frames.cpp
 delete mode 100644 src/libcamera/pipeline/ipu3/frames.h

--
2.43.2

Comments

Umang Jain April 19, 2024, 3:09 a.m. UTC | #1
Hi all

Any reason why this hasn't been landed in libcamera master?

On 11/03/24 6:02 pm, Jacopo Mondi wrote:
> v1->v2:
> - Squash patches 2 and 3 in a single one
> - Maintain the existing behaviour for queueing RAW frames to the RkISP1 IPA
> - Minor changes to the IPU3 patch as suggested by Dan
>
> Pipeline:
> https://gitlab.freedesktop.org/pinchartl/libcamera/-/pipelines/1124683
>
> The RkISP1 and IPU3 pipeline have custom classes that provide the
> following features:
>
> - Associate a stat, params and (optionally) a raw buffer with the id used
>    to communicate between the pipeline handler and the IPA
> - Associate a completed buffer with the Request it belongs to
>
> The same functionalities can be obtained by extending the Request::Private
> class with a per-pipeline derived implementation that tracks buffers and ids
> reducing code duplications.
>
> Jacopo Mondi (4):
>    libcamera: Allow pipeline to provide a Private request
>    libcamera: rkisp1: Replace usage of RkISP1FrameInfo
>    libcamera: ipu3: Replace IPU3FrameInfo
>    libcamera: ipu3: Return Raw buffers on error
>
>   include/libcamera/internal/pipeline_handler.h |   5 +-
>   include/libcamera/request.h                   |   3 +-
>   src/libcamera/camera.cpp                      |   8 +-
>   src/libcamera/pipeline/ipu3/frames.cpp        | 143 -------
>   src/libcamera/pipeline/ipu3/frames.h          |  67 ----
>   src/libcamera/pipeline/ipu3/ipu3.cpp          | 215 +++++++----
>   src/libcamera/pipeline/ipu3/meson.build       |   1 -
>   src/libcamera/pipeline/rkisp1/rkisp1.cpp      | 359 +++++++-----------
>   src/libcamera/pipeline_handler.cpp            |  38 +-
>   src/libcamera/request.cpp                     |  15 +-
>   test/camera/statemachine.cpp                  |  12 -
>   11 files changed, 328 insertions(+), 538 deletions(-)
>   delete mode 100644 src/libcamera/pipeline/ipu3/frames.cpp
>   delete mode 100644 src/libcamera/pipeline/ipu3/frames.h
>
> --
> 2.43.2
>
Jacopo Mondi April 19, 2024, 7:13 a.m. UTC | #2
Hi Umang,

On Fri, Apr 19, 2024 at 08:39:33AM +0530, Umang Jain wrote:
> Hi all
>
> Any reason why this hasn't been landed in libcamera master?
>

So, I've experimented a bit with changing the PH/IPA iteraction model,
with the idea of making the IPA running even when the application has
not queued requests.

It is not clear to me if this is really what we want, but if that's
the case, this mechanism doesn't play well with it, as it centralize in a
Request all the IPA-related fields.. if we will make the IPA
free-running without application Request being queued, this series
will make things more complex.

So, for the time being, please consider this series deprecated :(

> On 11/03/24 6:02 pm, Jacopo Mondi wrote:
> > v1->v2:
> > - Squash patches 2 and 3 in a single one
> > - Maintain the existing behaviour for queueing RAW frames to the RkISP1 IPA
> > - Minor changes to the IPU3 patch as suggested by Dan
> >
> > Pipeline:
> > https://gitlab.freedesktop.org/pinchartl/libcamera/-/pipelines/1124683
> >
> > The RkISP1 and IPU3 pipeline have custom classes that provide the
> > following features:
> >
> > - Associate a stat, params and (optionally) a raw buffer with the id used
> >    to communicate between the pipeline handler and the IPA
> > - Associate a completed buffer with the Request it belongs to
> >
> > The same functionalities can be obtained by extending the Request::Private
> > class with a per-pipeline derived implementation that tracks buffers and ids
> > reducing code duplications.
> >
> > Jacopo Mondi (4):
> >    libcamera: Allow pipeline to provide a Private request
> >    libcamera: rkisp1: Replace usage of RkISP1FrameInfo
> >    libcamera: ipu3: Replace IPU3FrameInfo
> >    libcamera: ipu3: Return Raw buffers on error
> >
> >   include/libcamera/internal/pipeline_handler.h |   5 +-
> >   include/libcamera/request.h                   |   3 +-
> >   src/libcamera/camera.cpp                      |   8 +-
> >   src/libcamera/pipeline/ipu3/frames.cpp        | 143 -------
> >   src/libcamera/pipeline/ipu3/frames.h          |  67 ----
> >   src/libcamera/pipeline/ipu3/ipu3.cpp          | 215 +++++++----
> >   src/libcamera/pipeline/ipu3/meson.build       |   1 -
> >   src/libcamera/pipeline/rkisp1/rkisp1.cpp      | 359 +++++++-----------
> >   src/libcamera/pipeline_handler.cpp            |  38 +-
> >   src/libcamera/request.cpp                     |  15 +-
> >   test/camera/statemachine.cpp                  |  12 -
> >   11 files changed, 328 insertions(+), 538 deletions(-)
> >   delete mode 100644 src/libcamera/pipeline/ipu3/frames.cpp
> >   delete mode 100644 src/libcamera/pipeline/ipu3/frames.h
> >
> > --
> > 2.43.2
> >
>
Umang Jain April 19, 2024, 7:14 a.m. UTC | #3
Hi Jacopo

On 19/04/24 12:43 pm, Jacopo Mondi wrote:
> Hi Umang,
>
> On Fri, Apr 19, 2024 at 08:39:33AM +0530, Umang Jain wrote:
>> Hi all
>>
>> Any reason why this hasn't been landed in libcamera master?
>>
> So, I've experimented a bit with changing the PH/IPA iteraction model,
> with the idea of making the IPA running even when the application has
> not queued requests.
>
> It is not clear to me if this is really what we want, but if that's
> the case, this mechanism doesn't play well with it, as it centralize in a
> Request all the IPA-related fields.. if we will make the IPA
> free-running without application Request being queued, this series
> will make things more complex.
>
> So, for the time being, please consider this series deprecated :(

Thanks for the update. I had patches depending on RkISP1FrameInfo, so 
was not sure if I have to re-do all that based on top of this series etc.
>> On 11/03/24 6:02 pm, Jacopo Mondi wrote:
>>> v1->v2:
>>> - Squash patches 2 and 3 in a single one
>>> - Maintain the existing behaviour for queueing RAW frames to the RkISP1 IPA
>>> - Minor changes to the IPU3 patch as suggested by Dan
>>>
>>> Pipeline:
>>> https://gitlab.freedesktop.org/pinchartl/libcamera/-/pipelines/1124683
>>>
>>> The RkISP1 and IPU3 pipeline have custom classes that provide the
>>> following features:
>>>
>>> - Associate a stat, params and (optionally) a raw buffer with the id used
>>>     to communicate between the pipeline handler and the IPA
>>> - Associate a completed buffer with the Request it belongs to
>>>
>>> The same functionalities can be obtained by extending the Request::Private
>>> class with a per-pipeline derived implementation that tracks buffers and ids
>>> reducing code duplications.
>>>
>>> Jacopo Mondi (4):
>>>     libcamera: Allow pipeline to provide a Private request
>>>     libcamera: rkisp1: Replace usage of RkISP1FrameInfo
>>>     libcamera: ipu3: Replace IPU3FrameInfo
>>>     libcamera: ipu3: Return Raw buffers on error
>>>
>>>    include/libcamera/internal/pipeline_handler.h |   5 +-
>>>    include/libcamera/request.h                   |   3 +-
>>>    src/libcamera/camera.cpp                      |   8 +-
>>>    src/libcamera/pipeline/ipu3/frames.cpp        | 143 -------
>>>    src/libcamera/pipeline/ipu3/frames.h          |  67 ----
>>>    src/libcamera/pipeline/ipu3/ipu3.cpp          | 215 +++++++----
>>>    src/libcamera/pipeline/ipu3/meson.build       |   1 -
>>>    src/libcamera/pipeline/rkisp1/rkisp1.cpp      | 359 +++++++-----------
>>>    src/libcamera/pipeline_handler.cpp            |  38 +-
>>>    src/libcamera/request.cpp                     |  15 +-
>>>    test/camera/statemachine.cpp                  |  12 -
>>>    11 files changed, 328 insertions(+), 538 deletions(-)
>>>    delete mode 100644 src/libcamera/pipeline/ipu3/frames.cpp
>>>    delete mode 100644 src/libcamera/pipeline/ipu3/frames.h
>>>
>>> --
>>> 2.43.2
>>>