Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4270090pxv; Tue, 27 Jul 2021 03:12:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzguqbtCmzB3iU3jdVqL/3hlzWEZyWnQWAF/dlgu+9vzPWucY6jq7FKrWdwpslugvUMJmmb X-Received: by 2002:a05:6638:14d6:: with SMTP id l22mr20605172jak.99.1627380778420; Tue, 27 Jul 2021 03:12:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627380778; cv=none; d=google.com; s=arc-20160816; b=a788pI5607T8IGy7i9iSAsf6f1M/hQxrvy+ntCPfgO9LSo0WQlQiLRQDumubABdKtb EoqvZ1Z8G7+WTgsYR+K4THR/KMitwoUX8/WOcMDEn9InO+I9OgDIV7b+DsHNemgEozc3 La6IEMK4VgAvgxem3a6GoxuFlzLMEwfIYwd7v+65YKCNgnWiNGQssY4z6lDOYA0RICAL 1yvT1EN3MeOUxy7OcrFZHV5U4zapt9rokAWSJBY7oMqv8OVKRlyO6ySo9dswrEvcA2fL JfvT86WCR+niCeSVEflbsxQZey+qDklTMgmDvkr16uaik4J9zy87E6Nl5TbD7H+iu8Z1 uJpA== 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=mv1RFa/7rHaj7R4YUHXjIsvZkmVgjHnoU4lnF/xSIfI=; b=eQ7lL6LZW12tEyHr7F0cVhZJ7mbMJEZ7fDwsNr3kTQHa1GLr4TPd39luxT65pk1OGS j7paDJbeke795z3PhNtuyDkixgt+Vb2b1xBE1rwRMLYym+SlstOYSEIR+QeCMnRGCd+w gI3rcs2RmFCsdo+U6ljYxPdE3B2A8ciMhRIoWy0/CEUnac3zwE0t6gFAxvhyg1Mys/IA Izsct+uJg0/YsV8OJDOP5p6XoEanrXe+t6XL4qkY0W+mJEkkIAEDkQUyMOCRC7jX4e/N nB27p6ZVWZDf4DJ3Ri0xImQtKsvGv0yWPa1qVRXl0pbyL6dRvHOv4xrOkrU7J3MYVSh5 quOg== 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 l15si2828923jad.101.2021.07.27.03.12.47; Tue, 27 Jul 2021 03:12:58 -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 S236352AbhG0KLs (ORCPT + 99 others); Tue, 27 Jul 2021 06:11:48 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:56940 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S236296AbhG0KLm (ORCPT ); Tue, 27 Jul 2021 06:11:42 -0400 X-UUID: 145eddae27c741538ab334b887deeb35-20210727 X-UUID: 145eddae27c741538ab334b887deeb35-20210727 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 1421677960; Tue, 27 Jul 2021 18:11:40 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 27 Jul 2021 18:11:33 +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; Tue, 27 Jul 2021 18:11:32 +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 v3, 06/15] media: mtk-vcodec: Use pure single core for MT8183 Date: Tue, 27 Jul 2021 18:10:42 +0800 Message-ID: <20210727101051.24418-7-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210727101051.24418-1-yunfei.dong@mediatek.com> References: <20210727101051.24418-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 --- v3: no changes --- .../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 | 12 +++++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) 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 d6bb723db106..b116d2452269 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h @@ -107,7 +107,7 @@ enum mtk_vdec_hw_id { MTK_VDEC_LAT0, MTK_VDEC_LAT1, MTK_VDEC_HW_MAX, - }; +}; /* * struct mtk_video_fmt - Structure used to store information about pixelformats @@ -328,6 +328,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 @@ -346,6 +354,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 */ @@ -367,6 +376,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.25.1