From patchwork Wed May 18 12:29:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunfei Dong X-Patchwork-Id: 12853602 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72AE9C433FE for ; Wed, 18 May 2022 12:35:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237311AbiERMfU (ORCPT ); Wed, 18 May 2022 08:35:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236509AbiERMem (ORCPT ); Wed, 18 May 2022 08:34:42 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DE6B13F1C4; Wed, 18 May 2022 05:30:16 -0700 (PDT) X-UUID: cfb92021c2cb4b5889b5e09063b42fca-20220518 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.5,REQID:5c997898-8337-4b40-9819-78c3c6782b49,OB:0,LO B:0,IP:0,URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,RULE:Release_Ham,AC TION:release,TS:90 X-CID-INFO: VERSION:1.1.5,REQID:5c997898-8337-4b40-9819-78c3c6782b49,OB:0,LOB: 0,IP:0,URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,RULE:Spam_GS981B3D,AC TION:quarantine,TS:90 X-CID-META: VersionHash:2a19b09,CLOUDID:fe5ab779-5ef6-470b-96c9-bdb8ced32786,C OID:0defb325eb7f,Recheck:0,SF:28|17|19|48,TC:nil,Content:0,EDM:-3,IP:nil,U RL:1,File:nil,QS:0,BEC:nil X-UUID: cfb92021c2cb4b5889b5e09063b42fca-20220518 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2034958229; Wed, 18 May 2022 20:30:08 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Wed, 18 May 2022 20:30:07 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 18 May 2022 20:30:05 +0800 From: Yunfei Dong To: Yunfei Dong , Alexandre Courbot , Nicolas Dufresne , "Hans Verkuil" , AngeloGioacchino Del Regno , Benjamin Gaignard , Tiffany Lin , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa CC: George Sun , Xiaoyong Lu , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , dri-devel , Irui Wang , "Steve Cho" , , , , , , Subject: [PATCH v7, 0/7] support mt8195 decoder Date: Wed, 18 May 2022 20:29:57 +0800 Message-ID: <20220518123004.18286-1-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Firstly, add mt8195 soc lat hardware and compatible, then add documents. For vp8 only support MM21 mode, H264/vp9 support MT21C, need to separate them. Lastly, enable H264 inner racing mode to reduce hardware latency. Patch 1~4 add mt8195 soc lat hardware and compatible, then add documents. Patch 5 using different format for different codecs. Patch 6 prevent kernel crash when scp reboot. Patch 7 enable H264 inner racing mode to reduce hardware latency. --- This patch depends on "add h264 decoder driver for mt8186"[1] [1] https://patchwork.kernel.org/project/linux-mediatek/cover/20220512034620.30500-1-yunfei.dong@mediatek.com/ --- changed with v6: - add detail error message in patch 6. changed with v5: - fix __iomem not reasonable, align share memory to dram. changed with v4: - fix sparse and smatch check fail for patch 7. changed with v3: - rebase driver to the latest media_stage. changed with v2: - add detail explanation for lat soc hardware for patch 1. changed with v1: - separate "Init VP9 stateless decode params" patch and remove it to another one. - add reviewed-by in patch v3/v4/v6 --- Yunfei Dong (7): dt-bindings: media: mediatek: vcodec: Adds decoder dt-bindings for lat soc media: mediatek: vcodec: Add to support lat soc hardware dt-bindings: media: mediatek: vcodec: Adds decoder dt-bindings for mt8195 media: mediatek: vcodec: Adds compatible for mt8195 media: mediatek: vcodec: Different codec using different capture format media: mediatek: vcodec: prevent kernel crash when scp ipi timeout media: mediatek: vcodec: Add to support H264 inner racing mode .../media/mediatek,vcodec-subdev-decoder.yaml | 52 +++++++++++++------ .../platform/mediatek/vcodec/mtk_vcodec_dec.c | 41 +++++++++++++++ .../mediatek/vcodec/mtk_vcodec_dec_drv.c | 8 +++ .../mediatek/vcodec/mtk_vcodec_dec_hw.c | 12 +++-- .../mediatek/vcodec/mtk_vcodec_dec_hw.h | 2 + .../mediatek/vcodec/mtk_vcodec_dec_pm.c | 50 ++++++++++++++++++ .../platform/mediatek/vcodec/mtk_vcodec_drv.h | 12 +++++ .../vcodec/vdec/vdec_h264_req_multi_if.c | 25 +++++++-- .../platform/mediatek/vcodec/vdec_vpu_if.c | 5 ++ 9 files changed, 183 insertions(+), 24 deletions(-)