[v2,5/6] ipa: rpi: Move variables from private to protected
diff mbox series

Message ID 20240508080401.14850-6-naush@raspberrypi.com
State Superseded
Headers show
Series
  • Pre Raspberry Pi 5 support changes
Related show

Commit Message

Naushir Patuck May 8, 2024, 8:04 a.m. UTC
The following member variable will be used by the derived IPAs in an
upcoming commit, so make them protected:

lensPresent_
monoSensor_

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
---
 src/ipa/rpi/common/ipa_base.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Jacopo Mondi May 9, 2024, 9:48 a.m. UTC | #1
Hi Naush

On Wed, May 08, 2024 at 09:04:00AM GMT, Naushir Patuck wrote:
> The following member variable will be used by the derived IPAs in an
> upcoming commit, so make them protected:
>
> lensPresent_
> monoSensor_
>
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

You really wanted to sign this off!
:)

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

Thanks
  j

> ---
>  src/ipa/rpi/common/ipa_base.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/ipa/rpi/common/ipa_base.h b/src/ipa/rpi/common/ipa_base.h
> index 512d7e8fe778..ebdc4d297abb 100644
> --- a/src/ipa/rpi/common/ipa_base.h
> +++ b/src/ipa/rpi/common/ipa_base.h
> @@ -71,6 +71,9 @@ protected:
>  	/* Whether the stitch block (if available) needs to swap buffers. */
>  	bool stitchSwapBuffers_;
>
> +	bool monoSensor_;
> +	bool lensPresent_;
> +
>  private:
>  	/* Number of metadata objects available in the context list. */
>  	static constexpr unsigned int numMetadataContexts = 16;
> @@ -96,9 +99,6 @@ private:
>
>  	std::map<unsigned int, MappedFrameBuffer> buffers_;
>
> -	bool lensPresent_;
> -	bool monoSensor_;
> -
>  	std::array<RPiController::Metadata, numMetadataContexts> rpiMetadata_;
>
>  	/*
> --
> 2.34.1
>
Kieran Bingham May 9, 2024, 11:15 a.m. UTC | #2
Quoting Naushir Patuck (2024-05-08 09:04:00)
> The following member variable will be used by the derived IPAs in an
> upcoming commit, so make them protected:
> 
> lensPresent_
> monoSensor_
> 
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>


Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

;-)

> ---
>  src/ipa/rpi/common/ipa_base.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/ipa/rpi/common/ipa_base.h b/src/ipa/rpi/common/ipa_base.h
> index 512d7e8fe778..ebdc4d297abb 100644
> --- a/src/ipa/rpi/common/ipa_base.h
> +++ b/src/ipa/rpi/common/ipa_base.h
> @@ -71,6 +71,9 @@ protected:
>         /* Whether the stitch block (if available) needs to swap buffers. */
>         bool stitchSwapBuffers_;
>  
> +       bool monoSensor_;
> +       bool lensPresent_;
> +
>  private:
>         /* Number of metadata objects available in the context list. */
>         static constexpr unsigned int numMetadataContexts = 16;
> @@ -96,9 +99,6 @@ private:
>  
>         std::map<unsigned int, MappedFrameBuffer> buffers_;
>  
> -       bool lensPresent_;
> -       bool monoSensor_;
> -
>         std::array<RPiController::Metadata, numMetadataContexts> rpiMetadata_;
>  
>         /*
> -- 
> 2.34.1
>
Naushir Patuck May 9, 2024, 11:35 a.m. UTC | #3
On Thu, 9 May 2024 at 12:15, Kieran Bingham <kieran.bingham@ideasonboard.com>
wrote:

> Quoting Naushir Patuck (2024-05-08 09:04:00)
> > The following member variable will be used by the derived IPAs in an
> > upcoming commit, so make them protected:
> >
> > lensPresent_
> > monoSensor_
> >
> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
>
>
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>
> ;-)
>

I hope to see these duplicated in the merged commit!


>
> > ---
> >  src/ipa/rpi/common/ipa_base.h | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/ipa/rpi/common/ipa_base.h
> b/src/ipa/rpi/common/ipa_base.h
> > index 512d7e8fe778..ebdc4d297abb 100644
> > --- a/src/ipa/rpi/common/ipa_base.h
> > +++ b/src/ipa/rpi/common/ipa_base.h
> > @@ -71,6 +71,9 @@ protected:
> >         /* Whether the stitch block (if available) needs to swap
> buffers. */
> >         bool stitchSwapBuffers_;
> >
> > +       bool monoSensor_;
> > +       bool lensPresent_;
> > +
> >  private:
> >         /* Number of metadata objects available in the context list. */
> >         static constexpr unsigned int numMetadataContexts = 16;
> > @@ -96,9 +99,6 @@ private:
> >
> >         std::map<unsigned int, MappedFrameBuffer> buffers_;
> >
> > -       bool lensPresent_;
> > -       bool monoSensor_;
> > -
> >         std::array<RPiController::Metadata, numMetadataContexts>
> rpiMetadata_;
> >
> >         /*
> > --
> > 2.34.1
> >
>
Laurent Pinchart May 9, 2024, 11:38 a.m. UTC | #4
Hi Naush,

Thank you for the patch.

On Wed, May 08, 2024 at 09:04:00AM +0100, Naushir Patuck wrote:
> The following member variable will be used by the derived IPAs in an
> upcoming commit, so make them protected:
> 
> lensPresent_
> monoSensor_

Will the derived classes only need to read them, or write them as well ?
In the former case, you may want to provide read-only accessors instead.
Up to you.

> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> ---
>  src/ipa/rpi/common/ipa_base.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/ipa/rpi/common/ipa_base.h b/src/ipa/rpi/common/ipa_base.h
> index 512d7e8fe778..ebdc4d297abb 100644
> --- a/src/ipa/rpi/common/ipa_base.h
> +++ b/src/ipa/rpi/common/ipa_base.h
> @@ -71,6 +71,9 @@ protected:
>  	/* Whether the stitch block (if available) needs to swap buffers. */
>  	bool stitchSwapBuffers_;
>  
> +	bool monoSensor_;
> +	bool lensPresent_;
> +
>  private:
>  	/* Number of metadata objects available in the context list. */
>  	static constexpr unsigned int numMetadataContexts = 16;
> @@ -96,9 +99,6 @@ private:
>  
>  	std::map<unsigned int, MappedFrameBuffer> buffers_;
>  
> -	bool lensPresent_;
> -	bool monoSensor_;
> -
>  	std::array<RPiController::Metadata, numMetadataContexts> rpiMetadata_;
>  
>  	/*
Naushir Patuck May 10, 2024, 8:17 a.m. UTC | #5
Hi Laurent,

On Thu, 9 May 2024 at 12:39, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Naush,
>
> Thank you for the patch.
>
> On Wed, May 08, 2024 at 09:04:00AM +0100, Naushir Patuck wrote:
> > The following member variable will be used by the derived IPAs in an
> > upcoming commit, so make them protected:
> >
> > lensPresent_
> > monoSensor_
>
> Will the derived classes only need to read them, or write them as well ?
> In the former case, you may want to provide read-only accessors instead.
> Up to you.

Ack.  Turns out, I don't need lensPresent_ any more, so I'll add a
getter for monoSensor_ only.

Naush

>
> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> > ---
> >  src/ipa/rpi/common/ipa_base.h | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/ipa/rpi/common/ipa_base.h b/src/ipa/rpi/common/ipa_base.h
> > index 512d7e8fe778..ebdc4d297abb 100644
> > --- a/src/ipa/rpi/common/ipa_base.h
> > +++ b/src/ipa/rpi/common/ipa_base.h
> > @@ -71,6 +71,9 @@ protected:
> >       /* Whether the stitch block (if available) needs to swap buffers. */
> >       bool stitchSwapBuffers_;
> >
> > +     bool monoSensor_;
> > +     bool lensPresent_;
> > +
> >  private:
> >       /* Number of metadata objects available in the context list. */
> >       static constexpr unsigned int numMetadataContexts = 16;
> > @@ -96,9 +99,6 @@ private:
> >
> >       std::map<unsigned int, MappedFrameBuffer> buffers_;
> >
> > -     bool lensPresent_;
> > -     bool monoSensor_;
> > -
> >       std::array<RPiController::Metadata, numMetadataContexts> rpiMetadata_;
> >
> >       /*
>
> --
> Regards,
>
> Laurent Pinchart

Patch
diff mbox series

diff --git a/src/ipa/rpi/common/ipa_base.h b/src/ipa/rpi/common/ipa_base.h
index 512d7e8fe778..ebdc4d297abb 100644
--- a/src/ipa/rpi/common/ipa_base.h
+++ b/src/ipa/rpi/common/ipa_base.h
@@ -71,6 +71,9 @@  protected:
 	/* Whether the stitch block (if available) needs to swap buffers. */
 	bool stitchSwapBuffers_;
 
+	bool monoSensor_;
+	bool lensPresent_;
+
 private:
 	/* Number of metadata objects available in the context list. */
 	static constexpr unsigned int numMetadataContexts = 16;
@@ -96,9 +99,6 @@  private:
 
 	std::map<unsigned int, MappedFrameBuffer> buffers_;
 
-	bool lensPresent_;
-	bool monoSensor_;
-
 	std::array<RPiController::Metadata, numMetadataContexts> rpiMetadata_;
 
 	/*