Message ID | 20210727101051.24418-13-yunfei.dong@mediatek.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=DCHG=MT=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EF8CC4338F for <linux-arm-kernel@archiver.kernel.org>; Tue, 27 Jul 2021 10:25:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3D45A617E5 for <linux-arm-kernel@archiver.kernel.org>; Tue, 27 Jul 2021 10:25:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3D45A617E5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UGPu/pAB3F2CWO1ctDXkUwwpUn+ooZuqPJa5Su9D72I=; b=Um/hAbHYPiznVN VE7dVMrLVQjf4eNsIeD2p5XQa4+sRRg9Rh2Cu5Ai0cte03VQ2pFUUD+utopTnzt7p2U+kl+mPON4A k1NbMWtxdalpSjt6SFY+qCod9cl21x2ncO9FLW7okTpUHVzaT63o1hXARgk6V8a213moqcOzko3qq 6BiX1v1/Kt7fiJ+HPF4tDghd5ycnBq6TT3xWdRTGhnbpbccrA9LitPd7PXnTNNw8ARtQWzdfYElQi Tx1m4wDttHFM5UDtFjU0oO4M2CcSBxjV37FDMxN2jVkXGjjPRAaka5qiknUXOzc+3SBpCPoPSKABz MeEaqc8YJMwtBYe4xPLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8KDd-00EO18-Rj; Tue, 27 Jul 2021 10:21:50 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8KDT-00ENyO-SI; Tue, 27 Jul 2021 10:21:41 +0000 X-UUID: 2c0fc18a0bed45e5b62f0f684b1e1641-20210727 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=28jtuJwJGU/Cw6f1XjeO7Up9yJ0SzccBDcio4C0+prQ=; b=ty+Gb83pJme/Dy/9bQNJLwArU7nDdje6+kbE66/qQbOHgj44kidMUMnQlHzREiagCrSp0MBLqmDoAwoW9mtlGy3GTXQXhMgusGz/QCoDBhKb2jN/RQ2hPH2/8G9VC49qqCxY4m0DpwM19c4OYQDEm/UoAuqr+ccFgCXB8xOb750=; X-UUID: 2c0fc18a0bed45e5b62f0f684b1e1641-20210727 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from <yunfei.dong@mediatek.com>) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1083328823; Tue, 27 Jul 2021 03:21:38 -0700 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 27 Jul 2021 03:11:43 -0700 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 27 Jul 2021 18:11:41 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 27 Jul 2021 18:11:40 +0800 From: Yunfei Dong <yunfei.dong@mediatek.com> To: Yunfei Dong <yunfei.dong@mediatek.com>, Alexandre Courbot <acourbot@chromium.org>, Hans Verkuil <hverkuil-cisco@xs4all.nl>, "Tzung-Bi Shih" <tzungbi@chromium.org>, Tiffany Lin <tiffany.lin@mediatek.com>, Andrew-CT Chen <andrew-ct.chen@mediatek.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Rob Herring <robh+dt@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, Tomasz Figa <tfiga@google.com> CC: Hsin-Yi Wang <hsinyi@chromium.org>, Fritz Koenig <frkoenig@chromium.org>, Irui Wang <irui.wang@mediatek.com>, <linux-media@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <srv_heupstream@mediatek.com>, <linux-mediatek@lists.infradead.org>, <Project_Global_Chrome_Upstream_Group@mediatek.com> Subject: [PATCH v3, 12/15] media: mtk-vcodec: Support 34bits dma address for vdec Date: Tue, 27 Jul 2021 18:10:48 +0800 Message-ID: <20210727101051.24418-13-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210727101051.24418-1-yunfei.dong@mediatek.com> References: <20210727101051.24418-1-yunfei.dong@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210727_032139_976770_B247DCBB X-CRM114-Status: GOOD ( 13.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Using component framework to support multi hardware decode
|
expand
|
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c index d0006da10df6..27de22e17a5a 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c @@ -434,6 +434,9 @@ static int mtk_vcodec_probe(struct platform_device *pdev) } } + if (of_get_property(pdev->dev.of_node, "dma-ranges", NULL)) + dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(34)); + for (i = 0; i < MTK_VDEC_HW_MAX; i++) mutex_init(&dev->dec_mutex[i]); mutex_init(&dev->dev_mutex);
Use the dma_set_mask_and_coherent helper to set vdec DMA bit mask to support 34bits iova space(16GB) that the mt8192 iommu HW support. Whole the iova range separate to 0~4G/4G~8G/8G~12G/12G~16G, regarding which iova range VDEC actually locate, it depends on the dma-ranges property of vdec dtsi node. Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> --- v3: no changes --- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c | 3 +++ 1 file changed, 3 insertions(+)