From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36FCB35B639; Mon, 20 Jul 2026 13:34:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.61.82.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784554487; cv=none; b=jKXHWRXGbwrIlq/1T/FHSg1ULjYmj2OKiPxzFGAxkFU+McavKFeZpeDlXfYUO+hNbWrwRDHJfSlrHp8pGEmeLFfMgJLLgU8TlWmn/I7npbVcJnug0Ve4fCD4NtjdEoEatBgaG6AaZJMxkJwzDFXnvomb3Cjh4cwxbJLubEAVzgg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784554487; c=relaxed/simple; bh=NPw+v79uEfXyapmBiHy9QBQjU2lZ+QiX0oZJX2Jtvyg=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=FN1fXgDhGSgaIeNnItt30w7XXKhEwFfTobAFDbL/TsCOdsQo7mRy0yfIcJwYUmyGfyhdgadxleGhKqv/yzLpHtfRMaZaVOGlqoAv+9L6tGV8Ose4quWR6EasBVvhduS4NLEkjKmue3zk7jw384VhCqDKn9s02X2rcjFYvcttd4Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=GUzvRykJ; arc=none smtp.client-ip=210.61.82.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="GUzvRykJ" X-UUID: c0a7875e843f11f18dc8c9802ae25ab1-20260720 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:CC:To:From; bh=tF1xGmAfD5LFjjza5FU17VbATpixq4Ev6SqFyCqdF0Y=; b=GUzvRykJom1VtqWwh/veWE0ASZNMdPrjx/ziOl9tB/Y5gt6zUZ9E89+AEZycAGjpYIXuVSxvFnQLvfyHaD8u1D3qJfq6WMZ/4R8SHur3PCnmoSho/rpNZCpdj+wouvKVckoZyteExlqjNtjTbtjt3Fa1U+8IYCThDn63/5F82hc=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.18,REQID:61637b9e-0ee1-44cb-8435-943d94627033,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:8a735a6,CLOUDID:8bd47c3f-46cf-453a-bd84-ad9fc7cb0e8c,B ulkID:nil,BulkQuantity:0,SF:102|836|865|888|898,TC:-5,Content:0|15|50|99,E DM:-3,IP:nil,URL:0,File:130,RT:0,Bulk:nil,QS:nil,BEC:-1,COL:0,OSI:0,OSA:0, AV:0,LES: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: c0a7875e843f11f18dc8c9802ae25ab1-20260720 Received: from mtkmbs09n1.mediatek.inc [(172.21.101.35)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1579226772; Mon, 20 Jul 2026 21:34:37 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Mon, 20 Jul 2026 21:34:36 +0800 Received: from gcnsap21.gcn.mediatek.inc (10.17.81.22) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.2562.29 via Frontend Transport; Mon, 20 Jul 2026 21:34:35 +0800 From: Kyrie Wu To: Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Bin Liu , kyrie wu , Hans Verkuil , irui wang , Nicolas Dufresne , , , , , CC: Kyrie Wu Subject: [PATCH v16 00/12] Enable jpeg enc & dec multi-hardwares for MT8196 Date: Mon, 20 Jul 2026 21:34:20 +0800 Message-ID: <20260720133432.1042046-1-kyrie.wu@mediatek.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-MTK: N 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 buffer state update timing 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 v15: --Set max_hw_count from the DT child count and update hw_rdy from child hardware probes in patch 1. --Fix patch 2 commit message wording per review. --Rework patch 6 commit message per review. --Remove redundant devm_clk_bulk_get() calls in patch 5 per review comments. --Use %pe to print smmu_regmap error pointer in patch 12 to fix media-ci/static warnings. Changes compared with v14: --Rebased on top of the latest media tree Changes compared with v13: --Rebased on top of the latest media tree Changes compared with v12: --Rebased on top of the latest media tree --fix kernel rebot build warnings in patch 5 Changes compared with v11: --Rebased on top of the latest media tree --Some modifications for patch v11's review comments. --add reviewer to commit messages Changes compared with v10: --Rebased on top of the latest media tree --add reviewer to commit messages Changes compared with v9: --Rebased on top of the latest media tree Changes compared with v8: --Rebased on top of the latest media tree 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 cores' amounts setting media: mediatek: jpeg: fix jpeg buffer payload size setting media: mediatek: jpeg: fix buffer structure size and layout media: mediatek: jpeg: Fix buffer completion on multi-core streaming stop media: mediatek: jpeg: Fix multi-core clk suspend and resume setting media: mediatek: jpeg: fix buffer state update timing media: mediatek: jpeg: fix resolution change event handling in decoder media: mediatek: jpeg: fix remove buffer removal timing 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 | 156 +++++++++++++----- .../platform/mediatek/jpeg/mtk_jpeg_core.h | 19 ++- .../platform/mediatek/jpeg/mtk_jpeg_dec_hw.c | 84 +++++++++- .../platform/mediatek/jpeg/mtk_jpeg_enc_hw.c | 82 ++++++++- 6 files changed, 300 insertions(+), 57 deletions(-) -- 2.51.0.windows.2