From patchwork Tue Jun 25 09:31:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1952008 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W7fk609xVz20X6 for ; Tue, 25 Jun 2024 19:32:14 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1sM2X2-0008Ss-0h; Tue, 25 Jun 2024 09:32:08 +0000 Received: from mail-pl1-f179.google.com ([209.85.214.179]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1sM2Wy-0008Pw-FL for kernel-team@lists.ubuntu.com; Tue, 25 Jun 2024 09:32:04 +0000 Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1f9b523a15cso37804085ad.0 for ; Tue, 25 Jun 2024 02:32:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719307922; x=1719912722; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=af9Ku23chq0WCbpFA/zESUEXFxtR1KXXr1u0FAIUpqI=; b=MOphKPuhtSSlh3U5PfWBmbjHfihZob4X/MEvofrwRjsfVIqGStytRP6oe263GIJLPE hfBlOtU4+m4Q6bPAyepc+jJZ21VPOyhL/MQ3sKPm1G5/cm8gO11PZGYtrozLar1c1avw 5Q/r0BDkVnNt403UarUJM1nyqQwz77d5kWnc0MkiRqpyh0fLSH2PEyzLfnNSEOKxX6D0 DQDeJve5qRJgT4J6z94p2xLiLURNm1dOJkHaUWeYxJy/HEOTEZZxH/NcSkC+FaooWSHq llRsUL++iszNzqQvmZYBHlCxlG9eyV6rbPWM1a8jc+yFi9QKvx91ZkQP/CuOJ/AcfU7A 1WUA== X-Gm-Message-State: AOJu0Yz6XFnw+ez/SPOmDud+JiwNsW5p2d81UFRXN4IRCniGBDoZ3cec QxZio7WVZ99dHAZIGgU1eY9NxxWDc0kNiDkBjQuEAalUo0yLeZREUOYC82SZ X-Google-Smtp-Source: AGHT+IGFeumL9yzc8GaiUmTSrydEYso6wIVL4t+2Tn8P6blsPVZ5jk+NrPhjWcz+1O/7q4GX3xlSCg== X-Received: by 2002:a17:902:ea0e:b0:1f7:3a70:9e71 with SMTP id d9443c01a7336-1fa5e6723f7mr48465475ad.13.1719307922337; Tue, 25 Jun 2024 02:32:02 -0700 (PDT) Received: from localhost.localdomain (125-229-129-140.hinet-ip.hinet.net. [125.229.129.140]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9eb3c5a74sm76664405ad.151.2024.06.25.02.32.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 02:32:01 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/8][SRU][Noble] UBUNTU: SAUCE: media: ivsc: csi: don't count privacy on as error Date: Tue, 25 Jun 2024 17:31:32 +0800 Message-ID: <20240625093138.3793885-3-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240625093138.3793885-1-vicamo.yang@canonical.com> References: <20240625093138.3793885-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.214.179; envelope-from=vicamo@gmail.com; helo=mail-pl1-f179.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Wentong Wu 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 Signed-off-by: Wentong Wu Tested-by: Jason Chen (cherry picked from https://lore.kernel.org/r/all/20240607132547.2820515-2-wentong.wu@intel.com) Signed-off-by: You-Sheng Yang --- drivers/media/pci/intel/ivsc/mei_csi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/media/pci/intel/ivsc/mei_csi.c b/drivers/media/pci/intel/ivsc/mei_csi.c index 3c74d06a27fa..6e2d865cd0d5 100644 --- a/drivers/media/pci/intel/ivsc/mei_csi.c +++ b/drivers/media/pci/intel/ivsc/mei_csi.c @@ -188,7 +188,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; }