Librem 5: hang with cam -C1

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Mar 26 17:14:23 CET 2025


On Wed, Mar 26, 2025 at 05:03:52PM +0100, Jacopo Mondi wrote:
> On Wed, Mar 26, 2025 at 12:53:53PM +0100, Pavel Machek wrote:
> > Hi!
> >
> > > > With -C100, it actually works, for both front and back cameras.
> > >
> > > great news \o/
> >
> > :). There's still bug somewhere, -C2 results in two buffer captured
> > and exit, -C1 results in hang, which is quite confusing.
> 
> As Laurent mentioned the CSI-2 receiver driver might require a
> min_queued_buffer of 2.
> 
> If you don't provide at least two buffers, streaming never starts.
> I don't see it being specified in mainline imx8mq-mipi-csi2.c though
> but my understanding is that you're on a very old kernel ?

The driver handling DMA is imx7-media-csi. imx8mq-mipi-csi2 is the CSI-2
RX engine.

> > > > > I'm afraid a more detailed log is needed.
> > > > > Run the above command with
> > > > >
> > > > > LIBCAMERA_LOG_LEVELS=0
> > > > >
> > > > > As librem5 has no ISP but a RAW sensor as far as I remember (I still
> > > > > can't figure out what they were thinking when they selected this weird
> > > > > combination) make sure you have the SimplePipelineHandler and
> > > > > SoftwareISP compiled in and enabled.
> > > >
> > > > Yep, that's correct. I'm afraid combination of RAW sensor and no ISP
> > >
> > > In this specific case, the imx8mq SoC on the librem5 has no physical ISP
> > >
> > > > or no drivers for ISP is going to be common for a while in phone area
> > > > :-(.
> > >
> > > That's why we're very glad to have the software ISP in libcamera and
> > > see great improvements there from Milan and others ! ;)
> >
> > Yes, so... I'd like to take a stab at implementing autofocus in
> > software ISP, as I understand that one is still missing.
> >
> > Any hints how to enable SoftwareISP?
> >
> > meson configure build says
> >
> > ipas               [ipu3, mali-c55,     [ipu3, mali-c55,     Select which IPA
> >                       rkisp1, rpi/pisp,    rkisp1, rpi/pisp,   modules to build
> >                       rpi/vc4, simple,     rpi/vc4, simple,
> >                       vimc]                vimc]
> > pipelines          [auto]               [all, auto,          Select which
> >                                            imx8-isi, ipu3,     pipeline handlers to
> >                                            mali-c55, rkisp1,   build. If this is
> >                                            rpi/pisp, rpi/vc4,  set to "auto", all
> >                                            simple, uvcvideo,   the pipelines
> >                                            vimc, virtual]      applicable to the
> >
> > But I have no idea how if that's enough and what needs to be done at
> > runtime.
> >
> > Thanks,
> > 								Pavel

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list