From nobody Thu Nov 14 04:44:43 2024 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 4B48A183CD8; Sun, 1 Sep 2024 14:33:10 +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=1725201190; cv=none; b=XAIiluVV4GQrh7nFGg2RU1blRf+Or9XBLw8wIQUSwSUC3aF1wOYIXOqSy4StAHoh1RQUp2qCQjkjtmQjUPDWO/t0v1s9a7lBxHfkaEml0ikYdZayBexA0Lwv+XDVDtfr5+3Kg/H9ydXM/X0H5z/bfR2V1+csjCsJVG0yl4IJX1M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725201190; c=relaxed/simple; bh=i7Lw4IfBoqo0kG80MnG3Ijy3VYTPrwyYdPOoj92o7xI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Tz7yf49G1IVpdnXCkvEoMocOZJ0aIiRZ1P9stLMft7EKdS66mAM7VWnvh62bp6y7ABHImP0Tv1PIV2trv3rlAvrjQ4ic2ZG4HNCdH2DjAgYfVfgXifmt7SfLia+I/DLngyUJ6tXLIUpRxkaxUiodaPgSbPg3m1J7XA0nr0d7PdI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FUAKzuVZ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FUAKzuVZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F0D5C4CECD; Sun, 1 Sep 2024 14:33:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725201190; bh=i7Lw4IfBoqo0kG80MnG3Ijy3VYTPrwyYdPOoj92o7xI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FUAKzuVZelACgDJySU4gn3P3OQd5uhWOgy0tz85SCcnN1WeELxJMJXS+GnDHsWRxt wRwi3P5gQkg+4eeRA3YmF+2L2Qea+UaXnUQoNwszDH98VwVoODtZ/lC+gmr9Cn1m7v vIDFgw4+NBLPBrY95Vlx89SKvOrlzHtKzB6x/cbeiEQvdAUkA/+y8GcV6pjlE7WQLR C4tnOxFUXDw6vAQ5IHR4LYDboZs+tdwLf6Yw/bRLuuUPaO1Sdd1aO7buaO5w0WKhVX 7gaYRi7Lp8anN1wUlal3HHGgT8XGni8h2NYnHWF76yEdpCltNkDY5FNghtiRH+JPgH WmdiGN68hKj0w== 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 v4 1/3] media: platform: mtk-mdp3: Get fine-grain control of cmdq_pkt_finalize() Date: Sun, 1 Sep 2024 14:32:57 +0000 Message-Id: <20240901143259.16849-2-chunkuang.hu@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240901143259.16849-1-chunkuang.hu@kernel.org> References: <20240901143259.16849-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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In order to have fine-grained control, use cmdq_pkt_eoc() and cmdq_pkt_jump_rel() to replace cmdq_pkt_finalize(). Signed-off-by: Chun-Kuang Hu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger --- drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 3 ++- drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c | 2 ++ drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c b/drivers= /media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c index ea2ea119dd2a..ef5dade35fd3 100644 --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c @@ -676,7 +676,8 @@ static struct mdp_cmdq_cmd *mdp_cmdq_prepare(struct mdp= _dev *mdp, dev_err(dev, "mdp_path_config error %d\n", pp_idx); goto err_free_path; } - cmdq_pkt_finalize(&cmd->pkt); + cmdq_pkt_eoc(&cmd->pkt); + cmdq_pkt_jump_rel(&cmd->pkt, CMDQ_INST_SIZE, mdp->cmdq_shift_pa[pp_idx]); =20 for (i =3D 0; i < num_comp; i++) { s32 inner_id =3D MDP_COMP_NONE; diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c b/drivers= /media/platform/mediatek/mdp3/mtk-mdp3-core.c index 37e7b985d52c..40623c1980bf 100644 --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c @@ -312,6 +312,8 @@ static int mdp_probe(struct platform_device *pdev) ret =3D PTR_ERR(mdp->cmdq_clt[i]); goto err_mbox_destroy; } + + mdp->cmdq_shift_pa[i] =3D cmdq_get_shift_pa(mdp->cmdq_clt[i]->chan); } =20 init_waitqueue_head(&mdp->callback_wq); diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h b/drivers= /media/platform/mediatek/mdp3/mtk-mdp3-core.h index 430251f63754..05cade1d098e 100644 --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h @@ -126,6 +126,7 @@ struct mdp_dev { u32 id_count; struct ida mdp_ida; struct cmdq_client *cmdq_clt[MDP_PP_MAX]; + u8 cmdq_shift_pa[MDP_PP_MAX]; wait_queue_head_t callback_wq; =20 struct v4l2_device v4l2_dev; --=20 2.34.1 From nobody Thu Nov 14 04:44:43 2024 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 5B6AE184545; Sun, 1 Sep 2024 14:33:13 +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=1725201193; cv=none; b=Z9FnWQJZPNBfP2YnY8ogH6WRhnRv6ddid1lehU0m2gMgQ5Vau8CKaRoza7lrnF8GE3HxZcB/AgyOFFJXc1S2y2SCMDL2sexn08NHkHKXqN6R2agLXyZdgfdbfyu/xA3lD/Q22cHDAnfF7FcZISYfcqVnNzzcQRT8SIlZ7lmJ9AI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725201193; c=relaxed/simple; bh=CzM2V1KtCAgZIRHM5qi4/f/LeVuo0+4iK2VKniGUAgc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=fAi3LWhfUYzUpWI8eKjuoBuXUhXh7rxKqMCDYAZ79xa6fzvIi62PlCndu7n90Y26sbD6FHsUEbJmPAtjyjA2fBnv2h66+hnt4/jswPQoS861kz3dmbjJRfVYl/4r7rzlo7eSjFLiLJoYAfhv/THOHhfdvwWLmS2ljNgbDsLN+J8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=djwqOs+K; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="djwqOs+K" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6EA8EC4CEC3; Sun, 1 Sep 2024 14:33:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725201192; bh=CzM2V1KtCAgZIRHM5qi4/f/LeVuo0+4iK2VKniGUAgc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=djwqOs+KAxYksQ3ycimQY9MHBo+Ag87hDjdbOUePuoPZHv3QzObQ0LnQ7jrHRcRL9 sPwawMpsUl1u0+2dDFtmyWBJP3Bl98kyXk4Gd3DAttxCzvPLY+NYqMbuUrZJZuHvAh J1zK01JdE4eT4OCFv8RNWAKcsJ8Q2W8aG52TUk7e9UlGL0bJM7J1Hyms//xvIoWp71 OU3Cg+ifcK3GMVBN/A5e3RK7yToc0NU9YwVwpa6WXjriM03bpVRmquVvhOQXO9iO0c gTQjlqdYiuqqQ7X0SlVyz22Jg4Cl2vqzisWGnIDOqqF8XhzYizrNHRRCPTcfSuITKs kw0VjQrPy2wLQ== 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 v4 2/3] media: platform: mtk-mdp3: Use cmdq_pkt_create() and cmdq_pkt_destroy() Date: Sun, 1 Sep 2024 14:32:58 +0000 Message-Id: <20240901143259.16849-3-chunkuang.hu@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240901143259.16849-1-chunkuang.hu@kernel.org> References: <20240901143259.16849-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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use cmdq_pkt_create() and cmdq_pkt_destroy() common function instead of implementing mdp3 version. Signed-off-by: Chun-Kuang Hu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger --- .../platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 46 ++----------------- .../platform/mediatek/mdp3/mtk-mdp3-cmdq.h | 1 + 2 files changed, 6 insertions(+), 41 deletions(-) diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c b/drivers= /media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c index ef5dade35fd3..740a484c8eb4 100644 --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c @@ -471,43 +471,6 @@ static int mdp_path_config(struct mdp_dev *mdp, struct= mdp_cmdq_cmd *cmd, return 0; } =20 -static int mdp_cmdq_pkt_create(struct cmdq_client *client, struct cmdq_pkt= *pkt, - size_t size) -{ - struct device *dev; - dma_addr_t dma_addr; - - pkt->va_base =3D kzalloc(size, GFP_KERNEL); - if (!pkt->va_base) - return -ENOMEM; - - pkt->buf_size =3D size; - pkt->cl =3D (void *)client; - - dev =3D client->chan->mbox->dev; - dma_addr =3D dma_map_single(dev, pkt->va_base, pkt->buf_size, - DMA_TO_DEVICE); - if (dma_mapping_error(dev, dma_addr)) { - dev_err(dev, "dma map failed, size=3D%u\n", (u32)(u64)size); - kfree(pkt->va_base); - return -ENOMEM; - } - - pkt->pa_base =3D dma_addr; - - return 0; -} - -static void mdp_cmdq_pkt_destroy(struct cmdq_pkt *pkt) -{ - struct cmdq_client *client =3D (struct cmdq_client *)pkt->cl; - - dma_unmap_single(client->chan->mbox->dev, pkt->pa_base, pkt->buf_size, - DMA_TO_DEVICE); - kfree(pkt->va_base); - pkt->va_base =3D NULL; -} - static void mdp_auto_release_work(struct work_struct *work) { struct mdp_cmdq_cmd *cmd; @@ -538,7 +501,7 @@ static void mdp_auto_release_work(struct work_struct *w= ork) wake_up(&mdp->callback_wq); } =20 - mdp_cmdq_pkt_destroy(&cmd->pkt); + cmdq_pkt_destroy(mdp->cmdq_clt[cmd->pp_idx], &cmd->pkt); kfree(cmd->comps); cmd->comps =3D NULL; kfree(cmd); @@ -578,7 +541,7 @@ static void mdp_handle_cmdq_callback(struct mbox_client= *cl, void *mssg) if (refcount_dec_and_test(&mdp->job_count)) wake_up(&mdp->callback_wq); =20 - mdp_cmdq_pkt_destroy(&cmd->pkt); + cmdq_pkt_destroy(mdp->cmdq_clt[cmd->pp_idx], &cmd->pkt); kfree(cmd->comps); cmd->comps =3D NULL; kfree(cmd); @@ -620,7 +583,7 @@ static struct mdp_cmdq_cmd *mdp_cmdq_prepare(struct mdp= _dev *mdp, goto err_uninit; } =20 - ret =3D mdp_cmdq_pkt_create(mdp->cmdq_clt[pp_idx], &cmd->pkt, SZ_16K); + ret =3D cmdq_pkt_create(mdp->cmdq_clt[pp_idx], &cmd->pkt, SZ_16K); if (ret) goto err_free_cmd; =20 @@ -700,6 +663,7 @@ static struct mdp_cmdq_cmd *mdp_cmdq_prepare(struct mdp= _dev *mdp, cmd->comps =3D comps; cmd->num_comps =3D num_comp; cmd->mdp_ctx =3D param->mdp_ctx; + cmd->pp_idx =3D pp_idx; =20 kfree(path); return cmd; @@ -711,7 +675,7 @@ static struct mdp_cmdq_cmd *mdp_cmdq_prepare(struct mdp= _dev *mdp, err_free_comps: kfree(comps); err_destroy_pkt: - mdp_cmdq_pkt_destroy(&cmd->pkt); + cmdq_pkt_destroy(mdp->cmdq_clt[pp_idx], &cmd->pkt); err_free_cmd: kfree(cmd); err_uninit: diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.h b/drivers= /media/platform/mediatek/mdp3/mtk-mdp3-cmdq.h index 53a30ad7e0b0..935ae9825728 100644 --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.h +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.h @@ -35,6 +35,7 @@ struct mdp_cmdq_cmd { struct mdp_comp *comps; void *mdp_ctx; u8 num_comps; + u8 pp_idx; }; =20 struct mdp_dev; --=20 2.34.1 From nobody Thu Nov 14 04:44:43 2024 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 59922185927; Sun, 1 Sep 2024 14:33:15 +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=1725201196; cv=none; b=M1FzYylv9m7dzClLToeTpvsrWNyNCNmPkGfCgiYanAWMRN5fCef60XbtvDMNKksZBdq6OktoizkkZcrZkyThsps6wtto11QBvtwJ3++ZhcA/TzO0RUeiVU6D6KseC3m3Qz4EMbhfC1KB6weBpsJPjtztEsIf8sQnZy61IUDB3PQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725201196; c=relaxed/simple; bh=ROGEn5ECVelo0EfWlJ1OSMy/l5R+qmtaTbsKv+Infh4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dKLn8i5wRBMYF2dYUvX2ExhsskkwNH6Oscsw0kthcfVETYmCJjttp+YsmWzvZYg81bg+iikLW/VXVobI6mCFZM65AJ2AAWpwctFRA4qbpCM/yPGcNouQnppswKS1L3K3eyachsuq7SuYxTzTYsyGra/tzzXVHSuq/rRBvy+ZEB8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=i6MkhTrF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="i6MkhTrF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56570C4CEC8; Sun, 1 Sep 2024 14:33:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725201195; bh=ROGEn5ECVelo0EfWlJ1OSMy/l5R+qmtaTbsKv+Infh4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i6MkhTrFq716cdv+8qD66wvIL1A8tVM3FVlgHNjG3zO3nFUrcjfTC7JZLpInpP/Q3 0NiMeypm1Lnf0c5Y6eNvbTEpbBlVdc1ff6hslU0NsODASxmRd2Z0rXCT2SMuzebont FLxi+knnKYiGKcArMn2iLv3IX/SBwkF2eunhz7evzPoJsuSxxHgWbtkJvrwKQz0Zbo lRZTDB8F+FrKzMABEQUdYk2al3otfZ6zfvfep/FGVoAkJ2y/lq7Al4m1d1aeSvdoII 9pHenYqLpsfI0Ag8f+obus8e2aoqu1tKiT/F1BbT0Km1cUbsHElSpNnOj+eNEfBOTE lOmB9NHPCJRxA== 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 v4 3/3] soc: mediatek: cmdq: Remove cmdq_pkt_finalize() helper function Date: Sun, 1 Sep 2024 14:32:59 +0000 Message-Id: <20240901143259.16849-4-chunkuang.hu@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240901143259.16849-1-chunkuang.hu@kernel.org> References: <20240901143259.16849-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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In order to have fine-grained control, use cmdq_pkt_eoc() and cmdq_pkt_jump_rel() to replace cmdq_pkt_finalize(). Signed-off-by: Chun-Kuang Hu Acked-by: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno --- drivers/soc/mediatek/mtk-cmdq-helper.c | 22 ---------------------- include/linux/soc/mediatek/mtk-cmdq.h | 13 ------------- 2 files changed, 35 deletions(-) diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/= mtk-cmdq-helper.c index a8fccedba83f..2a47dda4dd4a 100644 --- a/drivers/soc/mediatek/mtk-cmdq-helper.c +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c @@ -538,27 +538,5 @@ int cmdq_pkt_eoc(struct cmdq_pkt *pkt) } EXPORT_SYMBOL(cmdq_pkt_eoc); =20 -int cmdq_pkt_finalize(struct cmdq_pkt *pkt) -{ - struct cmdq_instruction inst =3D { {0} }; - int err; - - /* insert EOC and generate IRQ for each command iteration */ - inst.op =3D CMDQ_CODE_EOC; - inst.value =3D CMDQ_EOC_IRQ_EN; - err =3D cmdq_pkt_append_command(pkt, inst); - if (err < 0) - return err; - - /* JUMP to end */ - inst.op =3D CMDQ_CODE_JUMP; - inst.value =3D CMDQ_JUMP_PASS >> - cmdq_get_shift_pa(((struct cmdq_client *)pkt->cl)->chan); - err =3D cmdq_pkt_append_command(pkt, inst); - - return err; -} -EXPORT_SYMBOL(cmdq_pkt_finalize); - MODULE_DESCRIPTION("MediaTek Command Queue (CMDQ) driver"); MODULE_LICENSE("GPL v2"); diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/medi= atek/mtk-cmdq.h index 5bee6f7fc400..0c3906e8ad19 100644 --- a/include/linux/soc/mediatek/mtk-cmdq.h +++ b/include/linux/soc/mediatek/mtk-cmdq.h @@ -391,14 +391,6 @@ int cmdq_pkt_jump_rel(struct cmdq_pkt *pkt, s32 offset= , u8 shift_pa); */ int cmdq_pkt_eoc(struct cmdq_pkt *pkt); =20 -/** - * cmdq_pkt_finalize() - Append EOC and jump command to pkt. - * @pkt: the CMDQ packet - * - * Return: 0 for success; else the error code is returned - */ -int cmdq_pkt_finalize(struct cmdq_pkt *pkt); - #else /* IS_ENABLED(CONFIG_MTK_CMDQ) */ =20 static inline int cmdq_dev_get_client_reg(struct device *dev, @@ -519,11 +511,6 @@ static inline int cmdq_pkt_eoc(struct cmdq_pkt *pkt) return -EINVAL; } =20 -static inline int cmdq_pkt_finalize(struct cmdq_pkt *pkt) -{ - return -EINVAL; -} - #endif /* IS_ENABLED(CONFIG_MTK_CMDQ) */ =20 #endif /* __MTK_CMDQ_H__ */ --=20 2.34.1