diff mbox series

[1/7,Unstable] UBUNTU: SAUCE: media: ivsc: csi: don't count privacy on as error

Message ID 20240625093520.3804382-2-vicamo.yang@canonical.com
State New
Headers show
Series Fix vsc ace set host command timeout | expand

Commit Message

You-Sheng Yang June 25, 2024, 9:35 a.m. UTC
From: Wentong Wu <wentong.wu@intel.com>

BugLink: https://bugs.launchpad.net/bugs/2067364

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")
Reported-by: Hao Yao <hao.yao@intel.com>
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
Tested-by: Jason Chen <jason.z.chen@intel.com>
(cherry picked from https://lore.kernel.org/r/all/20240607132547.2820515-2-wentong.wu@intel.com)
Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>
---
 drivers/media/pci/intel/ivsc/mei_csi.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/media/pci/intel/ivsc/mei_csi.c b/drivers/media/pci/intel/ivsc/mei_csi.c
index f04a89584334..24060ac2c3a0 100644
--- a/drivers/media/pci/intel/ivsc/mei_csi.c
+++ b/drivers/media/pci/intel/ivsc/mei_csi.c
@@ -190,7 +190,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;
 	}