Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH v2 1/2] media: i2c: imx415: Return test pattern write errors
@ 2026-08-05 13:56 Narasimharao Vadlamudi
  2026-08-05 13:56 ` [PATCH v2 2/2] media: i2c: imx415: Release runtime PM reference on VBLANK error Narasimharao Vadlamudi
  0 siblings, 1 reply; 2+ messages in thread
From: Narasimharao Vadlamudi @ 2026-08-05 13:56 UTC (permalink / raw)
  To: sakari.ailus, mchehab
  Cc: michael.riesch, jacopo.mondi, linux-media, linux-kernel,
	Narasimharao Vadlamudi, stable

imx415_set_testpattern() accumulates failures from cci_write(), but drops
the value and always returns success. Return the accumulated error so V4L2
reports failures to userspace.

Fixes: d5df1c7f3f83 ("media: i2c: imx415: Convert to new CCI register access helpers")
Cc: stable@vger.kernel.org
Reviewed-by: Michael Riesch <michael.riesch@collabora.com>
Signed-off-by: Narasimharao Vadlamudi <ahmisaranrao@gmail.com>
---
 drivers/media/i2c/imx415.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/imx415.c b/drivers/media/i2c/imx415.c
index 0b424c17e880..f5cd79da512c 100644
--- a/drivers/media/i2c/imx415.c
+++ b/drivers/media/i2c/imx415.c
@@ -686,7 +686,7 @@ static int imx415_set_testpattern(struct imx415 *sensor, int val)
 		cci_write(sensor->regmap, IMX415_DIG_CLP_MODE, 0x01, &ret);
 		cci_write(sensor->regmap, IMX415_WRJ_OPEN, 0x01, &ret);
 	}
-	return 0;
+	return ret;
 }
 
 static int imx415_s_ctrl(struct v4l2_ctrl *ctrl)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH v2 2/2] media: i2c: imx415: Release runtime PM reference on VBLANK error
  2026-08-05 13:56 [PATCH v2 1/2] media: i2c: imx415: Return test pattern write errors Narasimharao Vadlamudi
@ 2026-08-05 13:56 ` Narasimharao Vadlamudi
  0 siblings, 0 replies; 2+ messages in thread
From: Narasimharao Vadlamudi @ 2026-08-05 13:56 UTC (permalink / raw)
  To: sakari.ailus, mchehab
  Cc: michael.riesch, jacopo.mondi, linux-media, linux-kernel,
	Narasimharao Vadlamudi, stable

The VBLANK path returned immediately when programming VMAX failed after
pm_runtime_get_if_in_use() had taken a runtime PM reference. Break out of
the switch instead so the common pm_runtime_put() path is used.

Fixes: 3bcae55ab96a ("media: i2c: imx415: Add read/write control of VBLANK")
Cc: stable@vger.kernel.org
Reviewed-by: Michael Riesch <michael.riesch@collabora.com>
Signed-off-by: Narasimharao Vadlamudi <ahmisaranrao@gmail.com>
---
 drivers/media/i2c/imx415.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/imx415.c b/drivers/media/i2c/imx415.c
index f5cd79da512c..c3b22b238ea0 100644
--- a/drivers/media/i2c/imx415.c
+++ b/drivers/media/i2c/imx415.c
@@ -720,7 +720,7 @@ static int imx415_s_ctrl(struct v4l2_ctrl *ctrl)
 		ret = cci_write(sensor->regmap, IMX415_VMAX,
 				format->height + ctrl->val, NULL);
 		if (ret)
-			return ret;
+			break;
 		/*
 		 * Exposure is set based on VMAX which has just changed, so
 		 * program exposure register as well
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-05 13:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-05 13:56 [PATCH v2 1/2] media: i2c: imx415: Return test pattern write errors Narasimharao Vadlamudi
2026-08-05 13:56 ` [PATCH v2 2/2] media: i2c: imx415: Release runtime PM reference on VBLANK error Narasimharao Vadlamudi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox