[libcamera-devel] pipeline: raspberrypi: Fix typo in a comment
diff mbox series

Message ID 20210330075626.996126-1-naush@raspberrypi.com
State Superseded
Headers show
Series
  • [libcamera-devel] pipeline: raspberrypi: Fix typo in a comment
Related show

Commit Message

Naushir Patuck March 30, 2021, 7:56 a.m. UTC
s/embedded/bayer/

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
---
 src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sebastian Fricke March 30, 2021, 10:33 a.m. UTC | #1
Hey Naushir,

Thank you for the patch.
Just out of curiosity so this assert makes sure that bayerRequeueCount
was not increased more than once during each loop cycle right? Because
otherwise this assert just checks the same condition that the if clause
above checks, right? Because every increase of the variable comes with a
pop from the queue.

On 30.03.2021 08:56, Naushir Patuck wrote:
>s/embedded/bayer/
>
>Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Sebastian Fricke <sebastian.fricke@posteo.net>

>---
> src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
>index f22e286ed87a..2a917455500f 100644
>--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
>+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
>@@ -1802,7 +1802,7 @@ bool RPiCameraData::findMatchingBuffers(BayerFrame &bayerFrame, FrameBuffer *&em
> 			 * pending embedded data buffers.
> 			 */
> 			if (bayerRequeueCount == unicam_[Unicam::Image].getBuffers().size()) {
>-				/* The embedded queue must be empty at this point! */
>+				/* The bayer queue must be empty at this point! */
> 				ASSERT(bayerQueue_.empty());
>
> 				LOG(RPI, Warning) << "Flushing embedded data stream!";
>-- 
>2.25.1
>
>_______________________________________________
>libcamera-devel mailing list
>libcamera-devel@lists.libcamera.org
>https://lists.libcamera.org/listinfo/libcamera-devel
Naushir Patuck March 30, 2021, 10:52 a.m. UTC | #2
Hi Sebastian,

On Tue, 30 Mar 2021 at 11:33, Sebastian Fricke <sebastian.fricke@posteo.net>
wrote:

> Hey Naushir,
>
> Thank you for the patch.
> Just out of curiosity so this assert makes sure that bayerRequeueCount
> was not increased more than once during each loop cycle right? Because
> otherwise this assert just checks the same condition that the if clause
> above checks, right? Because every increase of the variable comes with a
> pop from the queue.
>

Conceptually, there are 2 queues, one for the buffers available to use. and
another for the buffers that have been filled up by the device.  The assert
here
is to ensure commonality between the two when all of the buffers have been
recycled back to the device.  Hope that make sense :)

Regards,
Naush



>
> On 30.03.2021 08:56, Naushir Patuck wrote:
> >s/embedded/bayer/
> >
> >Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> Reviewed-by: Sebastian Fricke <sebastian.fricke@posteo.net>
>
> >---
> > src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> >index f22e286ed87a..2a917455500f 100644
> >--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> >+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> >@@ -1802,7 +1802,7 @@ bool RPiCameraData::findMatchingBuffers(BayerFrame
> &bayerFrame, FrameBuffer *&em
> >                        * pending embedded data buffers.
> >                        */
> >                       if (bayerRequeueCount ==
> unicam_[Unicam::Image].getBuffers().size()) {
> >-                              /* The embedded queue must be empty at
> this point! */
> >+                              /* The bayer queue must be empty at this
> point! */
> >                               ASSERT(bayerQueue_.empty());
> >
> >                               LOG(RPI, Warning) << "Flushing embedded
> data stream!";
> >--
> >2.25.1
> >
> >_______________________________________________
> >libcamera-devel mailing list
> >libcamera-devel@lists.libcamera.org
> >https://lists.libcamera.org/listinfo/libcamera-devel
>

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index f22e286ed87a..2a917455500f 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -1802,7 +1802,7 @@  bool RPiCameraData::findMatchingBuffers(BayerFrame &bayerFrame, FrameBuffer *&em
 			 * pending embedded data buffers.
 			 */
 			if (bayerRequeueCount == unicam_[Unicam::Image].getBuffers().size()) {
-				/* The embedded queue must be empty at this point! */
+				/* The bayer queue must be empty at this point! */
 				ASSERT(bayerQueue_.empty());
 
 				LOG(RPI, Warning) << "Flushing embedded data stream!";