From patchwork Thu Feb 22 15:41:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chun-Kuang Hu X-Patchwork-Id: 204827 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp25557dyb; Thu, 22 Feb 2024 07:44:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXlfprx2kTl2fkcEXVoQdznDCAK3zKZeovarhiNnAEuCr+MxGHRCWEqlCEXoS5Ag6y2cKDCg4JU3qRFUH64djf0cYy5jg== X-Google-Smtp-Source: AGHT+IGn6J8hLFoGa4kqaAhAU6qoPPVYW9ShyF/T1y2uLUz5d4VU3KbiyN/91IAzqYb0I8Fgon86 X-Received: by 2002:a05:6122:25f2:b0:4d1:34a1:d180 with SMTP id ds18-20020a05612225f200b004d134a1d180mr4475070vkb.11.1708616664540; Thu, 22 Feb 2024 07:44:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708616664; cv=pass; d=google.com; s=arc-20160816; b=AfsXPvLTZeC+Bz+ceZ0aHlN5zRI+1XNf4ZvF+Rt21yVSEB6z5XKhnKv1M6ijiS05sa GKgXya7WIEm89uGkVM4EihlbkIFBcAVudHCDzqcs/Dx+x/ba1845dh/MH9Pyo9S7MUc+ GsqSVdw9/JJ4wIhsqejrl0e37Pdi6foHGv5c1c3FWYZ7QKfYXNlT4qTYv9lZfQ3MH6od qvmGDuXqAXVFFBBIoWutQuRTVB2Kqq+L37B34fyWDHloDri8sPE3qvcRqIxNw9UTk8C4 qNXFy8zEiCXn2n3pybomOVohV+dsN04Htq7g0i7cJnM9z+8cfvRe2cJ/qTNhd9RYJeoM D/Xg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=5gDlZsYzSYffdtx1la/FNhRlTDlkb5YIvVty12LIpcE=; fh=vD8tJ9d2mp7H51jNKyMUDglMjHY1Ew4hzsuiSabS+YY=; b=AFLlehP1dMwWEecgS2zxpl7t18dUhNShyPh2jH/IP9fpCBebltv/oC+LJdF8GqEA5z RZ9/3TMYwQA/3Nr68Qqhz6G7orzbOT5qRZiA5+nx3j/sJGZ+CLy6vALoQvYYQJACM1Jb 41YiKQlGNs/nkknvqqKoIoZU7xO5nb06joUVaL3xScQfdNvVtF2BgLnzbO7z8s9ASyGl rCVmvFIcM9YZI9RaGmnWUMKbvQzyCOUuO670qCL3UzKufynsns2EO9+858qvdVt13q+s nly2K0NEKPbxfFxJMwBIZzzSsX62cY6SapoiZ0cKxQvFlkz55kgolVewJ/x2uSLgY83g TThA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jqhMuhuM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-76803-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76803-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q2-20020ad45742000000b0068f2eed8e0esi13405117qvx.287.2024.02.22.07.44.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 07:44:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76803-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jqhMuhuM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-76803-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76803-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 55BAA1C24948 for ; Thu, 22 Feb 2024 15:44:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EBC46156961; Thu, 22 Feb 2024 15:41:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jqhMuhuM" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5DC11155A24; Thu, 22 Feb 2024 15:41:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708616508; cv=none; b=TLmZ9DtP2NBCE+zuIYLz/GNuwhi1HzxsPKXaf5irHBeWarUT6oIMx+vT847B9uBJWEFONxTHkN77SVJeR8MHV+qJMeIhR/JrY4ERfDNPFxU+tKXbSbhsHBWxYV8tWB10LU1ya9XeIGDOKZY82rr6L8TEGSrQFMHA4LtGJGWpBsE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708616508; c=relaxed/simple; bh=nGIP2vJqkcuTspXXlk6nKjt5v1e19Z7ObipqHsmxyZM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=hTNyFmb6fBXkUwFogSwWPZTBqikz2hAGPjeBP/aGEWhwm8+uxCMF2fRwucGqQEV2EOrOp8Jo7ZyIXWt1JIEeyVT1W6DGm3mzE1EWtREcaPsZm4MzxAQNsD/ugXUXJz8N6fyp4Rs73GIp2s1i1ucz0s/hV98u985n7spNcHMnHpM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jqhMuhuM; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A070C43394; Thu, 22 Feb 2024 15:41:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708616508; bh=nGIP2vJqkcuTspXXlk6nKjt5v1e19Z7ObipqHsmxyZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jqhMuhuMr3ZVz+g+vLndCqRLYsyQZ4IinHR1grM3SGkXk45xdHov7i6pbWL1tNzC7 ytz8QU3K6Q8kVwdoQJpx01oWPHIIQ8S3+lz9k1QGQ1qhy9Xz+chv3XLLm+pq4YUA2z 7m9plYDKkAc53EjNpO6qtn2WsZJBIYtB58RkgZ5cW8ouNZRjR7aOCVCs5iB8/lyGEq 1sp8GncUj0cT5w2oga4GHKDdONNXrwk2yZtsKNlEht08xZtyjjwZLbN2WyQNTugeN5 TriCyLboxKdX/bgFn6GItjoW3pQUoEupiVACgnfU+CtbJBYQ5kbqA5oN31Fi4/SAG4 y0fKqeK49d0ZA== From: Chun-Kuang Hu To: Matthias Brugger , AngeloGioacchino Del Regno , Mauro Carvalho Chehab , Moudy Ho , "Jason-JH . Lin" , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: Chun-Kuang Hu Subject: [PATCH v2 06/12] soc: mediatek: cmdq: Remove cmdq_pkt_flush_async() helper function Date: Thu, 22 Feb 2024 15:41:14 +0000 Message-Id: <20240222154120.16959-7-chunkuang.hu@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240222154120.16959-1-chunkuang.hu@kernel.org> References: <20240222154120.16959-1-chunkuang.hu@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791614427353382920 X-GMAIL-MSGID: 1791614427353382920 cmdq_pkt_flush_async() is not used by all client drivers (MediaTek drm driver and MediaTek mdp3 driver), so remove it. Signed-off-by: Chun-Kuang Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 15 --------------- include/linux/soc/mediatek/mtk-cmdq.h | 18 ------------------ 2 files changed, 33 deletions(-) diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c index 766dbafaef62..bbe41302210a 100644 --- a/drivers/soc/mediatek/mtk-cmdq-helper.c +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c @@ -446,19 +446,4 @@ int cmdq_pkt_finalize(struct cmdq_pkt *pkt) } EXPORT_SYMBOL(cmdq_pkt_finalize); -int cmdq_pkt_flush_async(struct cmdq_pkt *pkt) -{ - int err; - struct cmdq_client *client = (struct cmdq_client *)pkt->cl; - - err = mbox_send_message(client->chan, pkt); - if (err < 0) - return err; - /* We can send next packet immediately, so just call txdone. */ - mbox_client_txdone(client->chan, 0); - - return 0; -} -EXPORT_SYMBOL(cmdq_pkt_flush_async); - MODULE_LICENSE("GPL v2"); diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/mediatek/mtk-cmdq.h index 45110494ee9d..f82e789550ae 100644 --- a/include/linux/soc/mediatek/mtk-cmdq.h +++ b/include/linux/soc/mediatek/mtk-cmdq.h @@ -297,19 +297,6 @@ int cmdq_pkt_eoc(struct cmdq_pkt *pkt); */ int cmdq_pkt_finalize(struct cmdq_pkt *pkt); -/** - * cmdq_pkt_flush_async() - trigger CMDQ to asynchronously execute the CMDQ - * packet and call back at the end of done packet - * @pkt: the CMDQ packet - * - * Return: 0 for success; else the error code is returned - * - * Trigger CMDQ to asynchronously execute the CMDQ packet and call back - * at the end of done packet. Note that this is an ASYNC function. When the - * function returned, it may or may not be finished. - */ -int cmdq_pkt_flush_async(struct cmdq_pkt *pkt); - #else /* IS_ENABLED(CONFIG_MTK_CMDQ) */ static inline int cmdq_dev_get_client_reg(struct device *dev, @@ -425,11 +412,6 @@ static inline int cmdq_pkt_finalize(struct cmdq_pkt *pkt) return -EINVAL; } -static inline int cmdq_pkt_flush_async(struct cmdq_pkt *pkt) -{ - return -EINVAL; -} - #endif /* IS_ENABLED(CONFIG_MTK_CMDQ) */ #endif /* __MTK_CMDQ_H__ */