media: mtk-vcodec: Use pure single core for MT8183
authorYunfei Dong <yunfei.dong@mediatek.com>
Thu, 13 Jan 2022 04:10:45 +0000 (05:10 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 23 Jan 2022 20:18:45 +0000 (21:18 +0100)
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 <yunfei.dong@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateful.c
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c
drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h

index c7f9259ad094de58e0bdd05bc108df472f65dede..04ca43c77e5f7bade7d2615a3b4bba99e8db0956 100644 (file)
@@ -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,
 };
index 3294c8957ae5cf9d28856643c86161a6311d5fa0..23d997ac114d2fcaaca95fc7d77e655bbff1df4c 100644 (file)
@@ -357,6 +357,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,
 };
 
 /* This platform data is used for one lat and one core architecture. */
@@ -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,
 };
index ab2004242c437941278a1e05d2b1ca049e046764..17e7deee10b5578213e24fe1a65ec340a2b06b20 100644 (file)
@@ -324,6 +324,14 @@ enum mtk_chip {
        MTK_MT8195,
 };
 
+/*
+ * enum 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;