lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240902-imx290-avail-v3-5-b32a12799fed@skidata.com>
Date: Mon, 02 Sep 2024 17:57:30 +0200
From: bbara93@...il.com
To: Mauro Carvalho Chehab <mchehab@...nel.org>, 
 Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>, 
 Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: Hans de Goede <hdegoede@...hat.com>, 
 Laurent Pinchart <laurent.pinchart@...asonboard.com>, 
 Alexander Stein <alexander.stein@...tq-group.com>, 
 linux-media@...r.kernel.org, linux-kernel@...r.kernel.org, 
 Benjamin Bara <benjamin.bara@...data.com>
Subject: [PATCH v3 5/7] media: i2c: imx290: Avoid communication during
 probe()

From: Benjamin Bara <benjamin.bara@...data.com>

As we don't know the mode during probe(), it doesn't make sense to
update the sensors' registers with assumptions. Avoid the communication
in this case.

Signed-off-by: Benjamin Bara <benjamin.bara@...data.com>
---
Changes since v2:
- new
---
 drivers/media/i2c/imx290.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c
index ece4d66001f5..9610e9fd2059 100644
--- a/drivers/media/i2c/imx290.c
+++ b/drivers/media/i2c/imx290.c
@@ -769,6 +769,10 @@ static int imx290_set_ctrl(struct v4l2_ctrl *ctrl)
 	if (!pm_runtime_get_if_in_use(imx290->dev))
 		return 0;
 
+	/* V4L2 controls values will be applied only when mode is known */
+	if (imx290->current_mode == &imx290_mode_off)
+		return 0;
+
 	state = v4l2_subdev_get_locked_active_state(&imx290->sd);
 	format = v4l2_subdev_state_get_format(state, 0);
 

-- 
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ