[v6,0/3] Clean up pending requests on stop in software ISP
mbox series

Message ID 20241106201721.1624461-1-mzamazal@redhat.com
Headers show
Series
  • Clean up pending requests on stop in software ISP
Related show

Message

Milan Zamazal Nov. 6, 2024, 8:17 p.m. UTC
Fix for the bug #234 where software ISP may not clean up some pending
buffers in stopDevice.

Changes in v6:
- Fix the ordering of function declarations and implementations.
- Minor code restructuring as suggested by Laurent.
- A comment wording improved.
- A C++20 construct avoided.

Changes in v5:
- Use a struct instead of std::pair in conversionQueue_.

Changes in v4:
- Request explicitly tracked as suggested by Laurent.

Changes in v3:
- Split to two patches according to different code areas affected.
- Added a check for the request status to prevent canceling a request
  multiple times.
- Calling conversionBuffers_.clear() after the cleanup, to be safer.

Changes in v2:
- The request is additionally canceled.
- New helper method PipelineHandler::cancelRequest() introduced.

Milan Zamazal (3):
  libcamera: pipeline_handler: Provide cancelRequest
  libcamera: simple: Track requests in conversionQueue_
  libcamera: software_isp: Clean up pending requests on stop

 include/libcamera/internal/pipeline_handler.h |  1 +
 src/libcamera/pipeline/simple/simple.cpp      | 36 ++++++++++++-------
 src/libcamera/pipeline_handler.cpp            | 23 ++++++++----
 3 files changed, 40 insertions(+), 20 deletions(-)

Comments

Laurent Pinchart Nov. 8, 2024, 1:47 a.m. UTC | #1
Hi Milan,

Applied, thank you.

On Wed, Nov 06, 2024 at 09:17:18PM +0100, Milan Zamazal wrote:
> Fix for the bug #234 where software ISP may not clean up some pending
> buffers in stopDevice.
> 
> Changes in v6:
> - Fix the ordering of function declarations and implementations.
> - Minor code restructuring as suggested by Laurent.
> - A comment wording improved.
> - A C++20 construct avoided.
> 
> Changes in v5:
> - Use a struct instead of std::pair in conversionQueue_.
> 
> Changes in v4:
> - Request explicitly tracked as suggested by Laurent.
> 
> Changes in v3:
> - Split to two patches according to different code areas affected.
> - Added a check for the request status to prevent canceling a request
>   multiple times.
> - Calling conversionBuffers_.clear() after the cleanup, to be safer.
> 
> Changes in v2:
> - The request is additionally canceled.
> - New helper method PipelineHandler::cancelRequest() introduced.
> 
> Milan Zamazal (3):
>   libcamera: pipeline_handler: Provide cancelRequest
>   libcamera: simple: Track requests in conversionQueue_
>   libcamera: software_isp: Clean up pending requests on stop
> 
>  include/libcamera/internal/pipeline_handler.h |  1 +
>  src/libcamera/pipeline/simple/simple.cpp      | 36 ++++++++++++-------
>  src/libcamera/pipeline_handler.cpp            | 23 ++++++++----
>  3 files changed, 40 insertions(+), 20 deletions(-)