Skip to contentSkip to conversation

media: ivsc: csi: don't count privacy on as error

git:media_stage/master Hans Verkuil 1 participant 1 message Jun 15, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

This is an automatic generated email to let you know that the following patch were queued:

Subject: media: ivsc: csi: don't count privacy on as error
Author:  Wentong Wu <[email protected]>
Date:    Fri Jun 7 21:25:45 2024 +0800

Prior to the ongoing command privacy is on, it would return -1 to indicate the current privacy status, and the ongoing command would be well executed by firmware as well, so this is not error. This patch changes its behavior to notify privacy on directly by V4L2 privacy control instead of reporting error.

Fixes 29006e196a56 ("media: pci: intel: ivsc: Add CSI submodule")
Cc [email protected] # for 6.6 and later
 drivers/media/pci/intel/ivsc/mei_csi.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

---

drivers/media/pci/intel/ivsc/mei_csi.c +5 -1
index c6d8f72e4eec..16791a7f4f15 100644
@@ -192,7 +192,11 @@ static int mei_csi_send(struct mei_csi *csi, u8 *buf, size_t len)
 
 	/* command response status */
 	ret = csi->cmd_response.status;
-	if (ret) {
+	if (ret == -1) {
+		/* notify privacy on instead of reporting error */
+		ret = 0;
+		v4l2_ctrl_s_ctrl(csi->privacy_ctrl, 1);
+	} else if (ret) {
 		ret = -EINVAL;
 		goto out;
 	}