Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp587547pxh; Tue, 9 Nov 2021 15:45:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJyU2wWDm/srpofXt/VxyyGt+VAC/FQVFd9g1plJ7BLPVhEFn3fPJHWN1rqYTsJe4obkDUR2 X-Received: by 2002:a05:6602:1224:: with SMTP id z4mr7932270iot.43.1636501512262; Tue, 09 Nov 2021 15:45:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636501512; cv=none; d=google.com; s=arc-20160816; b=bejilmnneZMpxH15nvvnYo0OE4OqgMcA/IG//woOYS2EJ/jMbsx0ZcSQyVswRc+gqz lexp7BBOt4/zt3h+u4ksPYsqKU7yMhSANM+/M1KBidAx9rkJVKAyRbzmqFpoKjs+EE4j eqw8VlrAj+xQMsL6rzZ3x2zsDRiw3XAwExv/XoEawK5W42TN5Oi5UHpPfdkJ5IQITgow HYNGO5jLO6RdZyST5umzTrs4EiHC4ROlEiDHw6wV8G+cmtHwa0bJxLzvHepS1rxYY1VY hjEIcVqtpxSTBIA9qzUuAwqPc8mFJZDK88rdVMzHmp7T4VVNudza2THL5u8wJPTmKoKM AOBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=TT4btZWKkyft+PX4yKgwTkG/llYnTMFUYNRS6oSXj8k=; b=iaLBSQWXSblnij0qZHsSDauVP+paIZCsbwB73C1UnAuJIoj6ILLZxZbBPP+pxBZBhf Ivj9GvtMPoCG+gcfokZSIxi3b8kcuZVLHyc7B3aMrbEijksuxbFDVwZyvj/PYlDF3jTR 8/MAQUfp309a/ktPyk2vIjeXMK0FYMr726mXeAmj3wbGbwBeoScnvOkY7fLENql9qQ48 nYoqHbMWlHxyexTcd6Sz2qlmfSFNYsD98r2wxsDMWqathuB/X5RXcfFg11SmIYmFgSQQ tA25TEo0/DTAyz/A0TQmpO78UM/cM8er7wCn9CRwtJjBF6Eiu9gFeXx4RllxpJZFJIob m6+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s12si2937909ilv.119.2021.11.09.15.45.00; Tue, 09 Nov 2021 15:45:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343728AbhKIMxj (ORCPT + 97 others); Tue, 9 Nov 2021 07:53:39 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:57058 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1343669AbhKIMxb (ORCPT ); Tue, 9 Nov 2021 07:53:31 -0500 X-UUID: d25d7ae2879942889404f3e83e5f8c07-20211109 X-UUID: d25d7ae2879942889404f3e83e5f8c07-20211109 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 943246583; Tue, 09 Nov 2021 20:50:39 +0800 Received: from mtkmbs10n2.mediatek.inc (172.21.101.183) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 9 Nov 2021 20:50:37 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkmbs10n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.3 via Frontend Transport; Tue, 9 Nov 2021 20:50:36 +0800 From: Yunfei Dong To: Yunfei Dong , Alexandre Courbot , Hans Verkuil , Tzung-Bi Shih , Tiffany Lin , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa CC: Hsin-Yi Wang , Fritz Koenig , Dafna Hirschfeld , Benjamin Gaignard , Daniel Vetter , dri-devel , Irui Wang , , , , , , , Subject: [PATCH v9, 04/19] media: mtk-vcodec: Build decoder pm file as module Date: Tue, 9 Nov 2021 20:50:15 +0800 Message-ID: <20211109125030.26299-5-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211109125030.26299-1-yunfei.dong@mediatek.com> References: <20211109125030.26299-1-yunfei.dong@mediatek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Need to build decoder pm file as module for main device and subdev use the same pm interface. Signed-off-by: Yunfei Dong --- drivers/media/platform/mtk-vcodec/Makefile | 6 ++++-- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/mtk-vcodec/Makefile b/drivers/media/platform/mtk-vcodec/Makefile index ca8e9e7a9c4e..5d36e05535d7 100644 --- a/drivers/media/platform/mtk-vcodec/Makefile +++ b/drivers/media/platform/mtk-vcodec/Makefile @@ -2,7 +2,8 @@ obj-$(CONFIG_VIDEO_MEDIATEK_VCODEC) += mtk-vcodec-dec.o \ mtk-vcodec-enc.o \ - mtk-vcodec-common.o + mtk-vcodec-common.o \ + mtk-vcodec-dec-common.o mtk-vcodec-dec-y := vdec/vdec_h264_if.o \ vdec/vdec_vp8_if.o \ @@ -14,7 +15,8 @@ mtk-vcodec-dec-y := vdec/vdec_h264_if.o \ mtk_vcodec_dec.o \ mtk_vcodec_dec_stateful.o \ mtk_vcodec_dec_stateless.o \ - mtk_vcodec_dec_pm.o \ + +mtk-vcodec-dec-common-y := mtk_vcodec_dec_pm.o mtk-vcodec-enc-y := venc/venc_vp8_if.o \ venc/venc_h264_if.o \ diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c index 20bd157a855c..09a281e3065a 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c @@ -77,12 +77,14 @@ int mtk_vcodec_init_dec_pm(struct platform_device *pdev, put_device(pm->larbvdec); return ret; } +EXPORT_SYMBOL_GPL(mtk_vcodec_init_dec_pm); void mtk_vcodec_release_dec_pm(struct mtk_vcodec_pm *pm) { pm_runtime_disable(pm->dev); put_device(pm->larbvdec); } +EXPORT_SYMBOL_GPL(mtk_vcodec_release_dec_pm); int mtk_vcodec_dec_pw_on(struct mtk_vcodec_pm *pm) { @@ -94,6 +96,7 @@ int mtk_vcodec_dec_pw_on(struct mtk_vcodec_pm *pm) return ret; } +EXPORT_SYMBOL_GPL(mtk_vcodec_dec_pw_on); void mtk_vcodec_dec_pw_off(struct mtk_vcodec_pm *pm) { @@ -103,6 +106,7 @@ void mtk_vcodec_dec_pw_off(struct mtk_vcodec_pm *pm) if (ret) mtk_v4l2_err("pm_runtime_put_sync fail %d", ret); } +EXPORT_SYMBOL_GPL(mtk_vcodec_dec_pw_off); void mtk_vcodec_dec_clock_on(struct mtk_vcodec_pm *pm) { @@ -129,6 +133,7 @@ void mtk_vcodec_dec_clock_on(struct mtk_vcodec_pm *pm) for (i -= 1; i >= 0; i--) clk_disable_unprepare(dec_clk->clk_info[i].vcodec_clk); } +EXPORT_SYMBOL_GPL(mtk_vcodec_dec_clock_on); void mtk_vcodec_dec_clock_off(struct mtk_vcodec_pm *pm) { @@ -139,3 +144,7 @@ void mtk_vcodec_dec_clock_off(struct mtk_vcodec_pm *pm) for (i = dec_clk->clk_num - 1; i >= 0; i--) clk_disable_unprepare(dec_clk->clk_info[i].vcodec_clk); } +EXPORT_SYMBOL_GPL(mtk_vcodec_dec_clock_off); + +MODULE_LICENSE("GPL v2"); +MODULE_DESCRIPTION("Mediatek video decoder driver"); -- 2.25.1