Message ID | 20240215004931.3808-7-chunkuang.hu@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-66201-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp86163dyb; Wed, 14 Feb 2024 16:52:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWwyVy7TyxrO/nlxkkxJzK3RpEmGv4EulxHPCxqA2dEnn5envODs2BVsyF0oz616prVYc48sb3f73eImOY6f8BA8OctUg== X-Google-Smtp-Source: AGHT+IFXa/YBy8uTMIgVT0EhvdJjPwvOP+jlcfcH6mCUU48nSDPQaCn6mVgKtX15GfVztszJj3t4 X-Received: by 2002:a17:906:b352:b0:a3c:eeef:2283 with SMTP id cd18-20020a170906b35200b00a3ceeef2283mr120279ejb.43.1707958342272; Wed, 14 Feb 2024 16:52:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707958342; cv=pass; d=google.com; s=arc-20160816; b=0/kwZwV/zqX1VbI/rFvRADX6AWlowgQQ0qNQrvjc9a2kNp3Q/5AYQzrKTRaVs575A6 HsYdSWnxYHiXudVC+br1p5KyL053A0fwCyOj0JEWwfrK19foMsOTeF2Q2DjNOt9cf55z KYaI/edV5Kc0CrSoGbhmOzVg3GWf0rg2qw9BQGKJdV85PyjIS6oAzDazq9atSdevNTAl nfeD2IWTQnggyNQHJSaWqcZxQfKcif4bKlvzUuO/Tu/9znabwyecjcJf8EhjqvNmPVt/ 5XfBeq85hQEuNxpdhUXqbca0FsynxYAREBjlGvulyGnyK32KsAtf1IAfES8F5DFiaYlw g5WA== 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=HWhPwNVsEg/1QoH03Vp98EnAjJm6qL80DsCwBXaI3Bk=; fh=5fJ5HuOhQ8tDYrJs098Y1CAol/Fv56LtamixBAqCzME=; b=dDCvaJHf2hrSjLs8nplPtqUGNaRyd2xCP5U4Md3id2sI5oiZljnw9LAN5Gu06oT5dO AqS0mdDyU0HzMd1xDgdfpJZhLtnNLekPm3916Rpo3hWYz0N3G82kOIOOVoacSfpWizeB 8R90gHZ/5POzsevaCSFlzgUCG52bG2q2WhWZXFCOXkNh2t1qr9LvYgggtq18Vo9tStP5 RHvdOJRPQHOLfQHkFT1xSQ4lH61+R+c+XbNgRXqzLnV3LM3t2J5HunyqSAke77pUsjzo WWRaH6iXwkVIcLST84av9Jkg3NJDWYFYdWNSWb3zZlP7WyjoHQIxurbfTSExB1qVXzGN ueww==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Rdh5+2zv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-66201-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66201-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id y18-20020a1709060a9200b00a3d310a2683si62115ejf.663.2024.02.14.16.52.22 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 16:52:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66201-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Rdh5+2zv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-66201-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66201-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 am.mirrors.kernel.org (Postfix) with ESMTPS id D0A761F22D64 for <ouuuleilei@gmail.com>; Thu, 15 Feb 2024 00:52:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 604E0E559; Thu, 15 Feb 2024 00:50:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Rdh5+2zv" 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 D2D96D536; Thu, 15 Feb 2024 00:50: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=1707958215; cv=none; b=BRPvZKUlmS1G+eBQCBvm1DHfzoFodY+v7werLdV0Jqc7pPFMaszDdnV+XWHqZPXRxgWUhqfVSUrHoWH1Ywj2aAhHWt3REtPdLjFSyutmLW0CXDuQlAsmzerc4DHUsYxWMWCdKtiVA9y1omUj6BeJQryOm+EHWSXMFz7D5Q7hYPE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707958215; c=relaxed/simple; bh=onMwpEpCvYyOOnD0Sp7hg/kBPts5AP1MXCVhCIOJE+g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FPZha2B49NQSlMpq/xRuY0p+VOhkxoqgXVffzs+oQAaDFOeZaXctK5XC8yKuQ3RbDSN3C+CmyIVTSEqez0Esz2qZ71FNUSZuG92892tWn2Wnr7hB0XsvbjhoD0YL6QXC0zMl6VtMsDpc/JNkYXh2wFT2HY4BcIZN+w8xqC6Yirs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Rdh5+2zv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4BD0C433F1; Thu, 15 Feb 2024 00:50:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707958215; bh=onMwpEpCvYyOOnD0Sp7hg/kBPts5AP1MXCVhCIOJE+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rdh5+2zvRc2LrJ6l7s6QBojxeuh17PxDFF//fFMjlTKe4GlzMFXuYgDn4SS4CeTvG Cg0jiURwzgUCaWtz4G7vDnpGmbFm7FidT01rTbFNq12U4NTJNVhi4651ZrPc48xHL1 tEz/vnnU9EIK5/w7svcP7QwcnZaP8deSPze1Zd6a1g7S2dWSPwSsAXbxX8b42+ROpJ bizzenBgdgrkXSQDrUEK1H6yOr9pFLNEDjKhBxuHf0+vhbK4hB56nI3tEA0SbKC6UV bniF2OQ4FkCupI0d7WX3Ax/2s9V3VGLUmRVzs78rz8LR3Qb0U/i37izMdpnfUb4d9X 8hp6oNK359O0A== From: Chun-Kuang Hu <chunkuang.hu@kernel.org> To: Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org> Subject: [PATCH 6/9] media: platform: mtk-mdp3: drop calling cmdq_pkt_finalize() Date: Thu, 15 Feb 2024 00:49:28 +0000 Message-Id: <20240215004931.3808-7-chunkuang.hu@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240215004931.3808-1-chunkuang.hu@kernel.org> References: <20240215004931.3808-1-chunkuang.hu@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790924126785566782 X-GMAIL-MSGID: 1790924126785566782 |
Series |
Remove cl in struct cmdq_pkt
|
|
Commit Message
Chun-Kuang Hu
Feb. 15, 2024, 12:49 a.m. UTC
Because client driver has the information of struct cmdq_client, so
it's not necessary to store struct cmdq_client in struct cmdq_pkt.
cmdq_pkt_finalize() use struct cmdq_client in struct cmdq_pkt, so it's
going to be abandoned. Therefore, use cmdq_pkt_eoc() and cmdq_pkt_nop()
to replace cmdq_pkt_finalize().
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
---
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(-)
Comments
On Thu, 2024-02-15 at 11:29 +0100, AngeloGioacchino Del Regno wrote: > Il 15/02/24 01:49, Chun-Kuang Hu ha scritto: > > Because client driver has the information of struct cmdq_client, so > > it's not necessary to store struct cmdq_client in struct cmdq_pkt. > > cmdq_pkt_finalize() use struct cmdq_client in struct cmdq_pkt, so > > it's > > going to be abandoned. Therefore, use cmdq_pkt_eoc() and > > cmdq_pkt_nop() > > to replace cmdq_pkt_finalize(). > > No, it's not because cmdq_pkt_finalize() has cmdq_client, but because > we want > finer grain control over the CMDQ packets, as not all cases require > the NOP > packet to be appended after EOC. > > Besides, honestly I'm not even sure if the NOP is always required in > MDP3, so... > > ...Moudy, you know the MDP3 way better than anyone else - can you > please > check if NOP is actually needed here? > > Thanks! > Angelo > Hi Angelo, After confirming with the hardware designer and performing the video playback test, it was discovered that MDP3 is capable of excluding the NOP(jump) instruction. Sincerely, Moudy > > > > Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> > > --- > > 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 6adac857a477..a420d492d879 100644 > > --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c > > +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c > > @@ -471,7 +471,8 @@ int mdp_cmdq_send(struct mdp_dev *mdp, struct > > mdp_cmdq_param *param) > > dev_err(dev, "mdp_path_config error\n"); > > goto err_free_path; > > } > > - cmdq_pkt_finalize(&cmd->pkt); > > + cmdq_pkt_eoc(&cmd->pkt); > > + cmdq_pkt_nop(&cmd->pkt, mdp->cmdq_shift_pa); > > > > for (i = 0; i < num_comp; i++) > > memcpy(&comps[i], path->comps[i].comp, > > diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c > > b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c > > index 94f4ed78523b..2214744c937c 100644 > > --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c > > +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c > > @@ -231,6 +231,8 @@ static int mdp_probe(struct platform_device > > *pdev) > > goto err_put_scp; > > } > > > > + mdp->cmdq_shift_pa = cmdq_get_shift_pa(mdp->cmdq_clt->chan); > > + > > init_waitqueue_head(&mdp->callback_wq); > > ida_init(&mdp->mdp_ida); > > platform_set_drvdata(pdev, mdp); > > diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h > > b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h > > index 7e21d226ceb8..ed61e0bb69ee 100644 > > --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h > > +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h > > @@ -83,6 +83,7 @@ struct mdp_dev { > > u32 id_count; > > struct ida mdp_ida; > > struct cmdq_client *cmdq_clt; > > + u8 cmdq_shift_pa; > > wait_queue_head_t callback_wq; > > > > struct v4l2_device v4l2_dev; > >
Il 16/02/24 07:20, Moudy Ho (何宗原) ha scritto: > On Thu, 2024-02-15 at 11:29 +0100, AngeloGioacchino Del Regno wrote: >> Il 15/02/24 01:49, Chun-Kuang Hu ha scritto: >>> Because client driver has the information of struct cmdq_client, so >>> it's not necessary to store struct cmdq_client in struct cmdq_pkt. >>> cmdq_pkt_finalize() use struct cmdq_client in struct cmdq_pkt, so >>> it's >>> going to be abandoned. Therefore, use cmdq_pkt_eoc() and >>> cmdq_pkt_nop() >>> to replace cmdq_pkt_finalize(). >> >> No, it's not because cmdq_pkt_finalize() has cmdq_client, but because >> we want >> finer grain control over the CMDQ packets, as not all cases require >> the NOP >> packet to be appended after EOC. >> >> Besides, honestly I'm not even sure if the NOP is always required in >> MDP3, so... >> >> ...Moudy, you know the MDP3 way better than anyone else - can you >> please >> check if NOP is actually needed here? >> >> Thanks! >> Angelo >> > > Hi Angelo, > > After confirming with the hardware designer and performing the video > playback test, it was discovered that MDP3 is capable of excluding the > NOP(jump) instruction. > Thank you for this extremely fast clarification. Cheers, Angelo > Sincerely, > Moudy >>> >>> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> >>> --- >>> 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 6adac857a477..a420d492d879 100644 >>> --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c >>> +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c >>> @@ -471,7 +471,8 @@ int mdp_cmdq_send(struct mdp_dev *mdp, struct >>> mdp_cmdq_param *param) >>> dev_err(dev, "mdp_path_config error\n"); >>> goto err_free_path; >>> } >>> - cmdq_pkt_finalize(&cmd->pkt); >>> + cmdq_pkt_eoc(&cmd->pkt); >>> + cmdq_pkt_nop(&cmd->pkt, mdp->cmdq_shift_pa); >>> >>> for (i = 0; i < num_comp; i++) >>> memcpy(&comps[i], path->comps[i].comp, >>> diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c >>> b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c >>> index 94f4ed78523b..2214744c937c 100644 >>> --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c >>> +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c >>> @@ -231,6 +231,8 @@ static int mdp_probe(struct platform_device >>> *pdev) >>> goto err_put_scp; >>> } >>> >>> + mdp->cmdq_shift_pa = cmdq_get_shift_pa(mdp->cmdq_clt->chan); >>> + >>> init_waitqueue_head(&mdp->callback_wq); >>> ida_init(&mdp->mdp_ida); >>> platform_set_drvdata(pdev, mdp); >>> diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h >>> b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h >>> index 7e21d226ceb8..ed61e0bb69ee 100644 >>> --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h >>> +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h >>> @@ -83,6 +83,7 @@ struct mdp_dev { >>> u32 id_count; >>> struct ida mdp_ida; >>> struct cmdq_client *cmdq_clt; >>> + u8 cmdq_shift_pa; >>> wait_queue_head_t callback_wq; >>> >>> struct v4l2_device v4l2_dev; >> >>
Hi, Moudy: On Fri, 2024-02-16 at 08:56 +0100, AngeloGioacchino Del Regno wrote: > Il 16/02/24 07:20, Moudy Ho (何宗原) ha scritto: > > On Thu, 2024-02-15 at 11:29 +0100, AngeloGioacchino Del Regno > > wrote: > > > Il 15/02/24 01:49, Chun-Kuang Hu ha scritto: > > > > Because client driver has the information of struct > > > > cmdq_client, so > > > > it's not necessary to store struct cmdq_client in struct > > > > cmdq_pkt. > > > > cmdq_pkt_finalize() use struct cmdq_client in struct cmdq_pkt, > > > > so > > > > it's > > > > going to be abandoned. Therefore, use cmdq_pkt_eoc() and > > > > cmdq_pkt_nop() > > > > to replace cmdq_pkt_finalize(). > > > > > > No, it's not because cmdq_pkt_finalize() has cmdq_client, but > > > because > > > we want > > > finer grain control over the CMDQ packets, as not all cases > > > require > > > the NOP > > > packet to be appended after EOC. > > > > > > Besides, honestly I'm not even sure if the NOP is always required > > > in > > > MDP3, so... > > > > > > ...Moudy, you know the MDP3 way better than anyone else - can you > > > please > > > check if NOP is actually needed here? > > > > > > Thanks! > > > Angelo > > > > > > > Hi Angelo, > > > > After confirming with the hardware designer and performing the > > video > > playback test, it was discovered that MDP3 is capable of excluding > > the > > NOP(jump) instruction. > > > > Thank you for this extremely fast clarification. As discuss with Jason, there is one precondition that mdp3 could drop nop. mpd3 still need to append jump command in the end of packet. The precondition is that if the jump command is append by mailbox controller, then client driver is not necessary to append nop. But currently, mailbox controller just modify nop to jump, not append jump. Because this modification is not related to this series of removing pkt->cl, so I would keep append nop in the end of packet for mdp3 driver. Regards, CK > > Cheers, > Angelo > > > Sincerely, > > Moudy > > > > > > > > Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> > > > > --- > > > > 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 6adac857a477..a420d492d879 100644 > > > > --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c > > > > +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c > > > > @@ -471,7 +471,8 @@ int mdp_cmdq_send(struct mdp_dev *mdp, > > > > struct > > > > mdp_cmdq_param *param) > > > > dev_err(dev, "mdp_path_config error\n"); > > > > goto err_free_path; > > > > } > > > > - cmdq_pkt_finalize(&cmd->pkt); > > > > + cmdq_pkt_eoc(&cmd->pkt); > > > > + cmdq_pkt_nop(&cmd->pkt, mdp->cmdq_shift_pa); > > > > > > > > for (i = 0; i < num_comp; i++) > > > > memcpy(&comps[i], path->comps[i].comp, > > > > diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3- > > > > core.c > > > > b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c > > > > index 94f4ed78523b..2214744c937c 100644 > > > > --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c > > > > +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c > > > > @@ -231,6 +231,8 @@ static int mdp_probe(struct platform_device > > > > *pdev) > > > > goto err_put_scp; > > > > } > > > > > > > > + mdp->cmdq_shift_pa = cmdq_get_shift_pa(mdp->cmdq_clt- > > > > >chan); > > > > + > > > > init_waitqueue_head(&mdp->callback_wq); > > > > ida_init(&mdp->mdp_ida); > > > > platform_set_drvdata(pdev, mdp); > > > > diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3- > > > > core.h > > > > b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h > > > > index 7e21d226ceb8..ed61e0bb69ee 100644 > > > > --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h > > > > +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h > > > > @@ -83,6 +83,7 @@ struct mdp_dev { > > > > u32 id_count; > > > > struct ida mdp_ida; > > > > struct cmdq_client *cmdq_clt; > > > > + u8 cmdq_shift_pa; > > > > wait_queue_head_t callback_wq; > > > > > > > > struct v4l2_device v4l2_dev; > > > > > > > > > >
diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c index 6adac857a477..a420d492d879 100644 --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c @@ -471,7 +471,8 @@ int mdp_cmdq_send(struct mdp_dev *mdp, struct mdp_cmdq_param *param) dev_err(dev, "mdp_path_config error\n"); goto err_free_path; } - cmdq_pkt_finalize(&cmd->pkt); + cmdq_pkt_eoc(&cmd->pkt); + cmdq_pkt_nop(&cmd->pkt, mdp->cmdq_shift_pa); for (i = 0; i < num_comp; i++) memcpy(&comps[i], path->comps[i].comp, diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c index 94f4ed78523b..2214744c937c 100644 --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c @@ -231,6 +231,8 @@ static int mdp_probe(struct platform_device *pdev) goto err_put_scp; } + mdp->cmdq_shift_pa = cmdq_get_shift_pa(mdp->cmdq_clt->chan); + init_waitqueue_head(&mdp->callback_wq); ida_init(&mdp->mdp_ida); platform_set_drvdata(pdev, mdp); diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h index 7e21d226ceb8..ed61e0bb69ee 100644 --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h @@ -83,6 +83,7 @@ struct mdp_dev { u32 id_count; struct ida mdp_ida; struct cmdq_client *cmdq_clt; + u8 cmdq_shift_pa; wait_queue_head_t callback_wq; struct v4l2_device v4l2_dev;