<div dir="ltr"><div dir="ltr">Hi Laurent,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 21 Mar 2022 at 13:02, Laurent Pinchart <<a href="mailto:laurent.pinchart@ideasonboard.com">laurent.pinchart@ideasonboard.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, Mar 21, 2022 at 10:26:57AM +0000, Naushir Patuck via libcamera-devel wrote:<br>
> Hi,<br>
> <br>
> For version 3 of this series, I've removed the patch to add a timer that waits<br>
> for 5s after stop() to de-allocate buffers.  David and me have had a chat about<br>
> this and we think for now it is best that we have fully deterministic behavior for<br>
> buffer allocations, and avoid CMA fragmentation on the Raspberry Pi platforms.<br>
<br>
For what it's worth, I agree about the deterministic behaviour. We can<br>
work on top of this series to add a hint to the stop() function to tell<br>
the pipeline handler if streaming is expected to be restarted soon.<br></blockquote><div><br></div><div>I had a think about this briefly over the weekend, and I wonder if it might be better to</div><div>have a new API function freeResources() type call instead of a flag in stop()? This would</div><div>allow the application to separate out the two actions if it so desires.</div><div><br></div><div>Naush</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> Apart from that, I have renamed the reallocate flag based on Kieran's suggestion.<br>
> <br>
> Regards,<br>
> Naush<br>
> <br>
> Naushir Patuck (5):<br>
>   pipeline: raspberrypi: Avoid over-allocation for ISP Output 1<br>
>   pipeline: raspberrypi: Move freeBuffers() to the RPiCameraData class<br>
>   pipeline: raspberrypi: Free buffers in the RPiCamera destructor and<br>
>     re-configure<br>
>   pipeline: raspberrypi: Repurpose RPi::Stream::reset()<br>
>   libcamera: v4l2_videodevice: Empty the V4L2 buffer cache on<br>
>     streamOff()<br>
> <br>
>  include/libcamera/internal/v4l2_videodevice.h |  1 +<br>
>  .../pipeline/raspberrypi/raspberrypi.cpp      | 58 ++++++++++++-------<br>
>  .../pipeline/raspberrypi/rpi_stream.cpp       | 13 ++---<br>
>  .../pipeline/raspberrypi/rpi_stream.h         |  2 +-<br>
>  src/libcamera/v4l2_videodevice.cpp            | 16 +++++<br>
>  5 files changed, 61 insertions(+), 29 deletions(-)<br>
<br>
-- <br>
Regards,<br>
<br>
Laurent Pinchart<br>
</blockquote></div></div>