Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A483AC87FDA for ; Mon, 11 Aug 2025 02:28:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=FG9+9WIgSMbwEC+qjRTOrkn9hFcawHdHO8FWjbbsdAs=; b=xizeJKSuE50P8C LC59we4x/htm/2t+E4EUJgwhgLMw3u+MqXbla4k8FYBjJCFT2D1igL9Ar2Oy4VRK4cd5DcDNr0EqZ BEt41p4o1Gj/hMdtn2zHvVyK+wVqPQf6yTBMMteQ/wSdVUpJqlnNhw/vxN43U9ULtJWhgGcRVj9To T644XyobsArPaNIucgbnfTM3MFDNBk4Qkx0my42GbMfXm85VtyPAuuvqaHmGrhu/l10yHr1VyIvNV ZSTwSgOgxS3OBO6F8pUhiShU5k6zZoCVhPyKMvanqQtFoC+HK3sR1kKUehEue6oaYRDmijqTxJ3cO arfEfXGzqGFlaqTVkWbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1ulIHJ-00000006Lhv-2a7g; Mon, 11 Aug 2025 02:28:49 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1ulIEi-00000006L6w-36KQ; Mon, 11 Aug 2025 02:26:12 +0000 X-UUID: 8592b11e765a11f09eb0dd999d3936bf-20250810 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:Message-ID:Date:Subject:To:From; bh=FG9+9WIgSMbwEC+qjRTOrkn9hFcawHdHO8FWjbbsdAs=; b=tNvxIGG1hbXwHfoKfus51v+baz7IzLn/RuqJpa1+V2XHYEpBvuaBYeUfpdJOM1tT8oe/IICuJdXe/yyaXQzBvPZpM5R+aUm3ahutxZTld7hNpeR2K13aalYkiHZtA/eDdD4AZb36TAMM/1VG/d8SQZiOlzXEuhpW4Inw/Jktses=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.3,REQID:288766ff-a55c-4224-b68f-affe24dcceaf,IP:0,UR L:0,TC:0,Content:0,EDM:-30,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-30 X-CID-META: VersionHash:f1326cf,CLOUDID:c69a4351-d89a-4c27-9e37-f7ccfcbebd5b,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:-5,Content:0|15|50,EDM:2,IP:n il,URL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LE S:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 2,SSN|SDN X-CID-BAS: 2,SSN|SDN,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-CID-RHF: D41D8CD98F00B204E9800998ECF8427E X-UUID: 8592b11e765a11f09eb0dd999d3936bf-20250810 Received: from mtkmbs14n1.mediatek.inc [(172.21.101.75)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 52854330; Sun, 10 Aug 2025 19:26:00 -0700 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.39; Mon, 11 Aug 2025 10:25:52 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1258.39 via Frontend Transport; Mon, 11 Aug 2025 10:25:52 +0800 From: Kyrie Wu To: Hans Verkuil , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Kyrie Wu , , , , , Subject: [PATCH v8 00/12] Enable jpeg enc & dec multi-hardwares for MT8196 Date: Mon, 11 Aug 2025 10:25:42 +0800 Message-ID: <20250811022555.1049-1-kyrie.wu@mediatek.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250810_192608_782041_DFFEEC06 X-CRM114-Status: GOOD ( 11.50 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org This series have the follow changing: Firstly fix some bugs, including resolution change handleing, stop streaming sw flow, fix buffer layout and clock setting to support multi-hw jpeg working and others. Secondly add mt8196 jpegdec and jpegenc compatible to support MT8196 kernel driver. Lastly, Add smmu setting to support smmu and iommu at the same time. This series has been tested with MT8196 tast test. Encoding and decoding worked for this chip. Patches 1 fix jpeg hw count setting to support different chips. Patches 2 fix jpeg buffer payload setting to handle buffer size bug while resolution changed. Patches 3 fix jpeg dst buffer layout. Patches 4 fix multi-core stop streaming flow Patches 5 fix multi-core clk suspend/resume setting Patches 6 fix decoding buffer number setting timing issue Patches 7 fix decoding resolution change operation Patches 8 fix remove buffer operation Patches 9-11 Adds jpeg encoder and decoder compatible. Patches 12 add jpeg smmu sid setting. --- Changes compared with v7: --Rebased on top of the latest media tree Changes compared with v6: --Rebased on top of the latest media tree Changes compared with v5: --reorder the patches set. --fix commit message of patch 1-8. Changes compared with v4: --fix kernel robot build errors for patch 4. --add reviewer for patch 1 and patch 2. Changes compared with v3: --change patch subject of jpeg encoder and decoder compatible. Changes compared with v2: --refactor smmu sid setting function interface --Some modifications for patch v2's review comments. Changes compared with v1: --refine jpeg dt-bindings for MT8196 --optimize software code to manage jpeg HW count --refactor smmu sid setting function interface --Some modifications for patch v1's review comments. Kyrie Wu (12): media: mediatek: jpeg: fix jpeg hw count setting media: mediatek: jpeg: fix jpeg buffer payload setting media: mediatek: jpeg: fix jpeg buffer layout media: mediatek: jpeg: fix stop streaming flow for multi-core media: mediatek: jpeg: fix multi-core clk suspend and resume setting media: mediatek: jpeg: fix decoding buffer number setting timing issue media: mediatek: jpeg: fix decoding resolution change operation media: mediatek: jpeg: fix remove buffer operation for multi-core media: dt-bindings: mediatek,jpeg: Add mediatek, mt8196-jpgdec compatible media: dt-bindings: mediatek,jpeg: Add mediatek, mt8196-jpgenc compatible media: mediatek: jpeg: add jpeg compatible media: mediatek: jpeg: add jpeg smmu sid setting .../media/mediatek,mt8195-jpegdec.yaml | 8 +- .../media/mediatek,mt8195-jpegenc.yaml | 8 +- .../platform/mediatek/jpeg/mtk_jpeg_core.c | 170 +++++++++++++----- .../platform/mediatek/jpeg/mtk_jpeg_core.h | 21 ++- .../platform/mediatek/jpeg/mtk_jpeg_dec_hw.c | 112 +++++++++++- .../platform/mediatek/jpeg/mtk_jpeg_enc_hw.c | 112 +++++++++++- 6 files changed, 376 insertions(+), 55 deletions(-) -- 2.46.0