From patchwork Tue Jun 25 09:35:14 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: 1952017 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 4W7fpH0D52z20ZS for ; Tue, 25 Jun 2024 19:35:50 +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 1sM2aX-0001vU-OJ; Tue, 25 Jun 2024 09:35:45 +0000 Received: from mail-pj1-f53.google.com ([209.85.216.53]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1sM2aV-0001uY-Oc for kernel-team@lists.ubuntu.com; Tue, 25 Jun 2024 09:35:43 +0000 Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-2c84df0e2f4so1781620a91.1 for ; Tue, 25 Jun 2024 02:35:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719308142; x=1719912942; 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=zysK+vcjOj4HU2mOxJH8EsN7SnDKxEgIoj/oAKUNwyE=; b=GkMvy1jeeQzDYlyVjUGwOAIzuJB35cgfXRhYhp2tjeVh8Yx9lne8XHIP3keyp80/EY +PvaX4K4Ia2Y64X7akUITVKxNCV1KZVzISEeuicIic94IUYCeQ5I/U/5ID42LLS/AA3g tjRmKnzZbQI6I5bWPmvGXnj6uQHY7rgJyjPUmgWkA+8iEPhPiDtC8JmifhuBXwnzH/Ee asDJN8owOBh4CUemRW0ioWUKesznA382KsZJYGtgmo0hs6/0RRLrzoksREfs9cJbX8q8 wG9g4xWZ/X8DKXCxyWYHA2zfWrjU9CezC8PUF1tETNn7f4X+zUwQPlar+jzMAFsnibBm iRvA== X-Gm-Message-State: AOJu0YwcfNaB8ATYHA8YJ61yjYMtF1sq3LP1FLTiXm9aYEoji1ZdeFHO Di7uTS9DaCtnBJ8bDGUvQuPg2yoUCFrgNxQAOG96loGXPLMrNlhvJ7sqTivS X-Google-Smtp-Source: AGHT+IFIXYSUcNdTc5sdALdyG5XOqiWOCSVNWfRWahA7kIOOVdPs8AXgfd0tQumf0uz6NsUGxpbwOQ== X-Received: by 2002:a17:90a:c685:b0:2c8:647:3238 with SMTP id 98e67ed59e1d1-2c8489d91c9mr10883094a91.9.1719308141590; Tue, 25 Jun 2024 02:35:41 -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 98e67ed59e1d1-2c819db9803sm8176683a91.45.2024.06.25.02.35.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 02:35:41 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/7][Unstable] UBUNTU: SAUCE: media: ivsc: csi: don't count privacy on as error Date: Tue, 25 Jun 2024 17:35:14 +0800 Message-ID: <20240625093520.3804382-2-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240625093520.3804382-1-vicamo.yang@canonical.com> References: <20240625093520.3804382-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.53; envelope-from=vicamo@gmail.com; helo=mail-pj1-f53.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 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; }