Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp587612pxh; Tue, 9 Nov 2021 15:45:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxZMIfdxfdWCCtttFRcasFZetZmrZ+P6A3Mwh3cou4HLQNK5BfDzOfbz9Ts1KngZM6H1W2g X-Received: by 2002:a05:6e02:2187:: with SMTP id j7mr7672005ila.323.1636501516375; Tue, 09 Nov 2021 15:45:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636501516; cv=none; d=google.com; s=arc-20160816; b=Bo1Qjt2MiTSRb3XbLmF8wXDFAC11wMr42cMVyVV+0AzD1kkBYVpaPnQCxcXpB001Bn YMJjJHUPHHkNQNAgef9dO2RUD0778gdgYfFO2xbi2loQv3wT/wrWI0FpCsRpRYVSmEY9 69JBOV9fA95YV+vuG2LDb+Ks5ok47qske7uigS01XrRWNk4Srf84DhRECWgYI+H9CePk 7b8RWpBMsV74A9OY1IcK+eE2evH1zRJBqy6RGxcr7xaROY4/rMlrPWQUSon77MUfP+d8 w/nShxQkyEdzlvt1bIJV5a9EQ5OsoonZl9VMOvkN2s9SjALSA99IJHnPmMe2IFzwI4TM 7W+w== 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=xJtoQcyVeBuP+T3nu1AzpBNHlJn37pO7YJsngRVHSJc=; b=LA5nofTSUt9XSWAEVGHL1x1IYQxUa9xquA19ujLk1ZbnLHwB/c8DCWmmtJEFMwm+PX BLZ32dR0nwaT2pvg1LnF+XcixjkCmB3pFiXTQzbQcHAxc8UQlx6Dfp4r+bmsIIO8JNZr uYaQL/PuVXbMYxVRtIVXNtxvukCHegpc3q9EPIiMU08fHWa1VZkh9cdZ8FFpmsmr3liD Is/By+01fBZaFM2vMFJcBYqcO96XSj4gk5byx1GIzQJ3Ub2kqwYgla36d9JDlx/USfpk tvsHqCncQwqEjfG9MIbG1hIZK5cMYTY27KGLxSVH+qROywQkZ7+ywYhu2pKZJT6FAesP hVwA== 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 h25si28418236iob.58.2021.11.09.15.45.04; Tue, 09 Nov 2021 15:45:16 -0800 (PST) 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 S1343742AbhKIMxl (ORCPT + 97 others); Tue, 9 Nov 2021 07:53:41 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:57010 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1343666AbhKIMxa (ORCPT ); Tue, 9 Nov 2021 07:53:30 -0500 X-UUID: d5879ae4d86d41ed81790c08bf8c97be-20211109 X-UUID: d5879ae4d86d41ed81790c08bf8c97be-20211109 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 918150063; Tue, 09 Nov 2021 20:50:40 +0800 Received: from mtkmbs10n2.mediatek.inc (172.21.101.183) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Tue, 9 Nov 2021 20:50:39 +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; Tue, 9 Nov 2021 20:50:37 +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 , , , , , , , Subject: [PATCH v9, 05/19] media: mtk-vcodec: Support MT8192 Date: Tue, 9 Nov 2021 20:50:16 +0800 Message-ID: <20211109125030.26299-6-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211109125030.26299-1-yunfei.dong@mediatek.com> References: <20211109125030.26299-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 From: Yunfei Dong Adds MT8192's compatible "mediatek,mt8192-vcodec-dec". Adds MT8192's device private data mtk_lat_sig_core_pdata. Signed-off-by: Yunfei Dong --- .../media/platform/mtk-vcodec/mtk_vcodec_dec.h | 1 + .../platform/mtk-vcodec/mtk_vcodec_dec_drv.c | 4 ++++ .../mtk-vcodec/mtk_vcodec_dec_stateless.c | 16 ++++++++++++++++ 3 files changed, 21 insertions(+) diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h index 46783516b84a..e30806c1faea 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h @@ -67,6 +67,7 @@ extern const struct v4l2_m2m_ops mtk_vdec_m2m_ops; extern const struct media_device_ops mtk_vcodec_media_ops; extern const struct mtk_vcodec_dec_pdata mtk_vdec_8173_pdata; extern const struct mtk_vcodec_dec_pdata mtk_vdec_8183_pdata; +extern const struct mtk_vcodec_dec_pdata mtk_lat_sig_core_pdata; /* diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c index 3ac4c3935e4e..b7a51e96d4ba 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c @@ -393,6 +393,10 @@ static const struct of_device_id mtk_vcodec_match[] = { .compatible = "mediatek,mt8183-vcodec-dec", .data = &mtk_vdec_8183_pdata, }, + { + .compatible = "mediatek,mt8192-vcodec-dec", + .data = &mtk_lat_sig_core_pdata, + }, {}, }; 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..26e4d6f4ec04 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c @@ -358,3 +358,19 @@ const struct mtk_vcodec_dec_pdata mtk_vdec_8183_pdata = { .worker = mtk_vdec_worker, .flush_decoder = mtk_vdec_flush_decoder, }; + +const struct mtk_vcodec_dec_pdata mtk_lat_sig_core_pdata = { + .chip = MTK_MT8192, + .init_vdec_params = mtk_init_vdec_params, + .ctrls_setup = mtk_vcodec_dec_ctrls_setup, + .vdec_vb2_ops = &mtk_vdec_request_vb2_ops, + .vdec_formats = mtk_video_formats, + .num_formats = NUM_FORMATS, + .default_out_fmt = &mtk_video_formats[DEFAULT_OUT_FMT_IDX], + .default_cap_fmt = &mtk_video_formats[DEFAULT_CAP_FMT_IDX], + .vdec_framesizes = mtk_vdec_framesizes, + .num_framesizes = NUM_SUPPORTED_FRAMESIZE, + .uses_stateless_api = true, + .worker = mtk_vdec_worker, + .flush_decoder = mtk_vdec_flush_decoder, +}; -- 2.25.1