Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp397845rwn; Wed, 14 Sep 2022 23:45:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5C84N0RgQkRCZyZrSslj5bxkIgvfJQgwyD1K/d77EQ8cqKDbmrLN+4SdiCbZBErf8MZJS+ X-Received: by 2002:a17:903:32ca:b0:178:29e4:15b6 with SMTP id i10-20020a17090332ca00b0017829e415b6mr2839375plr.77.1663224331082; Wed, 14 Sep 2022 23:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663224331; cv=none; d=google.com; s=arc-20160816; b=VviE4EAdZsq+Nr9+v4amra68TUU1quMxeHlP8QuSbHQVBKlCZFcppU/Q5r3SF2WL6z +qS5zGXTpA3qmlEFH8vYxtmBCW4mPaSC5495OaGoCyYgMZRMKE8iqTNNh2jpDQnQDRFn p0E7fk6lhvfvep9shfgA2FYSFPmb2i/eZA67M9VDnAh0q57mj3bq3hQvpO2oYOTjJxur Uk63ifweCymt35haP3Rt0opT8TDkT7KACC+uZNcW/cESfezkVr4UmiHb5A3OUCwzt9hz UivvGmAJq+bsJXrXaUTzbrDKQSdZEjnY2FMjc96+0aWqCgAW6ZxZYkD2Iib5Zh20MYGt ECTg== 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 :dkim-signature; bh=3qSCg9sCNuO1DbIKkGBWZ0s/GiFONPQpdfEBgBeNHJ0=; b=FqI6uew1SnVoTMhptrKgLaIewb/J1eQb5o3AFlkdjnMJFcWPRrifRxS8JV2p3KjXVa LAES4LDblARTKIKXsd0kMXtoIF68OWXctkgqBKWiDOqL76KRxTIt5F/CkuVPeVnEJCjm 0/308XTxmDrQmziPKuppdOKKXXkkEdsSfjs1JS0TnUhBeC0SJYLRssudIboLTTJn/8X2 l+7u4ziSCDBPw5/SZcFI5sBONmy7qRDA7vp4jjkRYm7Sj8M1SjiYUoo2jnHSGlsU2GgH LBIZ6vSoNkGZTxF1S6vqF14HSESTKDst0wHk7Geob7AbSyvFl7p1B7DQmOk5Y4FzeMjc U11A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=LvEpGYIG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f12-20020a170902ce8c00b00176db576dc0si18698001plg.147.2022.09.14.23.45.18; Wed, 14 Sep 2022 23:45:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=LvEpGYIG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229667AbiIOGoM (ORCPT + 99 others); Thu, 15 Sep 2022 02:44:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbiIOGoI (ORCPT ); Thu, 15 Sep 2022 02:44:08 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C58FB95AFA; Wed, 14 Sep 2022 23:44:02 -0700 (PDT) X-UUID: aa276838d40d47fb8dd5af12d4b8445e-20220915 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=3qSCg9sCNuO1DbIKkGBWZ0s/GiFONPQpdfEBgBeNHJ0=; b=LvEpGYIGVmLPlquCfQlx1fnO5f3bb7Bi0ex/K1+x9WhHM3/v8B+D/DqNo2OcJ1/X4Vj1Zl0vIA8zAj9LKTIOYrs6ZggnduBCvX2yOkOmnvHzPmQRnc58KELj9C2Uh6RUq+MhzLdiEoptCPL8/gt9DcHQt+Nrj6tOn0AHOFoGqkw=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:2d220b27-1ecd-40e8-a51d-01e3c21efdfc,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:39a5ff1,CLOUDID:78a37bf6-6e85-48d9-afd8-0504bbfe04cb,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: aa276838d40d47fb8dd5af12d4b8445e-20220915 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1069780629; Thu, 15 Sep 2022 14:43:55 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Thu, 15 Sep 2022 14:43:54 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Thu, 15 Sep 2022 14:43:53 +0800 From: Irui Wang To: Hans Verkuil , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tzung-Bi Shih , , , , kyrie wu CC: , , , , , , Tomasz Figa , , , irui wang Subject: [V14,02/15] mtk-jpegenc: export jpeg encoder functions Date: Thu, 15 Sep 2022 14:43:30 +0800 Message-ID: <20220915064337.2686-3-irui.wang@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220915064337.2686-1-irui.wang@mediatek.com> References: <20220915064337.2686-1-irui.wang@mediatek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,URIBL_CSS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: kyrie wu mtk jpeg encoder is built as a module, export some functions to make them visible by other modules. Signed-off-by: kyrie wu Signed-off-by: irui wang --- drivers/media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c index 1cf037bf72dd..a2b6e1f85c2d 100644 --- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c +++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c @@ -36,12 +36,14 @@ void mtk_jpeg_enc_reset(void __iomem *base) writel(JPEG_ENC_RESET_BIT, base + JPEG_ENC_RSTB); writel(0, base + JPEG_ENC_CODEC_SEL); } +EXPORT_SYMBOL_GPL(mtk_jpeg_enc_reset); u32 mtk_jpeg_enc_get_file_size(void __iomem *base) { return readl(base + JPEG_ENC_DMA_ADDR0) - readl(base + JPEG_ENC_DST_ADDR0); } +EXPORT_SYMBOL_GPL(mtk_jpeg_enc_get_file_size); void mtk_jpeg_enc_start(void __iomem *base) { @@ -51,6 +53,7 @@ void mtk_jpeg_enc_start(void __iomem *base) value |= JPEG_ENC_CTRL_INT_EN_BIT | JPEG_ENC_CTRL_ENABLE_BIT; writel(value, base + JPEG_ENC_CTRL); } +EXPORT_SYMBOL_GPL(mtk_jpeg_enc_start); void mtk_jpeg_set_enc_src(struct mtk_jpeg_ctx *ctx, void __iomem *base, struct vb2_buffer *src_buf) @@ -67,6 +70,7 @@ void mtk_jpeg_set_enc_src(struct mtk_jpeg_ctx *ctx, void __iomem *base, writel(dma_addr, base + JPEG_ENC_SRC_CHROMA_ADDR); } } +EXPORT_SYMBOL_GPL(mtk_jpeg_set_enc_src); void mtk_jpeg_set_enc_dst(struct mtk_jpeg_ctx *ctx, void __iomem *base, struct vb2_buffer *dst_buf) @@ -86,6 +90,7 @@ void mtk_jpeg_set_enc_dst(struct mtk_jpeg_ctx *ctx, void __iomem *base, writel(dma_addr & ~0xf, base + JPEG_ENC_DST_ADDR0); writel((dma_addr + size) & ~0xf, base + JPEG_ENC_STALL_ADDR0); } +EXPORT_SYMBOL_GPL(mtk_jpeg_set_enc_dst); void mtk_jpeg_set_enc_params(struct mtk_jpeg_ctx *ctx, void __iomem *base) { @@ -152,3 +157,5 @@ void mtk_jpeg_set_enc_params(struct mtk_jpeg_ctx *ctx, void __iomem *base) writel(ctx->restart_interval, base + JPEG_ENC_RST_MCU_NUM); } +EXPORT_SYMBOL_GPL(mtk_jpeg_set_enc_params); + -- 2.18.0