Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5281949pxv; Tue, 6 Jul 2021 23:24:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOZV6h9a3DuVU75246lNn6lA+D7NeEycbNb2U0lt3AnS5lv2VVaBcJg/QPt1+5KBflphhw X-Received: by 2002:a17:906:719:: with SMTP id y25mr6956683ejb.82.1625639045183; Tue, 06 Jul 2021 23:24:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625639045; cv=none; d=google.com; s=arc-20160816; b=p9mWBs6WUULT0Wmv0XM8rqJ2NhbWAu7Xr6UalglMVZuGZQZ1mWH8XIY5RdUlgBzNHd EJIRV2GEzObGOO81Zgh9hkAZ0GLFn0uIMA1l7xYjHvclH40+j7z60qsW24aKwTjzMeI4 Z1v9w8tUJR9Wiki1MdOshkmJaLlk052fH3D0uWYPutu89YWWZc0gHgl6Wxmppm6/WopA lofTLoP1RcLblmgFzA7QMY77O6SwsduFUcA8th8Mb9S093tKUj6JUrOs8GwhdQyuo31s 0J8kYOfjpCt0FGsF4jPI1MgigrDTiRXFg7Y9j1JUqLQTwwanDqVyfi6oS6GyHNCvZNL6 5+QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=m/NkrAOSXOrEumHUv6c8pNLZvTUvi+nP9cIENCkfMUQ=; b=qd+yKfRmlTEpo4ZB7u+2/s5KiEP34aOeinHK4JktwlkyKOuKZHkxkps3WexK0rpYyI 2562GMCtbKMa9B3hrMNr42KQWEn4JgOeEdOzqkgakB6KDHaWn8AkHYs36AkoY1WuWVw4 nksjrt5uzCbtUqlmCmZ6iM3cIvZixNN6M2SxkTuQCplopLC/3PP0E6FOPu/2u4WglMgq vLP9sH86mcytHr9vTsscjp1DnTgLXR3Otp1VjHf3jeWxu5jkgEBA3HpuHdBcC34AoiGm Js5feL1B7IqJeKCfadBhnIY3vuSIgh9CNqXGAaO3trTVazrmlxOn5hhmdelymTpWj1NK AupA== 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 gn39si7530609ejc.653.2021.07.06.23.23.41; Tue, 06 Jul 2021 23:24:05 -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 S230431AbhGGGZT (ORCPT + 99 others); Wed, 7 Jul 2021 02:25:19 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:49712 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S230293AbhGGGZN (ORCPT ); Wed, 7 Jul 2021 02:25:13 -0400 X-UUID: d8ffc2eadbf7480d845023d6c7f1e1c9-20210707 X-UUID: d8ffc2eadbf7480d845023d6c7f1e1c9-20210707 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1804020139; Wed, 07 Jul 2021 14:22:24 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 7 Jul 2021 14:22:22 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 7 Jul 2021 14:22:21 +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 , Irui Wang , , , , , , , Subject: [PATCH v1, 05/14] media: mtk-vcodec: Use pure single core for MT8183 Date: Wed, 7 Jul 2021 14:21:48 +0800 Message-ID: <20210707062157.21176-6-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210707062157.21176-1-yunfei.dong@mediatek.com> References: <20210707062157.21176-1-yunfei.dong@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain 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 --- .../platform/mtk-vcodec/mtk_vcodec_dec_stateful.c | 1 + .../platform/mtk-vcodec/mtk_vcodec_dec_stateless.c | 1 + drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h | 10 ++++++++++ 3 files changed, 12 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 59c24b22ab6d..61d24091c70c 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateful.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateful.c @@ -623,4 +623,5 @@ const struct mtk_vcodec_dec_pdata mtk_vdec_8173_pdata = { .num_framesizes = NUM_SUPPORTED_FRAMESIZE, .worker = mtk_vdec_worker, .flush_decoder = mtk_vdec_flush_decoder, + .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 8f4a1f0a0769..9b6bd7c7cb0b 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c @@ -357,4 +357,5 @@ const struct mtk_vcodec_dec_pdata mtk_vdec_8183_pdata = { .uses_stateless_api = true, .worker = mtk_vdec_worker, .flush_decoder = mtk_vdec_flush_decoder, + .hw_arch = MTK_VDEC_PURE_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 807ee93d27dc..0539fc50ad4e 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h @@ -330,6 +330,14 @@ enum mtk_chip { MTK_MT8192, }; +/** + * 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 @@ -348,6 +356,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 * * @uses_stateless_api: whether the decoder uses the stateless API with requests */ @@ -369,6 +378,7 @@ struct mtk_vcodec_dec_pdata { const int num_framesizes; enum mtk_chip chip; + enum mtk_vdec_hw_arch hw_arch; bool uses_stateless_api; }; -- 2.18.0