From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: "roy-cw.yeh" <roy-cw.yeh@mediatek.com>,
Rob Herring <robh+dt@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Chun-Kuang Hu <chunkuang.hu@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Fabien Parent <fparent@baylibre.com>,
"jason-jh . lin" <jason-jh.lin@mediatek.com>,
daoyuan huang <daoyuan.huang@mediatek.com>,
Ping-Hsun Wu <ping-hsun.wu@mediatek.com>,
Moudy Ho <moudy.ho@mediatek.com>,
"river . cheng" <river.cheng@mediatek.com>,
Yongqiang Niu <yongqiang.niu@mediatek.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH v2 3/4] media: platform: mtk-mdp3: Set dma_set_mask_and_coherent
Date: Fri, 22 Oct 2021 17:24:31 +0200 [thread overview]
Message-ID: <448b3d2f-54a0-f021-dc2a-ea29dc56c146@collabora.com> (raw)
In-Reply-To: <20211022092827.24631-4-roy-cw.yeh@mediatek.com>
Il 22/10/21 11:28, roy-cw.yeh ha scritto:
> From: "Roy-CW.Yeh" <roy-cw.yeh@mediatek.com>
>
> Use the dma_set_mask_and_coherent helper to set mdp
> DMA bit mask to support 34bits iova space(16GB) that
> the mt8195 iommu HW supports.
>
> The whole iova range separates to 0~4G/4G~8G/8G~12G/12G~16G.
> Regarding which iova range mdp actually locates,
> it depends on the dma-ranges property of mdp dtsi node.
>
> Signed-off-by: Roy-CW.Yeh <roy-cw.yeh@mediatek.com>
Acked-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c b/drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c
> index 12b029d145d6..51f7ef2b31ce 100644
> --- a/drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c
> +++ b/drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c
> @@ -1141,6 +1141,9 @@ static int mdp_probe(struct platform_device *pdev)
> mdp->pdev = pdev;
> mdp->mdp_data = of_device_get_match_data(&pdev->dev);
>
> + if (of_get_property(pdev->dev.of_node, "dma-ranges", NULL))
> + dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(34));
> +
> ret = of_property_read_u32(dev->of_node, "mediatek,mdp3-id", &id);
> if (ret) {
> dev_err(dev, "Failed to get mdp-id\n");
>
parent reply other threads:[~2021-10-22 15:24 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20211022092827.24631-4-roy-cw.yeh@mediatek.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=448b3d2f-54a0-f021-dc2a-ea29dc56c146@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=daoyuan.huang@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=fparent@baylibre.com \
--cc=jason-jh.lin@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=moudy.ho@mediatek.com \
--cc=ping-hsun.wu@mediatek.com \
--cc=river.cheng@mediatek.com \
--cc=robh+dt@kernel.org \
--cc=roy-cw.yeh@mediatek.com \
--cc=yongqiang.niu@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®