[libcamera-devel] [PATCH v2 1/1] Add fake pipeline handler

Kieran Bingham kieran.bingham at ideasonboard.com
Mon Oct 31 01:04:48 CET 2022


Quoting Kieran Bingham (2022-10-28 11:17:40)
> Hi Harvey,
> 
> I do think I see benefits to a no-hardware (no-kernel) camera support.
> I believe it would help developments and testing. So I'm keen to see
> this progress.
> 
> The big part here that worries me is the Fatal when trying to handle
> buffer alloction.
> 
> We need to do better than that, as it means qcam just aborts when I
> apply this patch and try to test it.
> 

<snip>

> > +
> > +int PipelineHandlerFake::exportFrameBuffers(Camera *camera, Stream *stream,
> > +                                           std::vector<std::unique_ptr<FrameBuffer>> *buffers)
> > +{
> > +       // Assume it's never called.
> > +       LOG(Fake, Fatal) << "exportFrameBuffers should never be called";
> 
> I /really/ don't like this though.
> 
> And this falls to a fairly big yak-shave... we need a way to get dma
> bufs easier. I think we can do this by creating an allocator with
> /dev/udmabuf
> 
> It's a yak though - but is it something you'd be able/willing/interested
> to explore? If not - I'll try to look at it.

As a heads up, to prevent duplication of work - I've started this - and
now I have an allocator that seems to allocate dmabufs from
/dev/udmabuf.

More work required, but I think it could be useful in more places.

As soon as it's tested, I'll get it on the list, which could then act as
an allocator here.

> But I don't see benefit to merging a virtual/fake pipeline handler that
> can't at least be run with qcam, and currently when I test this patch -
> this is where it fails and breaks with this Fatal error.
> 
>


More information about the libcamera-devel mailing list