Message ID | 20210312061131.854849-7-kieran.bingham@ideasonboard.com |
---|---|
State | Changes Requested |
Delegated to: | Kieran Bingham |
Headers | show |
Series |
|
Related | show |
Hi Kieran, Thank you for the patch. On Fri, Mar 12, 2021 at 06:11:29AM +0000, Kieran Bingham wrote: > Ensure that checks on resource availability are handled first, and then > operate on the queues only after the resources are confirmed as > available. > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > src/libcamera/pipeline/ipu3/frames.cpp | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/libcamera/pipeline/ipu3/frames.cpp b/src/libcamera/pipeline/ipu3/frames.cpp > index b8b471c3c561..7a7c5643df43 100644 > --- a/src/libcamera/pipeline/ipu3/frames.cpp > +++ b/src/libcamera/pipeline/ipu3/frames.cpp > @@ -47,12 +47,13 @@ IPU3Frames::Info *IPU3Frames::create(Request *request) > LOG(IPU3, Error) << "Parameters buffer underrun"; > return nullptr; > } > - FrameBuffer *paramBuffer = availableParamBuffers_.front(); > > if (availableStatBuffers_.empty()) { > LOG(IPU3, Error) << "Statistics buffer underrun"; > return nullptr; > } > + > + FrameBuffer *paramBuffer = availableParamBuffers_.front(); > FrameBuffer *statBuffer = availableStatBuffers_.front(); > > availableParamBuffers_.pop();
diff --git a/src/libcamera/pipeline/ipu3/frames.cpp b/src/libcamera/pipeline/ipu3/frames.cpp index b8b471c3c561..7a7c5643df43 100644 --- a/src/libcamera/pipeline/ipu3/frames.cpp +++ b/src/libcamera/pipeline/ipu3/frames.cpp @@ -47,12 +47,13 @@ IPU3Frames::Info *IPU3Frames::create(Request *request) LOG(IPU3, Error) << "Parameters buffer underrun"; return nullptr; } - FrameBuffer *paramBuffer = availableParamBuffers_.front(); if (availableStatBuffers_.empty()) { LOG(IPU3, Error) << "Statistics buffer underrun"; return nullptr; } + + FrameBuffer *paramBuffer = availableParamBuffers_.front(); FrameBuffer *statBuffer = availableStatBuffers_.front(); availableParamBuffers_.pop();
Ensure that checks on resource availability are handled first, and then operate on the queues only after the resources are confirmed as available. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> --- src/libcamera/pipeline/ipu3/frames.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)