Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2283138pxb; Thu, 28 Oct 2021 20:57:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUVfP0c4GoWkYXssK7MIe3QAPEAQibmlWkfa3lgNjoTVkKUbx7Q6pZ2jgesMSDB3rdS1IL X-Received: by 2002:a63:fa16:: with SMTP id y22mr2062155pgh.53.1635479872993; Thu, 28 Oct 2021 20:57:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635479872; cv=none; d=google.com; s=arc-20160816; b=PwoXPgASNb7dTt5cdyCeAO+nEUxCUMZGkFy/Igm7DsswOhIUO70Xr/OUmZ9mPxi8iJ efVI8xL0VYQzIROsTByZcZSAzxemkiDHk9dX/NLkG2LKKcHU20SvQsk/Fi13fDlmLNsz 9lhnAQ2QxBEGTYFQdMAmzcMfI3zTpv5ViB7WAPAVz3D5z7Rbe2UqX16GDCcElMx0itUF ZhBG/S2gafffGWBQIKSCOEbtAUvj1BrdrkH8Pb+4GjsjWSzVmfYFfPy535B0CkyK0Jxn 6gEca+XA48IFK7M2G6X5BEwao0dCSal9HGV+QfMsqXPP2NzL29aJNOdwERcBkUDSSOKq ktKA== 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=tESD0gELnomAy5F4MHbs7W4/4+ZtHMv8vlHE8K9Nt8g=; b=hqkkVCVwwhouAU3oZxi5U+v2KoQvr/ndi6ZpwNOTc+Qj9nhmvi+NMdZ8gYCKipKZQI +lep4CYPaUqb+0qXW5JZhosePi1We++0axeTT/7A1NuOQCk78WHwcRjyGnYqZQCVhiXQ emlxB7KRJFH7Aedyl7YZVx/VruUiXvlEhzFiNYc+Opa2ED31cw57e/yAk8fN4sDYhzk2 MXb8FBYT35Fy1lsrCaAZ+lltSCL6m1dBPHiVysaTklRJWRqpz2Oh1hMGRByaYYzVzy8g UWdZgf5uyE7KAQYOtBWIIFK6221LYvxQVcQMd2K7ivIoUq0lPIPr7TM9QnehPl/FwyZA ypfA== 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 nv9si7528174pjb.131.2021.10.28.20.57.39; Thu, 28 Oct 2021 20:57:52 -0700 (PDT) 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 S231611AbhJ2D6b (ORCPT + 99 others); Thu, 28 Oct 2021 23:58:31 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:44350 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S231826AbhJ2D6P (ORCPT ); Thu, 28 Oct 2021 23:58:15 -0400 X-UUID: 1ac7b291ed514f069e41d1904fea71a1-20211029 X-UUID: 1ac7b291ed514f069e41d1904fea71a1-20211029 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1083194147; Fri, 29 Oct 2021 11:55:43 +0800 Received: from mtkmbs10n2.mediatek.inc (172.21.101.183) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 29 Oct 2021 11:55:42 +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; Fri, 29 Oct 2021 11:55:40 +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 , , , , , , , , AngeloGioacchino Del Regno Subject: [PATCH v8, 08/17] media: mtk-vcodec: Use pure single core for MT8183 Date: Fri, 29 Oct 2021 11:55:18 +0800 Message-ID: <20211029035527.454-9-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211029035527.454-1-yunfei.dong@mediatek.com> References: <20211029035527.454-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 Separates different architecture for hardware: pure_sin_core and lat_sin_core. MT8183 is pure single core. Uses .hw_arch to distinguish. Signed-off-by: Yunfei Dong Reviewed-By: AngeloGioacchino Del Regno --- .../platform/mtk-vcodec/mtk_vcodec_dec_stateful.c | 1 + .../platform/mtk-vcodec/mtk_vcodec_dec_stateless.c | 2 ++ drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h | 10 ++++++++++ 3 files changed, 13 insertions(+) diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateful.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateful.c index c7f9259ad094..04ca43c77e5f 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateful.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateful.c @@ -626,4 +626,5 @@ const struct mtk_vcodec_dec_pdata mtk_vdec_8173_pdata = { .worker = mtk_vdec_worker, .flush_decoder = mtk_vdec_flush_decoder, .is_subdev_supported = false, + .hw_arch = MTK_VDEC_PURE_SINGLE_CORE, }; diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c index 2d285515b625..d98f49fbbc3b 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c @@ -358,6 +358,7 @@ const struct mtk_vcodec_dec_pdata mtk_vdec_8183_pdata = { .worker = mtk_vdec_worker, .flush_decoder = mtk_vdec_flush_decoder, .is_subdev_supported = false, + .hw_arch = MTK_VDEC_PURE_SINGLE_CORE, }; const struct mtk_vcodec_dec_pdata mtk_lat_sig_core_pdata = { @@ -375,4 +376,5 @@ const struct mtk_vcodec_dec_pdata mtk_lat_sig_core_pdata = { .worker = mtk_vdec_worker, .flush_decoder = mtk_vdec_flush_decoder, .is_subdev_supported = true, + .hw_arch = MTK_VDEC_LAT_SINGLE_CORE, }; diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h b/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h index 0457ebd8ac18..d0a9539f4e6e 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h @@ -324,6 +324,14 @@ enum mtk_chip { MTK_MT8195, }; +/** + * struct mtk_vdec_hw_arch - Used to separate different hardware architecture + */ +enum mtk_vdec_hw_arch { + MTK_VDEC_PURE_SINGLE_CORE, + MTK_VDEC_LAT_SINGLE_CORE, +}; + /** * struct mtk_vcodec_dec_pdata - compatible data for each IC * @init_vdec_params: init vdec params @@ -342,6 +350,7 @@ enum mtk_chip { * @num_framesizes: count of video decoder frame sizes * * @chip: chip this decoder is compatible with + * @hw_arch: hardware arch is used to separate pure_sin_core and lat_sin_core * * @is_subdev_supported: whether support parent-node architecture(subdev) * @uses_stateless_api: whether the decoder uses the stateless API with requests @@ -364,6 +373,7 @@ struct mtk_vcodec_dec_pdata { const int num_framesizes; enum mtk_chip chip; + enum mtk_vdec_hw_arch hw_arch; bool is_subdev_supported; bool uses_stateless_api; -- 2.25.1