[libcamera-devel] ipa: rpi: imx290: Hide one frame on startup
diff mbox series

Message ID 20230824131908.12109-1-naush@raspberrypi.com
State Accepted
Commit 26ac1a8e3fc52cb2035ad88b7d22f034a68f50c7
Headers show
Series
  • [libcamera-devel] ipa: rpi: imx290: Hide one frame on startup
Related show

Commit Message

Naushir Patuck Aug. 24, 2023, 1:19 p.m. UTC
The imx290 produces a single unusable frame on startup and mode switch.
This is signalled to the IPA in the mode switch case, but not the
startup case. Fix this.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
---
 src/ipa/rpi/cam_helper/cam_helper_imx290.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

David Plowman Aug. 25, 2023, 9:15 a.m. UTC | #1
Hi Naush

Thanks for the patch!

On Thu, 24 Aug 2023 at 14:19, Naushir Patuck via libcamera-devel
<libcamera-devel@lists.libcamera.org> wrote:
>
> The imx290 produces a single unusable frame on startup and mode switch.
> This is signalled to the IPA in the mode switch case, but not the
> startup case. Fix this.
>
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

Reviewed-by: David Plowman <david.plowman@raspberrypi.com>

Thanks!
David

> ---
>  src/ipa/rpi/cam_helper/cam_helper_imx290.cpp | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp b/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp
> index 7d6f5b549a73..d98b51cd56b3 100644
> --- a/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp
> +++ b/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp
> @@ -19,6 +19,7 @@ public:
>         double gain(uint32_t gainCode) const override;
>         void getDelays(int &exposureDelay, int &gainDelay,
>                        int &vblankDelay, int &hblankDelay) const override;
> +       unsigned int hideFramesStartup() const override;
>         unsigned int hideFramesModeSwitch() const override;
>
>  private:
> @@ -54,6 +55,12 @@ void CamHelperImx290::getDelays(int &exposureDelay, int &gainDelay,
>         hblankDelay = 2;
>  }
>
> +unsigned int CamHelperImx290::hideFramesStartup() const
> +{
> +       /* On startup, we seem to get 1 bad frame. */
> +       return 1;
> +}
> +
>  unsigned int CamHelperImx290::hideFramesModeSwitch() const
>  {
>         /* After a mode switch, we seem to get 1 bad frame. */
> --
> 2.34.1
>
Jacopo Mondi Aug. 29, 2023, 7:20 a.m. UTC | #2
Hi Naush

On Thu, Aug 24, 2023 at 02:19:08PM +0100, Naushir Patuck via libcamera-devel wrote:
> The imx290 produces a single unusable frame on startup and mode switch.
> This is signalled to the IPA in the mode switch case, but not the
> startup case. Fix this.
>
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

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

Thanks
  j

> ---
>  src/ipa/rpi/cam_helper/cam_helper_imx290.cpp | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp b/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp
> index 7d6f5b549a73..d98b51cd56b3 100644
> --- a/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp
> +++ b/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp
> @@ -19,6 +19,7 @@ public:
>  	double gain(uint32_t gainCode) const override;
>  	void getDelays(int &exposureDelay, int &gainDelay,
>  		       int &vblankDelay, int &hblankDelay) const override;
> +	unsigned int hideFramesStartup() const override;
>  	unsigned int hideFramesModeSwitch() const override;
>
>  private:
> @@ -54,6 +55,12 @@ void CamHelperImx290::getDelays(int &exposureDelay, int &gainDelay,
>  	hblankDelay = 2;
>  }
>
> +unsigned int CamHelperImx290::hideFramesStartup() const
> +{
> +	/* On startup, we seem to get 1 bad frame. */
> +	return 1;
> +}
> +
>  unsigned int CamHelperImx290::hideFramesModeSwitch() const
>  {
>  	/* After a mode switch, we seem to get 1 bad frame. */
> --
> 2.34.1
>

Patch
diff mbox series

diff --git a/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp b/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp
index 7d6f5b549a73..d98b51cd56b3 100644
--- a/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp
+++ b/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp
@@ -19,6 +19,7 @@  public:
 	double gain(uint32_t gainCode) const override;
 	void getDelays(int &exposureDelay, int &gainDelay,
 		       int &vblankDelay, int &hblankDelay) const override;
+	unsigned int hideFramesStartup() const override;
 	unsigned int hideFramesModeSwitch() const override;
 
 private:
@@ -54,6 +55,12 @@  void CamHelperImx290::getDelays(int &exposureDelay, int &gainDelay,
 	hblankDelay = 2;
 }
 
+unsigned int CamHelperImx290::hideFramesStartup() const
+{
+	/* On startup, we seem to get 1 bad frame. */
+	return 1;
+}
+
 unsigned int CamHelperImx290::hideFramesModeSwitch() const
 {
 	/* After a mode switch, we seem to get 1 bad frame. */