[libcamera-devel,5/7] ipa: raspberrypi: noise: Remove unnecessary atomic variable
diff mbox series

Message ID 20210204093457.6879-6-david.plowman@raspberrypi.com
State Accepted
Headers show
Series
  • Raspberry Pi IPA maintenance
Related show

Commit Message

David Plowman Feb. 4, 2021, 9:34 a.m. UTC
mode_factor_ does not need to be atomic - it is set by SwitchMode()
which runs synchronously.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
---
 src/ipa/raspberrypi/controller/rpi/noise.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Pinchart Feb. 7, 2021, 2:08 p.m. UTC | #1
Hi David,

Thank you for the patch.

On Thu, Feb 04, 2021 at 09:34:55AM +0000, David Plowman wrote:
> mode_factor_ does not need to be atomic - it is set by SwitchMode()
> which runs synchronously.
> 
> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  src/ipa/raspberrypi/controller/rpi/noise.hpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/ipa/raspberrypi/controller/rpi/noise.hpp b/src/ipa/raspberrypi/controller/rpi/noise.hpp
> index 6f6e0be9..1c9de5c8 100644
> --- a/src/ipa/raspberrypi/controller/rpi/noise.hpp
> +++ b/src/ipa/raspberrypi/controller/rpi/noise.hpp
> @@ -26,7 +26,7 @@ private:
>  	// the noise profile for analogue gain of 1.0
>  	double reference_constant_;
>  	double reference_slope_;
> -	std::atomic<double> mode_factor_;
> +	double mode_factor_;
>  };
>  
>  } // namespace RPiController

Patch
diff mbox series

diff --git a/src/ipa/raspberrypi/controller/rpi/noise.hpp b/src/ipa/raspberrypi/controller/rpi/noise.hpp
index 6f6e0be9..1c9de5c8 100644
--- a/src/ipa/raspberrypi/controller/rpi/noise.hpp
+++ b/src/ipa/raspberrypi/controller/rpi/noise.hpp
@@ -26,7 +26,7 @@  private:
 	// the noise profile for analogue gain of 1.0
 	double reference_constant_;
 	double reference_slope_;
-	std::atomic<double> mode_factor_;
+	double mode_factor_;
 };
 
 } // namespace RPiController