media: mediatek: vcodec: support stateless AV1 decoder
Subsystems (3)
RFC PATCH v6 1/1 media: mediatek: vcodec: support stateless AV1 decoder
Add mediatek av1 decoder linux driver which use the stateless API in MT8195.
---
Changes from v5:
- change av1 PROFILE and LEVEL cfg
- test by av1 fluster, result is 173/239
Changes from v4:
- convert vb2_find_timestamp to vb2_find_buffer
- test by av1 fluster, result is 173/239
Changes from v3:
- modify comment for struct vdec_av1_slice_slot
- add define SEG_LVL_ALT_Q
- change use_lr/use_chroma_lr parse from av1 spec
- use ARRAY_SIZE to replace size for loop_filter_level and loop_filter_mode_deltas
- change array size of loop_filter_mode_deltas from 4 to 2
- add define SECONDARY_FILTER_STRENGTH_NUM_BITS
- change some hex values from upper case to lower case
- change *dpb_sz equal to V4L2_AV1_TOTAL_REFS_PER_FRAME + 1
- test by av1 fluster, result is 173/239
Changes from v2:
- Match with av1 uapi v3 modify
- test by av1 fluster, result is 173/239
---
Reference series:
[1]: v3 of this series is presend by Daniel Almeida.
message-id: [email protected]
.../media/platform/mediatek/vcodec/Makefile | 1 + .../vcodec/mtk_vcodec_dec_stateless.c | 47 +- .../platform/mediatek/vcodec/mtk_vcodec_drv.h | 1 + .../vcodec/vdec/vdec_av1_req_lat_if.c | 2234 +++++++++++++++++ .../platform/mediatek/vcodec/vdec_drv_if.c | 4 + .../platform/mediatek/vcodec/vdec_drv_if.h | 1 + .../platform/mediatek/vcodec/vdec_msg_queue.c | 27 + .../platform/mediatek/vcodec/vdec_msg_queue.h | 4 + 8 files changed, 2318 insertions(+), 1 deletion(-) create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c
drivers/media/platform/mediatek/vcodec/Makefile +1 -0
@@ -10,6 +10,7 @@ mtk-vcodec-dec-y := vdec/vdec_h264_if.o \ vdec/vdec_vp8_req_if.o \ vdec/vdec_vp9_if.o \ vdec/vdec_vp9_req_lat_if.o \ + vdec/vdec_av1_req_lat_if.o \ vdec/vdec_h264_req_if.o \ vdec/vdec_h264_req_common.o \ vdec/vdec_h264_req_multi_if.o \
drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.c +46 -1
69 lines not on this page · raw message
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1 -0
@@ -344,6 +344,7 @@ enum mtk_vdec_format_types {MTK_VDEC_FORMAT_H264_SLICE =0x100 ,MTK_VDEC_FORMAT_VP8_FRAME =0x200 ,MTK_VDEC_FORMAT_VP9_FRAME =0x400 , +MTK_VDEC_FORMAT_AV1_FRAME =0x800 , MTK_VCODEC_INNER_RACING = 0x20000, };
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +2234 -0
2,234 lines not on this page · raw message
drivers/media/platform/mediatek/vcodec/vdec_drv_if.c +4 -0
@@ -49,6 +49,10 @@ int vdec_if_init(struct mtk_vcodec_ctx *ctx, unsigned int fourcc) ctx->dec_if = &vdec_vp9_slice_lat_if; ctx->hw_id =IS_VDEC_LAT_ARCH (hw_arch) ?MTK_VDEC_LAT0 :MTK_VDEC_CORE ;break ; +case V4L2_PIX_FMT_AV1_FRAME : + ctx->dec_if = &vdec_av1_slice_lat_if; + ctx->hw_id =MTK_VDEC_LAT0 ; +break ;default :return -EINVAL ; }
drivers/media/platform/mediatek/vcodec/vdec_drv_if.h +1 -0
@@ -61,6 +61,7 @@ extern const struct vdec_common_if vdec_vp8_if;extern const struct vdec_common_if vdec_vp8_slice_if;extern const struct vdec_common_if vdec_vp9_if;extern const struct vdec_common_if vdec_vp9_slice_lat_if; +extern const struct vdec_common_if vdec_av1_slice_lat_if;/** * vdec_if_init() - initialize decode driver
drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c +27 -0
@@ -20,6 +20,9 @@/* the size used to store avc error information */ #define VDEC_ERR_MAP_SZ_AVC (17 * SZ_1K) +#define VDEC_RD_MV_BUFFER_SZ (((SZ_4K * 2304 >> 4) + SZ_1K) << 1) +#define VDEC_LAT_TILE_SZ (64 * SZ_4K) +/* core will read the trans buffer which decoded by lat to decode again. * The trans buffer size of FHD and 4K bitstreams are different. */
@@ -194,6 +197,14 @@ void vdec_msg_queue_deinit(struct vdec_msg_queue *msg_queue,if (mem->va)mtk_vcodec_mem_free (ctx, mem); + mem = &lat_buf->rd_mv_addr; +if (mem->va) +mtk_vcodec_mem_free (ctx, mem); + + mem = &lat_buf->tile_addr; +if (mem->va) +mtk_vcodec_mem_free (ctx, mem); +kfree (lat_buf->private_data); } }
@@ -270,6 +281,22 @@ int vdec_msg_queue_init(struct vdec_msg_queue *msg_queue, goto mem_alloc_err; } +if (ctx->current_codec ==V4L2_PIX_FMT_AV1_FRAME ) { + lat_buf->rd_mv_addr.size =VDEC_RD_MV_BUFFER_SZ ; + err =mtk_vcodec_mem_alloc (ctx, &lat_buf->rd_mv_addr); +if (err) { +mtk_v4l2_err ("failed to allocate rd_mv_addr buf[%d]" , i); +return -ENOMEM ; + } + + lat_buf->tile_addr.size =VDEC_LAT_TILE_SZ ; + err =mtk_vcodec_mem_alloc (ctx, &lat_buf->tile_addr); +if (err) { +mtk_v4l2_err ("failed to allocate tile_addr buf[%d]" , i); +return -ENOMEM ; + } + } + lat_buf->private_data =kzalloc (private_size,GFP_KERNEL );if (!lat_buf->private_data) { err = -ENOMEM ;
drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h +4 -0
@@ -42,6 +42,8 @@ struct vdec_msg_queue_ctx {* struct vdec_lat_buf - lat buffer message used to store lat info for core decode * @wdma_err_addr: wdma error address used for lat hardware * @slice_bc_addr: slice bc address used for lat hardware +* @rd_mv_addr: mv addr for av1 lat hardware output, core hardware input +* @tile_addr: tile buffer for av1 core input * @ts_info: need to set timestamp from output to capture * @src_buf_req: output buffer media request object *
@@ -54,6 +56,8 @@ struct vdec_msg_queue_ctx {struct vdec_lat_buf {struct mtk_vcodec_mem wdma_err_addr;struct mtk_vcodec_mem slice_bc_addr; +struct mtk_vcodec_mem rd_mv_addr; +struct mtk_vcodec_mem tile_addr;struct vb2_v4l2_buffer ts_info;struct media_request *src_buf_req;
Signature · 1 line
2.18.0
kernel test robot
build bot[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in…
Hi Xiaoyong,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on media-tree/master]
[also build test WARNING on linus/master v6.1-rc5 next-20221116] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Xiaoyong-Lu/media-mediatek-vcodec-support-stateless-AV1-decoder/20221117-142010 base: git://linuxtv.org/media_tree.git master patch link: https://lore.kernel.org/r/20221117061742.29702-1-xiaoyong.lu%40mediatek.com patch subject: [RFC PATCH v6] media: mediatek: vcodec: support stateless AV1 decoder config: sparc-allyesconfig compiler: sparc64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/da7abda0a3503c66be593220da8ded83974d9521
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Xiaoyong-Lu/media-mediatek-vcodec-support-stateless-AV1-decoder/20221117-142010 git checkout da7abda0a3503c66be593220da8ded83974d9521
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash drivers/media/
If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <[email protected]>
All warnings (new ones prefixed by >>):
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:186:23: error: 'V4L2_AV1_MAX_TILE_COUNT' undeclared here (not in a function)
186 | u32 tile_size[V4L2_AV1_MAX_TILE_COUNT];
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:266:26: error: 'V4L2_AV1_MAX_SEGMENTS' undeclared here (not in a function)
266 | int feature_data[V4L2_AV1_MAX_SEGMENTS][V4L2_AV1_SEG_LVL_MAX];
| ^~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:266:49: error: 'V4L2_AV1_SEG_LVL_MAX' undeclared here (not in a function); did you mean 'V4L2_VP9_SEG_LVL_MAX'?
266 | int feature_data[V4L2_AV1_MAX_SEGMENTS][V4L2_AV1_SEG_LVL_MAX];
| ^~~~~~~~~~~~~~~~~~~~
| V4L2_VP9_SEG_LVL_MAX
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:334:35: error: 'V4L2_AV1_NUM_PLANES_MAX' undeclared here (not in a function)
334 | u8 frame_restoration_type[V4L2_AV1_NUM_PLANES_MAX];
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:354:36: error: 'V4L2_AV1_TOTAL_REFS_PER_FRAME' undeclared here (not in a function)
354 | int loop_filter_ref_deltas[V4L2_AV1_TOTAL_REFS_PER_FRAME];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:404:27: error: 'V4L2_AV1_MAX_TILE_COLS' undeclared here (not in a function)
404 | int mi_col_starts[V4L2_AV1_MAX_TILE_COLS + 1];
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:405:27: error: 'V4L2_AV1_MAX_TILE_ROWS' undeclared here (not in a function)
405 | int mi_row_starts[V4L2_AV1_MAX_TILE_ROWS + 1];
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:557:25: error: 'V4L2_AV1_REFS_PER_FRAME' undeclared here (not in a function)
557 | u32 order_hints[V4L2_AV1_REFS_PER_FRAME];
| ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:888:49: warning: 'struct v4l2_ctrl_av1_frame' declared inside parameter list will not be visible outside of this definition or declaration
888 | struct v4l2_ctrl_av1_frame *ctrl_fh)
| ^~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: In function 'vdec_av1_slice_cleanup_slots':
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:904:36: error: invalid use of undefined type 'struct v4l2_ctrl_av1_frame'
904 | if (ctrl_fh->reference_frame_ts[ref_id] == timestamp) {
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: At top level:
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:917:46: warning: 'struct v4l2_ctrl_av1_frame' declared inside parameter list will not be visible outside of this definition or declaration
917 | struct v4l2_ctrl_av1_frame *ctrl_fh)
| ^~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: In function 'vdec_av1_slice_setup_slot':
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:924:64: error: passing argument 3 of 'vdec_av1_slice_cleanup_slots' from incompatible pointer type [-Werror=incompatible-pointer-types]
924 | vdec_av1_slice_cleanup_slots(&vsi->slots, &vsi->frame, ctrl_fh);
| ^~~~~~~
| |
| struct v4l2_ctrl_av1_frame *
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:888:70: note: expected 'struct v4l2_ctrl_av1_frame *' but argument is of type 'struct v4l2_ctrl_av1_frame *'
888 | struct v4l2_ctrl_av1_frame *ctrl_fh)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:947:28: error: invalid use of undefined type 'struct v4l2_ctrl_av1_frame'
947 | if (ctrl_fh->reference_frame_ts[ref_id] == timestamp)
| ^~
In file included from include/linux/container_of.h:5,
from include/linux/list.h:5,
from include/linux/module.h:12,
from drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:7:
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: In function 'vdec_av1_slice_free_working_buffer':
include/linux/build_bug.h:16:51: error: bit-field '<anonymous>' width not an integer constant
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/compiler.h:232:33: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
232 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
| ^~~~~~~~~~~~~~~~~
include/linux/kernel.h:55:59: note: in expansion of macro '__must_be_array'
55 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1058:25: note: in expansion of macro 'ARRAY_SIZE'
1058 | for (i = 0; i < ARRAY_SIZE(instance->mv); i++)
| ^~~~~~~~~~
include/linux/build_bug.h:16:51: error: bit-field '<anonymous>' width not an integer constant
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/compiler.h:232:33: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
232 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
| ^~~~~~~~~~~~~~~~~
include/linux/kernel.h:55:59: note: in expansion of macro '__must_be_array'
55 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1062:25: note: in expansion of macro 'ARRAY_SIZE'
1062 | for (i = 0; i < ARRAY_SIZE(instance->seg); i++)
| ^~~~~~~~~~
include/linux/build_bug.h:16:51: error: bit-field '<anonymous>' width not an integer constant
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/compiler.h:232:33: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
232 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
| ^~~~~~~~~~~~~~~~~
include/linux/kernel.h:55:59: note: in expansion of macro '__must_be_array'
55 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1066:25: note: in expansion of macro 'ARRAY_SIZE'
1066 | for (i = 0; i < ARRAY_SIZE(instance->cdf); i++)
| ^~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: At top level:
>> drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1168:44: warning: 'struct v4l2_av1_global_motion' declared inside parameter list will not be visible outside of this definition or declaration
1168 | struct v4l2_av1_global_motion *ctrl_gm)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: In function 'vdec_av1_slice_setup_gm':
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1173:39: error: invalid use of undefined type 'struct v4l2_av1_global_motion'
1173 | gm[i].wmtype = ctrl_gm->type[i];
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1175:49: error: invalid use of undefined type 'struct v4l2_av1_global_motion'
1175 | gm[i].wmmat[j] = ctrl_gm->params[i][j];
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1177:43: error: invalid use of undefined type 'struct v4l2_av1_global_motion'
1177 | gm[i].invalid = !!(ctrl_gm->invalid & BIT(i));
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: At top level:
>> drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1188:45: warning: 'struct v4l2_av1_segmentation' declared inside parameter list will not be visible outside of this definition or declaration
1188 | struct v4l2_av1_segmentation *ctrl_seg)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: In function 'vdec_av1_slice_setup_seg':
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:43:48: error: invalid use of undefined type 'struct v4l2_av1_segmentation'
43 | #define SEGMENTATION_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEGMENTATION_FLAG_##name))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1192:37: note: in expansion of macro 'SEGMENTATION_FLAG'
1192 | seg->segmentation_enabled = SEGMENTATION_FLAG(ctrl_seg, ENABLED);
| ^~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:43:58: error: 'V4L2_AV1_SEGMENTATION_FLAG_ENABLED' undeclared (first use in this function); did you mean 'V4L2_VP9_SEGMENTATION_FLAG_ENABLED'?
43 | #define SEGMENTATION_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEGMENTATION_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1192:37: note: in expansion of macro 'SEGMENTATION_FLAG'
1192 | seg->segmentation_enabled = SEGMENTATION_FLAG(ctrl_seg, ENABLED);
| ^~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:43:58: note: each undeclared identifier is reported only once for each function it appears in
43 | #define SEGMENTATION_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEGMENTATION_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1192:37: note: in expansion of macro 'SEGMENTATION_FLAG'
1192 | seg->segmentation_enabled = SEGMENTATION_FLAG(ctrl_seg, ENABLED);
| ^~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:43:48: error: invalid use of undefined type 'struct v4l2_av1_segmentation'
43 | #define SEGMENTATION_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEGMENTATION_FLAG_##name))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1193:40: note: in expansion of macro 'SEGMENTATION_FLAG'
1193 | seg->segmentation_update_map = SEGMENTATION_FLAG(ctrl_seg, UPDATE_MAP);
| ^~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:43:58: error: 'V4L2_AV1_SEGMENTATION_FLAG_UPDATE_MAP' undeclared (first use in this function); did you mean 'V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP'?
43 | #define SEGMENTATION_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEGMENTATION_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1193:40: note: in expansion of macro 'SEGMENTATION_FLAG'
1193 | seg->segmentation_update_map = SEGMENTATION_FLAG(ctrl_seg, UPDATE_MAP);
| ^~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:43:48: error: invalid use of undefined type 'struct v4l2_av1_segmentation'
43 | #define SEGMENTATION_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEGMENTATION_FLAG_##name))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1194:45: note: in expansion of macro 'SEGMENTATION_FLAG'
1194 | seg->segmentation_temporal_update = SEGMENTATION_FLAG(ctrl_seg, TEMPORAL_UPDATE);
| ^~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:43:58: error: 'V4L2_AV1_SEGMENTATION_FLAG_TEMPORAL_UPDATE' undeclared (first use in this function); did you mean 'V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE'?
43 | #define SEGMENTATION_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEGMENTATION_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1194:45: note: in expansion of macro 'SEGMENTATION_FLAG'
1194 | seg->segmentation_temporal_update = SEGMENTATION_FLAG(ctrl_seg, TEMPORAL_UPDATE);
| ^~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:43:48: error: invalid use of undefined type 'struct v4l2_av1_segmentation'
43 | #define SEGMENTATION_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEGMENTATION_FLAG_##name))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1195:41: note: in expansion of macro 'SEGMENTATION_FLAG'
1195 | seg->segmentation_update_data = SEGMENTATION_FLAG(ctrl_seg, UPDATE_DATA);
| ^~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:43:58: error: 'V4L2_AV1_SEGMENTATION_FLAG_UPDATE_DATA' undeclared (first use in this function); did you mean 'V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA'?
43 | #define SEGMENTATION_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEGMENTATION_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1195:41: note: in expansion of macro 'SEGMENTATION_FLAG'
1195 | seg->segmentation_update_data = SEGMENTATION_FLAG(ctrl_seg, UPDATE_DATA);
| ^~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:43:48: error: invalid use of undefined type 'struct v4l2_av1_segmentation'
43 | #define SEGMENTATION_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEGMENTATION_FLAG_##name))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1196:30: note: in expansion of macro 'SEGMENTATION_FLAG'
1196 | seg->segid_preskip = SEGMENTATION_FLAG(ctrl_seg, SEG_ID_PRE_SKIP);
| ^~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:43:58: error: 'V4L2_AV1_SEGMENTATION_FLAG_SEG_ID_PRE_SKIP' undeclared (first use in this function); did you mean 'V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP'?
43 | #define SEGMENTATION_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEGMENTATION_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1196:30: note: in expansion of macro 'SEGMENTATION_FLAG'
1196 | seg->segid_preskip = SEGMENTATION_FLAG(ctrl_seg, SEG_ID_PRE_SKIP);
| ^~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1197:42: error: invalid use of undefined type 'struct v4l2_av1_segmentation'
1197 | seg->last_active_segid = ctrl_seg->last_active_seg_id;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1200:56: error: invalid use of undefined type 'struct v4l2_av1_segmentation'
1200 | seg->feature_enabled_mask[i] = ctrl_seg->feature_enabled[i];
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1202:59: error: invalid use of undefined type 'struct v4l2_av1_segmentation'
1202 | seg->feature_data[i][j] = ctrl_seg->feature_data[i][j];
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: At top level:
>> drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1207:47: warning: 'struct v4l2_av1_quantization' declared inside parameter list will not be visible outside of this definition or declaration
1207 | struct v4l2_av1_quantization *ctrl_quant)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: In function 'vdec_av1_slice_setup_quant':
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1209:39: error: invalid use of undefined type 'struct v4l2_av1_quantization'
1209 | quant->base_q_idx = ctrl_quant->base_q_idx;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1210:39: error: invalid use of undefined type 'struct v4l2_av1_quantization'
1210 | quant->delta_qydc = ctrl_quant->delta_q_y_dc;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1211:39: error: invalid use of undefined type 'struct v4l2_av1_quantization'
1211 | quant->delta_qudc = ctrl_quant->delta_q_u_dc;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1212:39: error: invalid use of undefined type 'struct v4l2_av1_quantization'
1212 | quant->delta_quac = ctrl_quant->delta_q_u_ac;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1213:39: error: invalid use of undefined type 'struct v4l2_av1_quantization'
1213 | quant->delta_qvdc = ctrl_quant->delta_q_v_dc;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1214:39: error: invalid use of undefined type 'struct v4l2_av1_quantization'
1214 | quant->delta_qvac = ctrl_quant->delta_q_v_ac;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1215:33: error: invalid use of undefined type 'struct v4l2_av1_quantization'
1215 | quant->qm_y = ctrl_quant->qm_y;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1216:33: error: invalid use of undefined type 'struct v4l2_av1_quantization'
1216 | quant->qm_u = ctrl_quant->qm_u;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1217:33: error: invalid use of undefined type 'struct v4l2_av1_quantization'
1217 | quant->qm_v = ctrl_quant->qm_v;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:44:48: error: invalid use of undefined type 'struct v4l2_av1_quantization'
44 | #define QUANT_FLAG(x, name) (!!((x)->flags & V4L2_AV1_QUANTIZATION_FLAG_##name))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1218:32: note: in expansion of macro 'QUANT_FLAG'
1218 | quant->using_qmatrix = QUANT_FLAG(ctrl_quant, USING_QMATRIX);
| ^~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:44:58: error: 'V4L2_AV1_QUANTIZATION_FLAG_USING_QMATRIX' undeclared (first use in this function)
44 | #define QUANT_FLAG(x, name) (!!((x)->flags & V4L2_AV1_QUANTIZATION_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1218:32: note: in expansion of macro 'QUANT_FLAG'
1218 | quant->using_qmatrix = QUANT_FLAG(ctrl_quant, USING_QMATRIX);
| ^~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: In function 'vdec_av1_slice_get_qindex':
>> drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1222:42: warning: parameter 'segmentation_id' set but not used [-Wunused-but-set-parameter]
1222 | int segmentation_id)
| ~~~~^~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: At top level:
>> drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1239:44: warning: 'struct v4l2_av1_loop_restoration' declared inside parameter list will not be visible outside of this definition or declaration
1239 | struct v4l2_av1_loop_restoration *ctrl_lr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: In function 'vdec_av1_slice_setup_lr':
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1246:56: error: invalid use of undefined type 'struct v4l2_av1_loop_restoration'
1246 | lr->frame_restoration_type[i] = ctrl_lr->frame_restoration_type[i];
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1247:55: error: invalid use of undefined type 'struct v4l2_av1_loop_restoration'
1247 | lr->loop_restoration_size[i] = ctrl_lr->loop_restoration_size[i];
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: At top level:
>> drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1257:44: warning: 'struct v4l2_av1_loop_filter' declared inside parameter list will not be visible outside of this definition or declaration
1257 | struct v4l2_av1_loop_filter *ctrl_lf)
| ^~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: In function 'vdec_av1_slice_setup_lf':
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1262:51: error: invalid use of undefined type 'struct v4l2_av1_loop_filter'
1262 | lf->loop_filter_level[i] = ctrl_lf->level[i];
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1265:56: error: invalid use of undefined type 'struct v4l2_av1_loop_filter'
1265 | lf->loop_filter_ref_deltas[i] = ctrl_lf->ref_deltas[i];
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1268:57: error: invalid use of undefined type 'struct v4l2_av1_loop_filter'
1268 | lf->loop_filter_mode_deltas[i] = ctrl_lf->mode_deltas[i];
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1270:44: error: invalid use of undefined type 'struct v4l2_av1_loop_filter'
1270 | lf->loop_filter_sharpness = ctrl_lf->sharpness;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:42:48: error: invalid use of undefined type 'struct v4l2_av1_loop_filter'
42 | #define BIT_FLAG(x, bit) (!!((x)->flags & (bit)))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1272:20: note: in expansion of macro 'BIT_FLAG'
1272 | BIT_FLAG(ctrl_lf, V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED);
| ^~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1272:38: error: 'V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED' undeclared (first use in this function); did you mean 'V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED'?
1272 | BIT_FLAG(ctrl_lf, V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:42:59: note: in definition of macro 'BIT_FLAG'
42 | #define BIT_FLAG(x, bit) (!!((x)->flags & (bit)))
| ^~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: At top level:
>> drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1276:46: warning: 'struct v4l2_av1_cdef' declared inside parameter list will not be visible outside of this definition or declaration
1276 | struct v4l2_av1_cdef *ctrl_cdef)
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: In function 'vdec_av1_slice_setup_cdef':
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1280:39: error: invalid use of undefined type 'struct v4l2_av1_cdef'
1280 | cdef->cdef_damping = ctrl_cdef->damping_minus_3 + 3;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1281:36: error: invalid use of undefined type 'struct v4l2_av1_cdef'
1281 | cdef->cdef_bits = ctrl_cdef->bits;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1283:25: error: 'V4L2_AV1_CDEF_MAX' undeclared (first use in this function)
1283 | for (i = 0; i < V4L2_AV1_CDEF_MAX; i++) {
| ^~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1284:30: error: invalid use of undefined type 'struct v4l2_av1_cdef'
1284 | if (ctrl_cdef->y_sec_strength[i] == 4)
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1285:34: error: invalid use of undefined type 'struct v4l2_av1_cdef'
1285 | ctrl_cdef->y_sec_strength[i] -= 1;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1287:30: error: invalid use of undefined type 'struct v4l2_av1_cdef'
1287 | if (ctrl_cdef->uv_sec_strength[i] == 4)
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1288:34: error: invalid use of undefined type 'struct v4l2_av1_cdef'
1288 | ctrl_cdef->uv_sec_strength[i] -= 1;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1291:34: error: invalid use of undefined type 'struct v4l2_av1_cdef'
1291 | ctrl_cdef->y_pri_strength[i] << SECONDARY_FILTER_STRENGTH_NUM_BITS |
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1292:34: error: invalid use of undefined type 'struct v4l2_av1_cdef'
1292 | ctrl_cdef->y_sec_strength[i];
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1294:34: error: invalid use of undefined type 'struct v4l2_av1_cdef'
1294 | ctrl_cdef->uv_pri_strength[i] << SECONDARY_FILTER_STRENGTH_NUM_BITS |
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1295:34: error: invalid use of undefined type 'struct v4l2_av1_cdef'
1295 | ctrl_cdef->uv_sec_strength[i];
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: At top level:
>> drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1300:45: warning: 'struct v4l2_ctrl_av1_sequence' declared inside parameter list will not be visible outside of this definition or declaration
1300 | struct v4l2_ctrl_av1_sequence *ctrl_seq)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: In function 'vdec_av1_slice_setup_seq':
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1302:33: error: invalid use of undefined type 'struct v4l2_ctrl_av1_sequence'
1302 | seq->bitdepth = ctrl_seq->bit_depth;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1303:40: error: invalid use of undefined type 'struct v4l2_ctrl_av1_sequence'
1303 | seq->max_frame_width = ctrl_seq->max_frame_width_minus_1 + 1;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1304:41: error: invalid use of undefined type 'struct v4l2_ctrl_av1_sequence'
1304 | seq->max_frame_height = ctrl_seq->max_frame_height_minus_1 + 1;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:48: error: invalid use of undefined type 'struct v4l2_ctrl_av1_sequence'
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1305:32: note: in expansion of macro 'SEQUENCE_FLAG'
1305 | seq->enable_superres = SEQUENCE_FLAG(ctrl_seq, ENABLE_SUPERRES);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:58: error: 'V4L2_AV1_SEQUENCE_FLAG_ENABLE_SUPERRES' undeclared (first use in this function)
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1305:32: note: in expansion of macro 'SEQUENCE_FLAG'
1305 | seq->enable_superres = SEQUENCE_FLAG(ctrl_seq, ENABLE_SUPERRES);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:48: error: invalid use of undefined type 'struct v4l2_ctrl_av1_sequence'
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1306:36: note: in expansion of macro 'SEQUENCE_FLAG'
1306 | seq->enable_filter_intra = SEQUENCE_FLAG(ctrl_seq, ENABLE_FILTER_INTRA);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:58: error: 'V4L2_AV1_SEQUENCE_FLAG_ENABLE_FILTER_INTRA' undeclared (first use in this function)
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1306:36: note: in expansion of macro 'SEQUENCE_FLAG'
1306 | seq->enable_filter_intra = SEQUENCE_FLAG(ctrl_seq, ENABLE_FILTER_INTRA);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:48: error: invalid use of undefined type 'struct v4l2_ctrl_av1_sequence'
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1307:41: note: in expansion of macro 'SEQUENCE_FLAG'
1307 | seq->enable_intra_edge_filter = SEQUENCE_FLAG(ctrl_seq, ENABLE_INTRA_EDGE_FILTER);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:58: error: 'V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTRA_EDGE_FILTER' undeclared (first use in this function)
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1307:41: note: in expansion of macro 'SEQUENCE_FLAG'
1307 | seq->enable_intra_edge_filter = SEQUENCE_FLAG(ctrl_seq, ENABLE_INTRA_EDGE_FILTER);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:48: error: invalid use of undefined type 'struct v4l2_ctrl_av1_sequence'
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1308:43: note: in expansion of macro 'SEQUENCE_FLAG'
1308 | seq->enable_interintra_compound = SEQUENCE_FLAG(ctrl_seq, ENABLE_INTERINTRA_COMPOUND);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:58: error: 'V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTERINTRA_COMPOUND' undeclared (first use in this function)
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1308:43: note: in expansion of macro 'SEQUENCE_FLAG'
1308 | seq->enable_interintra_compound = SEQUENCE_FLAG(ctrl_seq, ENABLE_INTERINTRA_COMPOUND);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:48: error: invalid use of undefined type 'struct v4l2_ctrl_av1_sequence'
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1309:39: note: in expansion of macro 'SEQUENCE_FLAG'
1309 | seq->enable_masked_compound = SEQUENCE_FLAG(ctrl_seq, ENABLE_MASKED_COMPOUND);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:58: error: 'V4L2_AV1_SEQUENCE_FLAG_ENABLE_MASKED_COMPOUND' undeclared (first use in this function)
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1309:39: note: in expansion of macro 'SEQUENCE_FLAG'
1309 | seq->enable_masked_compound = SEQUENCE_FLAG(ctrl_seq, ENABLE_MASKED_COMPOUND);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:48: error: invalid use of undefined type 'struct v4l2_ctrl_av1_sequence'
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1310:35: note: in expansion of macro 'SEQUENCE_FLAG'
1310 | seq->enable_dual_filter = SEQUENCE_FLAG(ctrl_seq, ENABLE_DUAL_FILTER);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:58: error: 'V4L2_AV1_SEQUENCE_FLAG_ENABLE_DUAL_FILTER' undeclared (first use in this function)
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1310:35: note: in expansion of macro 'SEQUENCE_FLAG'
1310 | seq->enable_dual_filter = SEQUENCE_FLAG(ctrl_seq, ENABLE_DUAL_FILTER);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:48: error: invalid use of undefined type 'struct v4l2_ctrl_av1_sequence'
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1311:32: note: in expansion of macro 'SEQUENCE_FLAG'
1311 | seq->enable_jnt_comp = SEQUENCE_FLAG(ctrl_seq, ENABLE_JNT_COMP);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:58: error: 'V4L2_AV1_SEQUENCE_FLAG_ENABLE_JNT_COMP' undeclared (first use in this function)
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1311:32: note: in expansion of macro 'SEQUENCE_FLAG'
1311 | seq->enable_jnt_comp = SEQUENCE_FLAG(ctrl_seq, ENABLE_JNT_COMP);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:48: error: invalid use of undefined type 'struct v4l2_ctrl_av1_sequence'
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1312:28: note: in expansion of macro 'SEQUENCE_FLAG'
1312 | seq->mono_chrome = SEQUENCE_FLAG(ctrl_seq, MONO_CHROME);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:58: error: 'V4L2_AV1_SEQUENCE_FLAG_MONO_CHROME' undeclared (first use in this function)
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1312:28: note: in expansion of macro 'SEQUENCE_FLAG'
1312 | seq->mono_chrome = SEQUENCE_FLAG(ctrl_seq, MONO_CHROME);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:48: error: invalid use of undefined type 'struct v4l2_ctrl_av1_sequence'
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1313:34: note: in expansion of macro 'SEQUENCE_FLAG'
1313 | seq->enable_order_hint = SEQUENCE_FLAG(ctrl_seq, ENABLE_ORDER_HINT);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:58: error: 'V4L2_AV1_SEQUENCE_FLAG_ENABLE_ORDER_HINT' undeclared (first use in this function)
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1313:34: note: in expansion of macro 'SEQUENCE_FLAG'
1313 | seq->enable_order_hint = SEQUENCE_FLAG(ctrl_seq, ENABLE_ORDER_HINT);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1314:40: error: invalid use of undefined type 'struct v4l2_ctrl_av1_sequence'
1314 | seq->order_hint_bits = ctrl_seq->order_hint_bits;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:48: error: invalid use of undefined type 'struct v4l2_ctrl_av1_sequence'
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1315:39: note: in expansion of macro 'SEQUENCE_FLAG'
1315 | seq->use_128x128_superblock = SEQUENCE_FLAG(ctrl_seq, USE_128X128_SUPERBLOCK);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:58: error: 'V4L2_AV1_SEQUENCE_FLAG_USE_128X128_SUPERBLOCK' undeclared (first use in this function)
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1315:39: note: in expansion of macro 'SEQUENCE_FLAG'
1315 | seq->use_128x128_superblock = SEQUENCE_FLAG(ctrl_seq, USE_128X128_SUPERBLOCK);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:48: error: invalid use of undefined type 'struct v4l2_ctrl_av1_sequence'
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1316:30: note: in expansion of macro 'SEQUENCE_FLAG'
1316 | seq->subsampling_x = SEQUENCE_FLAG(ctrl_seq, SUBSAMPLING_X);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:58: error: 'V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_X' undeclared (first use in this function)
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1316:30: note: in expansion of macro 'SEQUENCE_FLAG'
1316 | seq->subsampling_x = SEQUENCE_FLAG(ctrl_seq, SUBSAMPLING_X);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:48: error: invalid use of undefined type 'struct v4l2_ctrl_av1_sequence'
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1317:30: note: in expansion of macro 'SEQUENCE_FLAG'
1317 | seq->subsampling_y = SEQUENCE_FLAG(ctrl_seq, SUBSAMPLING_Y);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:45:58: error: 'V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_Y' undeclared (first use in this function)
45 | #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name))
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1317:30: note: in expansion of macro 'SEQUENCE_FLAG'
1317 | seq->subsampling_y = SEQUENCE_FLAG(ctrl_seq, SUBSAMPLING_Y);
| ^~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: At top level:
>> drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1321:46: warning: 'struct v4l2_av1_tile_info' declared inside parameter list will not be visible outside of this definition or declaration
1321 | struct v4l2_av1_tile_info *ctrl_tile)
| ^~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: In function 'vdec_av1_slice_setup_tile':
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1328:36: error: invalid use of undefined type 'struct v4l2_av1_tile_info'
1328 | tile->tile_cols = ctrl_tile->tile_cols;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1329:36: error: invalid use of undefined type 'struct v4l2_av1_tile_info'
1329 | tile->tile_rows = ctrl_tile->tile_rows;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1330:49: error: invalid use of undefined type 'struct v4l2_av1_tile_info'
1330 | tile->context_update_tile_id = ctrl_tile->context_update_tile_id;
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:42:48: error: invalid use of undefined type 'struct v4l2_av1_tile_info'
42 | #define BIT_FLAG(x, bit) (!!((x)->flags & (bit)))
| ^~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1332:17: note: in expansion of macro 'BIT_FLAG'
1332 | BIT_FLAG(ctrl_tile, V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING);
| ^~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1332:37: error: 'V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING' undeclared (first use in this function)
1332 | BIT_FLAG(ctrl_tile, V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:42:59: note: in definition of macro 'BIT_FLAG'
42 | #define BIT_FLAG(x, bit) (!!((x)->flags & (bit)))
| ^~~
In file included from include/vdso/const.h:5,
from include/linux/const.h:4,
from include/linux/list.h:9:
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1336:40: error: invalid use of undefined type 'struct v4l2_av1_tile_info'
1336 | ALIGN(ctrl_tile->mi_col_starts[i], BIT(mib_size_log2)) >> mib_size_log2;
| ^~
include/uapi/linux/const.h:32:44: note: in definition of macro '__ALIGN_KERNEL_MASK'
32 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
| ^
include/linux/align.h:8:33: note: in expansion of macro '__ALIGN_KERNEL'
8 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
| ^~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1336:25: note: in expansion of macro 'ALIGN'
1336 | ALIGN(ctrl_tile->mi_col_starts[i], BIT(mib_size_log2)) >> mib_size_log2;
| ^~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1336:40: error: invalid use of undefined type 'struct v4l2_av1_tile_info'
1336 | ALIGN(ctrl_tile->mi_col_starts[i], BIT(mib_size_log2)) >> mib_size_log2;
| ^~
include/uapi/linux/const.h:32:50: note: in definition of macro '__ALIGN_KERNEL_MASK'
32 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
| ^~~~
include/linux/align.h:8:33: note: in expansion of macro '__ALIGN_KERNEL'
8 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
| ^~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1336:25: note: in expansion of macro 'ALIGN'
1336 | ALIGN(ctrl_tile->mi_col_starts[i], BIT(mib_size_log2)) >> mib_size_log2;
| ^~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1336:40: error: invalid use of undefined type 'struct v4l2_av1_tile_info'
1336 | ALIGN(ctrl_tile->mi_col_starts[i], BIT(mib_size_log2)) >> mib_size_log2;
| ^~
include/uapi/linux/const.h:32:61: note: in definition of macro '__ALIGN_KERNEL_MASK'
32 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
| ^~~~
include/linux/align.h:8:33: note: in expansion of macro '__ALIGN_KERNEL'
8 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
| ^~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1336:25: note: in expansion of macro 'ALIGN'
1336 | ALIGN(ctrl_tile->mi_col_starts[i], BIT(mib_size_log2)) >> mib_size_log2;
| ^~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1340:40: error: invalid use of undefined type 'struct v4l2_av1_tile_info'
1340 | ALIGN(ctrl_tile->mi_row_starts[i], BIT(mib_size_log2)) >> mib_size_log2;
| ^~
include/uapi/linux/const.h:32:44: note: in definition of macro '__ALIGN_KERNEL_MASK'
32 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
| ^
include/linux/align.h:8:33: note: in expansion of macro '__ALIGN_KERNEL'
8 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
| ^~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1340:25: note: in expansion of macro 'ALIGN'
1340 | ALIGN(ctrl_tile->mi_row_starts[i], BIT(mib_size_log2)) >> mib_size_log2;
| ^~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1340:40: error: invalid use of undefined type 'struct v4l2_av1_tile_info'
1340 | ALIGN(ctrl_tile->mi_row_starts[i], BIT(mib_size_log2)) >> mib_size_log2;
| ^~
include/uapi/linux/const.h:32:50: note: in definition of macro '__ALIGN_KERNEL_MASK'
32 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
| ^~~~
include/linux/align.h:8:33: note: in expansion of macro '__ALIGN_KERNEL'
8 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
| ^~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1340:25: note: in expansion of macro 'ALIGN'
1340 | ALIGN(ctrl_tile->mi_row_starts[i], BIT(mib_size_log2)) >> mib_size_log2;
| ^~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1340:40: error: invalid use of undefined type 'struct v4l2_av1_tile_info'
1340 | ALIGN(ctrl_tile->mi_row_starts[i], BIT(mib_size_log2)) >> mib_size_log2;
| ^~
include/uapi/linux/const.h:32:61: note: in definition of macro '__ALIGN_KERNEL_MASK'
32 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
| ^~~~
include/linux/align.h:8:33: note: in expansion of macro '__ALIGN_KERNEL'
8 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
| ^~~~~~~~~~~~~~
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c:1340:25: note: in expansion of macro 'ALIGN'
1340 | ALIGN(ctrl_tile->mi_row_starts[i], BIT(mib_size_log2)) >> mib_size_log2;
| ^~~~~ drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c: At top level:
..
vim +888 drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c
885
886 static void vdec_av1_slice_cleanup_slots(struct vdec_av1_slice_slot *slots,
887 struct vdec_av1_slice_frame *frame,
> 888 struct v4l2_ctrl_av1_frame *ctrl_fh)
889 {
890 int slot_id, ref_id;
891
892 for (ref_id = 0; ref_id < V4L2_AV1_TOTAL_REFS_PER_FRAME; ref_id++)
893 frame->ref_frame_map[ref_id] = AV1_INVALID_IDX;
894
895 for (slot_id = 0; slot_id < AV1_MAX_FRAME_BUF_COUNT; slot_id++) {
896 u64 timestamp = slots->timestamp[slot_id];
897 bool ref_used = false;
898
899 /* ignored unused slots */
900 if (slots->frame_info[slot_id].ref_count == 0)
901 continue;
902
903 for (ref_id = 0; ref_id < V4L2_AV1_TOTAL_REFS_PER_FRAME; ref_id++) {
904 if (ctrl_fh->reference_frame_ts[ref_id] == timestamp) {
905 frame->ref_frame_map[ref_id] = slot_id;
906 ref_used = true;
907 }
908 }
909
910 if (!ref_used)
911 vdec_av1_slice_decrease_ref_count(slots, slot_id);
912 }
913 }
914
915 static void vdec_av1_slice_setup_slot(struct vdec_av1_slice_instance *instance,
916 struct vdec_av1_slice_vsi *vsi,
917 struct v4l2_ctrl_av1_frame *ctrl_fh)
918 {
919 struct vdec_av1_slice_frame_info *cur_frame_info;
920 struct vdec_av1_slice_uncompressed_header *uh = &vsi->frame.uh;
921 int ref_id;
922
923 memcpy(&vsi->slots, &instance->slots, sizeof(instance->slots));
924 vdec_av1_slice_cleanup_slots(&vsi->slots, &vsi->frame, ctrl_fh);
925 vsi->slot_id = vdec_av1_slice_get_new_slot(vsi);
926
927 if (vsi->slot_id == AV1_INVALID_IDX) {
928 mtk_v4l2_err("warning:av1 get invalid index slot\n");
929 vsi->slot_id = 0;
930 }
931 cur_frame_info = &vsi->slots.frame_info[vsi->slot_id];
932 cur_frame_info->frame_type = uh->frame_type;
933 cur_frame_info->frame_is_intra = ((uh->frame_type == AV1_INTRA_ONLY_FRAME) ||
934 (uh->frame_type == AV1_KEY_FRAME));
935 cur_frame_info->order_hint = uh->order_hint;
936 cur_frame_info->upscaled_width = uh->upscaled_width;
937 cur_frame_info->pic_pitch = 0;
938 cur_frame_info->frame_width = uh->frame_width;
939 cur_frame_info->frame_height = uh->frame_height;
940 cur_frame_info->mi_cols = ((uh->frame_width + 7) >> 3) << 1;
941 cur_frame_info->mi_rows = ((uh->frame_height + 7) >> 3) << 1;
942
943 /* ensure current frame is properly mapped if referenced */
944 for (ref_id = 0; ref_id < V4L2_AV1_TOTAL_REFS_PER_FRAME; ref_id++) {
945 u64 timestamp = vsi->slots.timestamp[vsi->slot_id];
946
947 if (ctrl_fh->reference_frame_ts[ref_id] == timestamp)
948 vsi->frame.ref_frame_map[ref_id] = vsi->slot_id;
949 }
950 }
951
952 static int vdec_av1_slice_alloc_working_buffer(struct vdec_av1_slice_instance *instance,
953 struct vdec_av1_slice_vsi *vsi)
954 {
955 struct mtk_vcodec_ctx *ctx = instance->ctx;
956 struct vdec_av1_slice_work_buffer *work_buffer = vsi->work_buffer;
957 enum vdec_av1_slice_resolution_level level;
958 u32 max_sb_w, max_sb_h, max_w, max_h, w, h;
959 size_t size;
960 int i, ret;
961
962 w = vsi->frame.uh.frame_width;
963 h = vsi->frame.uh.frame_height;
964
965 if (w > VCODEC_DEC_4K_CODED_WIDTH || h > VCODEC_DEC_4K_CODED_HEIGHT)
966 /* 8K */
967 return -EINVAL;
968
969 if (w > MTK_VDEC_MAX_W || h > MTK_VDEC_MAX_H) {
970 /* 4K */
971 level = AV1_RES_4K;
972 max_w = VCODEC_DEC_4K_CODED_WIDTH;
973 max_h = VCODEC_DEC_4K_CODED_HEIGHT;
974 } else {
975 /* FHD */
976 level = AV1_RES_FHD;
977 max_w = MTK_VDEC_MAX_W;
978 max_h = MTK_VDEC_MAX_H;
979 }
980
981 if (level == instance->level)
982 return 0;
983
984 mtk_vcodec_debug(instance, "resolution level changed from %u to %u, %ux%u",
985 instance->level, level, w, h);
986
987 max_sb_w = DIV_ROUND_UP(max_w, 128);
988 max_sb_h = DIV_ROUND_UP(max_h, 128);
989 size = max_sb_w * max_sb_h * SZ_1K;
990 for (i = 0; i < AV1_MAX_FRAME_BUF_COUNT; i++) {
991 if (instance->mv[i].va)
992 mtk_vcodec_mem_free(ctx, &instance->mv[i]);
993 instance->mv[i].size = size;
994 ret = mtk_vcodec_mem_alloc(ctx, &instance->mv[i]);
995 if (ret)
996 goto err;
997 work_buffer[i].mv_addr.buf = instance->mv[i].dma_addr;
998 work_buffer[i].mv_addr.size = size;
999 }
1000
1001 size = max_sb_w * max_sb_h * 512;
1002 for (i = 0; i < AV1_MAX_FRAME_BUF_COUNT; i++) {
1003 if (instance->seg[i].va)
1004 mtk_vcodec_mem_free(ctx, &instance->seg[i]);
1005 instance->seg[i].size = size;
1006 ret = mtk_vcodec_mem_alloc(ctx, &instance->seg[i]);
1007 if (ret)
1008 goto err;
1009 work_buffer[i].segid_addr.buf = instance->seg[i].dma_addr;
1010 work_buffer[i].segid_addr.size = size;
1011 }
1012
1013 size = 16384;
1014 for (i = 0; i < AV1_MAX_FRAME_BUF_COUNT; i++) {
1015 if (instance->cdf[i].va)
1016 mtk_vcodec_mem_free(ctx, &instance->cdf[i]);
1017 instance->cdf[i].size = size;
1018 ret = mtk_vcodec_mem_alloc(ctx, &instance->cdf[i]);
1019 if (ret)
1020 goto err;
1021 work_buffer[i].cdf_addr.buf = instance->cdf[i].dma_addr;
1022 work_buffer[i].cdf_addr.size = size;
1023 }
1024 if (!instance->cdf_temp.va) {
1025 instance->cdf_temp.size = (SZ_1K * 16 * 100);
1026 ret = mtk_vcodec_mem_alloc(ctx, &instance->cdf_temp);
1027 if (ret)
1028 goto err;
1029 vsi->cdf_tmp.buf = instance->cdf_temp.dma_addr;
1030 vsi->cdf_tmp.size = instance->cdf_temp.size;
1031 }
1032 size = AV1_TILE_BUF_SIZE * V4L2_AV1_MAX_TILE_COUNT;
1033
1034 if (instance->tile.va)
1035 mtk_vcodec_mem_free(ctx, &instance->tile);
1036 instance->tile.size = size;
1037
1038 ret = mtk_vcodec_mem_alloc(ctx, &instance->tile);
1039 if (ret)
1040 goto err;
1041
1042 vsi->tile.buf = instance->tile.dma_addr;
1043 vsi->tile.size = size;
1044
1045 instance->level = level;
1046 return 0;
1047
1048 err:
1049 instance->level = AV1_RES_NONE;
1050 return ret;
1051 }
1052
1053 static void vdec_av1_slice_free_working_buffer(struct vdec_av1_slice_instance *instance)
1054 {
1055 struct mtk_vcodec_ctx *ctx = instance->ctx;
1056 int i;
1057
1058 for (i = 0; i < ARRAY_SIZE(instance->mv); i++)
1059 if (instance->mv[i].va)
1060 mtk_vcodec_mem_free(ctx, &instance->mv[i]);
1061
1062 for (i = 0; i < ARRAY_SIZE(instance->seg); i++)
1063 if (instance->seg[i].va)
1064 mtk_vcodec_mem_free(ctx, &instance->seg[i]);
1065
> 1066 for (i = 0; i < ARRAY_SIZE(instance->cdf); i++) 1067 if (instance->cdf[i].va)
1068 mtk_vcodec_mem_free(ctx, &instance->cdf[i]);
1069
1070 if (instance->tile.va)
1071 mtk_vcodec_mem_free(ctx, &instance->tile);
1072 if (instance->cdf_temp.va)
1073 mtk_vcodec_mem_free(ctx, &instance->cdf_temp);
1074 if (instance->cdf_table.va)
1075 mtk_vcodec_mem_free(ctx, &instance->cdf_table);
1076 if (instance->iq_table.va)
1077 mtk_vcodec_mem_free(ctx, &instance->iq_table);
1078
1079 instance->level = AV1_RES_NONE;
1080 }
1081
Signature · 2 lines
0-DAY CI Kernel Test Service https://01.org/lkp
#
# Automatically generated file; DO NOT EDIT.
# Linux/sparc 6.1.0-rc4 Kernel Configuration
#CONFIG_CC_VERSION_TEXT="sparc64-linux-gcc (GCC) 12.1.0" CONFIG_CC_IS_GCC=yCONFIG_GCC_VERSION=120100 CONFIG_CLANG_VERSION=0CONFIG_AS_IS_GNU=yCONFIG_AS_VERSION=23800CONFIG_LD_IS_BFD=yCONFIG_LD_VERSION=23800CONFIG_LLD_VERSION=0 CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y CONFIG_CC_HAS_ASM_INLINE=y CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y CONFIG_PAHOLE_VERSION=123 CONFIG_CONSTRUCTORS=yCONFIG_IRQ_WORK=y
#
# General setup
#CONFIG_INIT_ENV_ARG_LIMIT=32CONFIG_COMPILE_TEST=y
# CONFIG_WERROR is not setCONFIG_LOCALVERSION=""CONFIG_BUILD_SALT=""CONFIG_DEFAULT_INIT=""CONFIG_DEFAULT_HOSTNAME="(none)"CONFIG_SYSVIPC=yCONFIG_SYSVIPC_SYSCTL=yCONFIG_SYSVIPC_COMPAT=yCONFIG_POSIX_MQUEUE=yCONFIG_POSIX_MQUEUE_SYSCTL=yCONFIG_WATCH_QUEUE=yCONFIG_CROSS_MEMORY_ATTACH=yCONFIG_USELIB=yCONFIG_AUDIT=yCONFIG_HAVE_ARCH_AUDITSYSCALL=yCONFIG_AUDITSYSCALL=y
#
# IRQ subsystem
#CONFIG_GENERIC_IRQ_SHOW=yCONFIG_GENERIC_IRQ_INJECTION=yCONFIG_GENERIC_IRQ_CHIP=yCONFIG_IRQ_DOMAIN=yCONFIG_IRQ_SIM=yCONFIG_IRQ_DOMAIN_HIERARCHY=yCONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=yCONFIG_GENERIC_MSI_IRQ=yCONFIG_GENERIC_MSI_IRQ_DOMAIN=yCONFIG_SPARSE_IRQ=yCONFIG_GENERIC_IRQ_DEBUGFS=y
# end of IRQ subsystem
CONFIG_ARCH_CLOCKSOURCE_DATA=yCONFIG_GENERIC_TIME_VSYSCALL=yCONFIG_GENERIC_CLOCKEVENTS=yCONFIG_TIME_KUNIT_TEST=yCONFIG_CONTEXT_TRACKING=yCONFIG_CONTEXT_TRACKING_IDLE=y
#
# Timers subsystem
#CONFIG_TICK_ONESHOT=yCONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not setCONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not setCONFIG_NO_HZ=yCONFIG_HIGH_RES_TIMERS=y
# end of Timers subsystem
CONFIG_BPF=yCONFIG_HAVE_EBPF_JIT=y
#
# BPF subsystem
#CONFIG_BPF_SYSCALL=yCONFIG_BPF_JIT=yCONFIG_BPF_JIT_ALWAYS_ON=yCONFIG_BPF_JIT_DEFAULT_ON=yCONFIG_BPF_UNPRIV_DEFAULT_OFF=yCONFIG_USERMODE_DRIVER=yCONFIG_BPF_LSM=y
# end of BPF subsystem
CONFIG_PREEMPT_NONE_BUILD=yCONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not setCONFIG_PREEMPT_COUNT=yCONFIG_SCHED_CORE=y
#
# CPU/Task time and stats accounting
#CONFIG_TICK_CPU_ACCOUNTING=y
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not setCONFIG_BSD_PROCESS_ACCT=yCONFIG_BSD_PROCESS_ACCT_V3=yCONFIG_TASKSTATS=yCONFIG_TASK_DELAY_ACCT=yCONFIG_TASK_XACCT=yCONFIG_TASK_IO_ACCOUNTING=yCONFIG_PSI=yCONFIG_PSI_DEFAULT_DISABLED=y
# end of CPU/Task time and stats accounting
CONFIG_CPU_ISOLATION=y
#
# RCU Subsystem
#CONFIG_TREE_RCU=yCONFIG_RCU_EXPERT=yCONFIG_SRCU=yCONFIG_TREE_SRCU=yCONFIG_TASKS_RCU_GENERIC=yCONFIG_FORCE_TASKS_RCU=yCONFIG_TASKS_RCU=yCONFIG_FORCE_TASKS_RUDE_RCU=yCONFIG_TASKS_RUDE_RCU=yCONFIG_FORCE_TASKS_TRACE_RCU=yCONFIG_TASKS_TRACE_RCU=yCONFIG_RCU_STALL_COMMON=yCONFIG_RCU_NEED_SEGCBLIST=yCONFIG_RCU_FANOUT=64CONFIG_RCU_FANOUT_LEAF=16CONFIG_RCU_NOCB_CPU=yCONFIG_RCU_NOCB_CPU_DEFAULT_ALL=yCONFIG_TASKS_TRACE_RCU_READ_MB=y
# end of RCU Subsystem
CONFIG_BUILD_BIN2C=yCONFIG_IKCONFIG=yCONFIG_IKCONFIG_PROC=yCONFIG_IKHEADERS=yCONFIG_LOG_BUF_SHIFT=17CONFIG_LOG_CPU_MAX_BUF_SHIFT=12CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13CONFIG_PRINTK_INDEX=y
#
# Scheduler features
#CONFIG_UCLAMP_TASK=yCONFIG_UCLAMP_BUCKETS_COUNT=5
# end of Scheduler features
CONFIG_CC_HAS_INT128=y CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5" CONFIG_GCC12_NO_ARRAY_BOUNDS=y CONFIG_CC_NO_ARRAY_BOUNDS=yCONFIG_CGROUPS=yCONFIG_PAGE_COUNTER=y CONFIG_CGROUP_FAVOR_DYNMODS=yCONFIG_MEMCG=yCONFIG_MEMCG_KMEM=yCONFIG_BLK_CGROUP=yCONFIG_CGROUP_WRITEBACK=yCONFIG_CGROUP_SCHED=yCONFIG_FAIR_GROUP_SCHED=yCONFIG_CFS_BANDWIDTH=yCONFIG_RT_GROUP_SCHED=y CONFIG_UCLAMP_TASK_GROUP=yCONFIG_CGROUP_PIDS=yCONFIG_CGROUP_RDMA=yCONFIG_CGROUP_FREEZER=yCONFIG_CGROUP_HUGETLB=yCONFIG_CPUSETS=yCONFIG_PROC_PID_CPUSET=yCONFIG_CGROUP_DEVICE=yCONFIG_CGROUP_CPUACCT=yCONFIG_CGROUP_PERF=yCONFIG_CGROUP_BPF=yCONFIG_CGROUP_MISC=yCONFIG_CGROUP_DEBUG=yCONFIG_SOCK_CGROUP_DATA=yCONFIG_NAMESPACES=yCONFIG_UTS_NS=yCONFIG_IPC_NS=yCONFIG_USER_NS=yCONFIG_PID_NS=yCONFIG_NET_NS=yCONFIG_CHECKPOINT_RESTORE=y CONFIG_SCHED_AUTOGROUP=y CONFIG_SYSFS_DEPRECATED=y CONFIG_SYSFS_DEPRECATED_V2=yCONFIG_RELAY=yCONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE=""CONFIG_RD_GZIP=yCONFIG_RD_BZIP2=yCONFIG_RD_LZMA=yCONFIG_RD_XZ=yCONFIG_RD_LZO=yCONFIG_RD_LZ4=yCONFIG_RD_ZSTD=yCONFIG_BOOT_CONFIG=yCONFIG_BOOT_CONFIG_EMBED=y CONFIG_BOOT_CONFIG_EMBED_FILE="" CONFIG_INITRAMFS_PRESERVE_MTIME=y CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SYSCTL=yCONFIG_HAVE_UID16=y CONFIG_SYSCTL_EXCEPTION_TRACE=yCONFIG_EXPERT=yCONFIG_UID16=yCONFIG_MULTIUSER=yCONFIG_SGETMASK_SYSCALL=yCONFIG_SYSFS_SYSCALL=yCONFIG_FHANDLE=yCONFIG_POSIX_TIMERS=yCONFIG_PRINTK=yCONFIG_BUG=yCONFIG_ELF_CORE=yCONFIG_BASE_FULL=yCONFIG_FUTEX=yCONFIG_FUTEX_PI=yCONFIG_EPOLL=yCONFIG_SIGNALFD=yCONFIG_TIMERFD=yCONFIG_EVENTFD=yCONFIG_SHMEM=yCONFIG_AIO=yCONFIG_IO_URING=yCONFIG_ADVISE_SYSCALLS=yCONFIG_MEMBARRIER=yCONFIG_KALLSYMS=yCONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_BASE_RELATIVE=yCONFIG_KCMP=yCONFIG_EMBEDDED=yCONFIG_HAVE_PERF_EVENTS=y CONFIG_PERF_USE_VMALLOC=yCONFIG_PC104=y
#
# Kernel Performance Events And Counters
#CONFIG_PERF_EVENTS=yCONFIG_DEBUG_PERF_USE_VMALLOC=y
# end of Kernel Performance Events And Counters
CONFIG_SYSTEM_DATA_VERIFICATION=yCONFIG_PROFILING=yCONFIG_TRACEPOINTS=y
# end of General setup
CONFIG_64BIT=yCONFIG_SPARC=yCONFIG_SPARC64=yCONFIG_ARCH_PROC_KCORE_TEXT=yCONFIG_CPU_BIG_ENDIAN=yCONFIG_ARCH_ATU=yCONFIG_STACKTRACE_SUPPORT=yCONFIG_LOCKDEP_SUPPORT=yCONFIG_ARCH_HIBERNATION_POSSIBLE=yCONFIG_AUDIT_ARCH=yCONFIG_MMU=yCONFIG_PGTABLE_LEVELS=4CONFIG_ARCH_SUPPORTS_UPROBES=y
#
# Processor type and features
#CONFIG_SMP=yCONFIG_NR_CPUS=4096
# CONFIG_HZ_100 is not setCONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not setCONFIG_HZ=250CONFIG_SCHED_HRTICK=yCONFIG_GENERIC_HWEIGHT=yCONFIG_GENERIC_CALIBRATE_DELAY=yCONFIG_ARCH_MAY_HAVE_PC_FDC=yCONFIG_SPARC64_SMP=yCONFIG_EARLYFB=yCONFIG_HOTPLUG_CPU=y
#
# CPU Frequency scaling
#CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_GOV_ATTR_SET=y CONFIG_CPU_FREQ_GOV_COMMON=y CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
#
# CPU frequency scaling drivers
#CONFIG_CPUFREQ_DT=yCONFIG_CPUFREQ_DT_PLATDEV=yCONFIG_SPARC_US3_CPUFREQ=yCONFIG_SPARC_US2E_CPUFREQ=yCONFIG_QORIQ_CPUFREQ=y
# end of CPU Frequency scaling
CONFIG_US3_MC=yCONFIG_NUMA=yCONFIG_NODES_SHIFT=5 CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_DEFAULT=y CONFIG_ARCH_FORCE_MAX_ORDER=13 CONFIG_HIBERNATE_CALLBACKS=y CONFIG_HIBERNATION=y CONFIG_HIBERNATION_SNAPSHOT_DEV=y CONFIG_PM_STD_PARTITION="" CONFIG_PM_SLEEP=yCONFIG_PM_SLEEP_SMP=y CONFIG_PM_AUTOSLEEP=y CONFIG_PM_USERSPACE_AUTOSLEEP=y CONFIG_PM_WAKELOCKS=y CONFIG_PM_WAKELOCKS_LIMIT=100 CONFIG_PM_WAKELOCKS_GC=yCONFIG_PM=yCONFIG_PM_DEBUG=y CONFIG_PM_ADVANCED_DEBUG=y CONFIG_PM_SLEEP_DEBUG=y CONFIG_DPM_WATCHDOG=y CONFIG_DPM_WATCHDOG_TIMEOUT=120 CONFIG_PM_CLK=y CONFIG_PM_GENERIC_DOMAINS=y CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y CONFIG_PM_GENERIC_DOMAINS_SLEEP=y CONFIG_PM_GENERIC_DOMAINS_OF=y CONFIG_ENERGY_MODEL=yCONFIG_SCHED_SMT=yCONFIG_SCHED_MC=yCONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE="console=ttyS0,9600 root=/dev/sda1"
# end of Processor type and features
#
# Bus options (PCI etc.)
#CONFIG_SBUS=yCONFIG_SBUSCHAR=yCONFIG_SUN_LDOMS=yCONFIG_SUN_OPENPROMFS=yCONFIG_SPARC64_PCI=yCONFIG_SPARC64_PCI_MSI=y
# end of Bus options (PCI etc.)
CONFIG_COMPAT=y
#
# Misc Linux/SPARC drivers
#CONFIG_SUN_OPENPROMIO=yCONFIG_OBP_FLASH=yCONFIG_TADPOLE_TS102_UCTRL=yCONFIG_BBC_I2C=yCONFIG_ENVCTRL=yCONFIG_DISPLAY7SEG=yCONFIG_ORACLE_DAX=y
# end of Misc Linux/SPARC drivers
#
# General architecture-dependent options
#CONFIG_CRASH_CORE=yCONFIG_KPROBES=yCONFIG_JUMP_LABEL=yCONFIG_STATIC_KEYS_SELFTEST=yCONFIG_UPROBES=yCONFIG_HAVE_64BIT_ALIGNED_ACCESS=yCONFIG_KRETPROBES=yCONFIG_HAVE_KPROBES=yCONFIG_HAVE_KRETPROBES=yCONFIG_HAVE_NMI=yCONFIG_TRACE_IRQFLAGS_SUPPORT=yCONFIG_HAVE_ARCH_TRACEHOOK=yCONFIG_GENERIC_SMP_IDLE_THREAD=yCONFIG_HAVE_ASM_MODVERSIONS=yCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=yCONFIG_HAVE_NMI_WATCHDOG=yCONFIG_HAVE_ARCH_JUMP_LABEL=yCONFIG_MMU_GATHER_TABLE_FREE=yCONFIG_MMU_GATHER_RCU_TABLE_FREE=yCONFIG_MMU_GATHER_NO_FLUSH_CACHE=yCONFIG_MMU_GATHER_MERGE_VMAS=yCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=yCONFIG_ARCH_WANT_IPC_PARSE_VERSION=yCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=yCONFIG_ARCH_WANT_OLD_COMPAT_IPC=yCONFIG_HAVE_ARCH_SECCOMP=yCONFIG_SECCOMP=yCONFIG_LTO_NONE=yCONFIG_HAVE_CONTEXT_TRACKING_USER=yCONFIG_HAVE_TIF_NOHZ=yCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=yCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=yCONFIG_MODULES_USE_ELF_RELA=yCONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=yCONFIG_SOFTIRQ_ON_OWN_STACK=yCONFIG_ALTERNATE_USER_ADDRESS_SPACE=yCONFIG_HAVE_EXIT_THREAD=yCONFIG_PAGE_SIZE_LESS_THAN_64KB=yCONFIG_PAGE_SIZE_LESS_THAN_256KB=yCONFIG_ISA_BUS_API=yCONFIG_ODD_RT_SIGACTION=yCONFIG_OLD_SIGSUSPEND=yCONFIG_COMPAT_OLD_SIGACTION=yCONFIG_COMPAT_32BIT_TIME=yCONFIG_CPU_NO_EFFICIENT_FFS=yCONFIG_LOCK_EVENT_COUNTS=yCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
#
# GCOV-based kernel profiling
#CONFIG_GCOV_KERNEL=y
# end of GCOV-based kernel profiling # end of General architecture-dependent options
CONFIG_RT_MUTEXES=yCONFIG_BASE_SMALL=0CONFIG_MODULE_SIG_FORMAT=yCONFIG_MODULES=yCONFIG_MODULE_FORCE_LOAD=yCONFIG_MODULE_UNLOAD=yCONFIG_MODULE_FORCE_UNLOAD=yCONFIG_MODULE_UNLOAD_TAINT_TRACKING=yCONFIG_MODVERSIONS=yCONFIG_ASM_MODVERSIONS=yCONFIG_MODULE_SRCVERSION_ALL=yCONFIG_MODULE_SIG=yCONFIG_MODULE_SIG_FORCE=yCONFIG_MODULE_SIG_ALL=yCONFIG_MODULE_SIG_SHA1=y
# CONFIG_MODULE_SIG_SHA224 is not set
# CONFIG_MODULE_SIG_SHA256 is not set
# CONFIG_MODULE_SIG_SHA384 is not set
# CONFIG_MODULE_SIG_SHA512 is not setCONFIG_MODULE_SIG_HASH="sha1"CONFIG_MODULE_COMPRESS_NONE=y
# CONFIG_MODULE_COMPRESS_GZIP is not set
# CONFIG_MODULE_COMPRESS_XZ is not set
# CONFIG_MODULE_COMPRESS_ZSTD is not setCONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=yCONFIG_MODPROBE_PATH="/sbin/modprobe"CONFIG_MODULES_TREE_LOOKUP=yCONFIG_BLOCK=yCONFIG_BLOCK_LEGACY_AUTOLOAD=yCONFIG_BLK_RQ_ALLOC_TIME=yCONFIG_BLK_CGROUP_RWSTAT=yCONFIG_BLK_DEV_BSG_COMMON=yCONFIG_BLK_ICQ=yCONFIG_BLK_DEV_BSGLIB=yCONFIG_BLK_DEV_INTEGRITY=yCONFIG_BLK_DEV_INTEGRITY_T10=yCONFIG_BLK_DEV_ZONED=yCONFIG_BLK_DEV_THROTTLING=yCONFIG_BLK_DEV_THROTTLING_LOW=yCONFIG_BLK_WBT=yCONFIG_BLK_WBT_MQ=yCONFIG_BLK_CGROUP_IOLATENCY=yCONFIG_BLK_CGROUP_FC_APPID=yCONFIG_BLK_CGROUP_IOCOST=yCONFIG_BLK_CGROUP_IOPRIO=yCONFIG_BLK_DEBUG_FS=yCONFIG_BLK_DEBUG_FS_ZONED=yCONFIG_BLK_SED_OPAL=yCONFIG_BLK_INLINE_ENCRYPTION=yCONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
#
# Partition Types
#CONFIG_PARTITION_ADVANCED=yCONFIG_ACORN_PARTITION=yCONFIG_ACORN_PARTITION_CUMANA=yCONFIG_ACORN_PARTITION_EESOX=yCONFIG_ACORN_PARTITION_ICS=yCONFIG_ACORN_PARTITION_ADFS=yCONFIG_ACORN_PARTITION_POWERTEC=yCONFIG_ACORN_PARTITION_RISCIX=yCONFIG_AIX_PARTITION=yCONFIG_OSF_PARTITION=yCONFIG_AMIGA_PARTITION=yCONFIG_ATARI_PARTITION=yCONFIG_MAC_PARTITION=yCONFIG_MSDOS_PARTITION=yCONFIG_BSD_DISKLABEL=yCONFIG_MINIX_SUBPARTITION=yCONFIG_SOLARIS_X86_PARTITION=yCONFIG_UNIXWARE_DISKLABEL=yCONFIG_LDM_PARTITION=yCONFIG_LDM_DEBUG=yCONFIG_SGI_PARTITION=yCONFIG_ULTRIX_PARTITION=yCONFIG_SUN_PARTITION=yCONFIG_KARMA_PARTITION=yCONFIG_EFI_PARTITION=yCONFIG_SYSV68_PARTITION=yCONFIG_CMDLINE_PARTITION=y
# end of Partition Types
CONFIG_BLOCK_COMPAT=yCONFIG_BLK_MQ_PCI=yCONFIG_BLK_MQ_VIRTIO=yCONFIG_BLK_MQ_RDMA=yCONFIG_BLK_PM=yCONFIG_BLOCK_HOLDER_DEPRECATED=yCONFIG_BLK_MQ_STACKING=y
#
# IO Schedulers
#CONFIG_MQ_IOSCHED_DEADLINE=yCONFIG_MQ_IOSCHED_KYBER=yCONFIG_IOSCHED_BFQ=yCONFIG_BFQ_GROUP_IOSCHED=yCONFIG_BFQ_CGROUP_DEBUG=y
# end of IO Schedulers
CONFIG_PADATA=yCONFIG_ASN1=yCONFIG_UNINLINE_SPIN_UNLOCK=yCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=yCONFIG_MUTEX_SPIN_ON_OWNER=yCONFIG_RWSEM_SPIN_ON_OWNER=yCONFIG_LOCK_SPIN_ON_OWNER=yCONFIG_ARCH_USE_QUEUED_SPINLOCKS=yCONFIG_QUEUED_SPINLOCKS=yCONFIG_ARCH_USE_QUEUED_RWLOCKS=yCONFIG_QUEUED_RWLOCKS=yCONFIG_FREEZER=y
#
# Executable file formats
#CONFIG_BINFMT_ELF=yCONFIG_BINFMT_ELF_KUNIT_TEST=yCONFIG_COMPAT_BINFMT_ELF=yCONFIG_ELFCORE=yCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=yCONFIG_BINFMT_SCRIPT=yCONFIG_BINFMT_MISC=yCONFIG_COREDUMP=y
# end of Executable file formats
#
# Memory Management options
#CONFIG_ZPOOL=yCONFIG_SWAP=yCONFIG_ZSWAP=yCONFIG_ZSWAP_DEFAULT_ON=y
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_DEFLATE is not set CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZO=y
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_842 is not set # CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZ4 is not set # CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZ4HC is not set # CONFIG_ZSWAP_COMPRESSOR_DEFAULT_ZSTD is not set CONFIG_ZSWAP_COMPRESSOR_DEFAULT="lzo" CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD=y
# CONFIG_ZSWAP_ZPOOL_DEFAULT_Z3FOLD is not set # CONFIG_ZSWAP_ZPOOL_DEFAULT_ZSMALLOC is not set CONFIG_ZSWAP_ZPOOL_DEFAULT="zbud" CONFIG_ZBUD=yCONFIG_Z3FOLD=yCONFIG_ZSMALLOC=yCONFIG_ZSMALLOC_STAT=y
#
# SLAB allocator options
#
# CONFIG_SLAB is not setCONFIG_SLUB=y
# CONFIG_SLOB is not setCONFIG_SLAB_MERGE_DEFAULT=yCONFIG_SLAB_FREELIST_RANDOM=yCONFIG_SLAB_FREELIST_HARDENED=yCONFIG_SLUB_STATS=yCONFIG_SLUB_CPU_PARTIAL=y
# end of SLAB allocator options
CONFIG_SHUFFLE_PAGE_ALLOCATOR=yCONFIG_COMPAT_BRK=yCONFIG_SPARSEMEM=yCONFIG_SPARSEMEM_EXTREME=yCONFIG_SPARSEMEM_VMEMMAP_ENABLE=yCONFIG_SPARSEMEM_VMEMMAP=yCONFIG_MEMORY_ISOLATION=yCONFIG_SPLIT_PTLOCK_CPUS=4CONFIG_MEMORY_BALLOON=yCONFIG_BALLOON_COMPACTION=yCONFIG_COMPACTION=yCONFIG_COMPACT_UNEVICTABLE_DEFAULT=1CONFIG_PAGE_REPORTING=yCONFIG_MIGRATION=yCONFIG_CONTIG_ALLOC=yCONFIG_PHYS_ADDR_T_64BIT=yCONFIG_MMU_NOTIFIER=yCONFIG_KSM=yCONFIG_DEFAULT_MMAP_MIN_ADDR=4096CONFIG_TRANSPARENT_HUGEPAGE=yCONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not setCONFIG_READ_ONLY_THP_FOR_FS=yCONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=yCONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=yCONFIG_HAVE_SETUP_PER_CPU_AREA=yCONFIG_FRONTSWAP=yCONFIG_CMA=yCONFIG_CMA_DEBUG=yCONFIG_CMA_DEBUGFS=yCONFIG_CMA_SYSFS=yCONFIG_CMA_AREAS=19CONFIG_DEFERRED_STRUCT_PAGE_INIT=yCONFIG_PAGE_IDLE_FLAG=yCONFIG_IDLE_PAGE_TRACKING=yCONFIG_HMM_MIRROR=yCONFIG_GET_FREE_REGION=yCONFIG_VM_EVENT_COUNTERS=yCONFIG_PERCPU_STATS=yCONFIG_GUP_TEST=yCONFIG_ARCH_HAS_PTE_SPECIAL=yCONFIG_ANON_VMA_NAME=yCONFIG_USERFAULTFD=yCONFIG_LRU_GEN=yCONFIG_LRU_GEN_ENABLED=yCONFIG_LRU_GEN_STATS=y
#
# Data Access Monitoring
#CONFIG_DAMON=yCONFIG_DAMON_KUNIT_TEST=yCONFIG_DAMON_VADDR=yCONFIG_DAMON_PADDR=yCONFIG_DAMON_VADDR_KUNIT_TEST=yCONFIG_DAMON_SYSFS=yCONFIG_DAMON_DBGFS=yCONFIG_DAMON_DBGFS_KUNIT_TEST=yCONFIG_DAMON_RECLAIM=yCONFIG_DAMON_LRU_SORT=y
# end of Data Access Monitoring # end of Memory Management options
CONFIG_NET=yCONFIG_COMPAT_NETLINK_MESSAGES=yCONFIG_NET_INGRESS=yCONFIG_NET_EGRESS=yCONFIG_NET_REDIRECT=yCONFIG_SKB_EXTENSIONS=y
#
# Networking options
#CONFIG_PACKET=yCONFIG_PACKET_DIAG=yCONFIG_UNIX=yCONFIG_UNIX_SCM=yCONFIG_AF_UNIX_OOB=yCONFIG_UNIX_DIAG=yCONFIG_TLS=yCONFIG_TLS_DEVICE=yCONFIG_TLS_TOE=yCONFIG_XFRM=yCONFIG_XFRM_OFFLOAD=yCONFIG_XFRM_ALGO=yCONFIG_XFRM_USER=yCONFIG_XFRM_INTERFACE=yCONFIG_XFRM_SUB_POLICY=yCONFIG_XFRM_MIGRATE=yCONFIG_XFRM_STATISTICS=yCONFIG_XFRM_AH=yCONFIG_XFRM_ESP=yCONFIG_XFRM_IPCOMP=yCONFIG_NET_KEY=yCONFIG_NET_KEY_MIGRATE=yCONFIG_XFRM_ESPINTCP=yCONFIG_SMC=yCONFIG_SMC_DIAG=yCONFIG_XDP_SOCKETS=yCONFIG_XDP_SOCKETS_DIAG=yCONFIG_INET=yCONFIG_IP_MULTICAST=yCONFIG_IP_ADVANCED_ROUTER=yCONFIG_IP_FIB_TRIE_STATS=yCONFIG_IP_MULTIPLE_TABLES=yCONFIG_IP_ROUTE_MULTIPATH=yCONFIG_IP_ROUTE_VERBOSE=yCONFIG_IP_ROUTE_CLASSID=yCONFIG_IP_PNP=yCONFIG_IP_PNP_DHCP=yCONFIG_IP_PNP_BOOTP=yCONFIG_IP_PNP_RARP=yCONFIG_NET_IPIP=yCONFIG_NET_IPGRE_DEMUX=yCONFIG_NET_IP_TUNNEL=yCONFIG_NET_IPGRE=yCONFIG_NET_IPGRE_BROADCAST=yCONFIG_IP_MROUTE_COMMON=yCONFIG_IP_MROUTE=yCONFIG_IP_MROUTE_MULTIPLE_TABLES=yCONFIG_IP_PIMSM_V1=yCONFIG_IP_PIMSM_V2=yCONFIG_SYN_COOKIES=yCONFIG_NET_IPVTI=yCONFIG_NET_UDP_TUNNEL=yCONFIG_NET_FOU=yCONFIG_NET_FOU_IP_TUNNELS=yCONFIG_INET_AH=yCONFIG_INET_ESP=yCONFIG_INET_ESP_OFFLOAD=yCONFIG_INET_ESPINTCP=yCONFIG_INET_IPCOMP=yCONFIG_INET_XFRM_TUNNEL=yCONFIG_INET_TUNNEL=yCONFIG_INET_DIAG=yCONFIG_INET_TCP_DIAG=yCONFIG_INET_UDP_DIAG=yCONFIG_INET_RAW_DIAG=yCONFIG_INET_DIAG_DESTROY=yCONFIG_TCP_CONG_ADVANCED=yCONFIG_TCP_CONG_BIC=yCONFIG_TCP_CONG_CUBIC=yCONFIG_TCP_CONG_WESTWOOD=yCONFIG_TCP_CONG_HTCP=yCONFIG_TCP_CONG_HSTCP=yCONFIG_TCP_CONG_HYBLA=yCONFIG_TCP_CONG_VEGAS=yCONFIG_TCP_CONG_NV=yCONFIG_TCP_CONG_SCALABLE=yCONFIG_TCP_CONG_LP=yCONFIG_TCP_CONG_VENO=yCONFIG_TCP_CONG_YEAH=yCONFIG_TCP_CONG_ILLINOIS=yCONFIG_TCP_CONG_DCTCP=yCONFIG_TCP_CONG_CDG=yCONFIG_TCP_CONG_BBR=y
# CONFIG_DEFAULT_BIC is not setCONFIG_DEFAULT_CUBIC=y
# CONFIG_DEFAULT_HTCP is not set
# CONFIG_DEFAULT_HYBLA is not set
# CONFIG_DEFAULT_VEGAS is not set
# CONFIG_DEFAULT_VENO is not set
# CONFIG_DEFAULT_WESTWOOD is not set
# CONFIG_DEFAULT_DCTCP is not set
# CONFIG_DEFAULT_CDG is not set
# CONFIG_DEFAULT_BBR is not set
# CONFIG_DEFAULT_RENO is not setCONFIG_DEFAULT_TCP_CONG="cubic"CONFIG_TCP_MD5SIG=yCONFIG_IPV6=yCONFIG_IPV6_ROUTER_PREF=yCONFIG_IPV6_ROUTE_INFO=yCONFIG_IPV6_OPTIMISTIC_DAD=yCONFIG_INET6_AH=yCONFIG_INET6_ESP=yCONFIG_INET6_ESP_OFFLOAD=yCONFIG_INET6_ESPINTCP=yCONFIG_INET6_IPCOMP=yCONFIG_IPV6_MIP6=yCONFIG_IPV6_ILA=yCONFIG_INET6_XFRM_TUNNEL=yCONFIG_INET6_TUNNEL=yCONFIG_IPV6_VTI=yCONFIG_IPV6_SIT=yCONFIG_IPV6_SIT_6RD=yCONFIG_IPV6_NDISC_NODETYPE=yCONFIG_IPV6_TUNNEL=yCONFIG_IPV6_GRE=yCONFIG_IPV6_FOU=yCONFIG_IPV6_FOU_TUNNEL=yCONFIG_IPV6_MULTIPLE_TABLES=yCONFIG_IPV6_SUBTREES=yCONFIG_IPV6_MROUTE=yCONFIG_IPV6_MROUTE_MULTIPLE_TABLES=yCONFIG_IPV6_PIMSM_V2=yCONFIG_IPV6_SEG6_LWTUNNEL=yCONFIG_IPV6_SEG6_HMAC=yCONFIG_IPV6_SEG6_BPF=yCONFIG_IPV6_RPL_LWTUNNEL=yCONFIG_IPV6_IOAM6_LWTUNNEL=yCONFIG_NETLABEL=yCONFIG_MPTCP=yCONFIG_INET_MPTCP_DIAG=yCONFIG_MPTCP_IPV6=yCONFIG_MPTCP_KUNIT_TEST=yCONFIG_NETWORK_SECMARK=yCONFIG_NET_PTP_CLASSIFY=yCONFIG_NETWORK_PHY_TIMESTAMPING=yCONFIG_NETFILTER=yCONFIG_NETFILTER_ADVANCED=yCONFIG_BRIDGE_NETFILTER=y
#
# Core Netfilter Configuration
#CONFIG_NETFILTER_INGRESS=yCONFIG_NETFILTER_EGRESS=yCONFIG_NETFILTER_SKIP_EGRESS=yCONFIG_NETFILTER_NETLINK=yCONFIG_NETFILTER_FAMILY_BRIDGE=yCONFIG_NETFILTER_FAMILY_ARP=yCONFIG_NETFILTER_NETLINK_HOOK=yCONFIG_NETFILTER_NETLINK_ACCT=yCONFIG_NETFILTER_NETLINK_QUEUE=yCONFIG_NETFILTER_NETLINK_LOG=yCONFIG_NETFILTER_NETLINK_OSF=yCONFIG_NF_CONNTRACK=yCONFIG_NF_LOG_SYSLOG=yCONFIG_NETFILTER_CONNCOUNT=yCONFIG_NF_CONNTRACK_MARK=yCONFIG_NF_CONNTRACK_SECMARK=yCONFIG_NF_CONNTRACK_ZONES=yCONFIG_NF_CONNTRACK_PROCFS=yCONFIG_NF_CONNTRACK_EVENTS=yCONFIG_NF_CONNTRACK_TIMEOUT=yCONFIG_NF_CONNTRACK_TIMESTAMP=yCONFIG_NF_CONNTRACK_LABELS=yCONFIG_NF_CT_PROTO_DCCP=yCONFIG_NF_CT_PROTO_GRE=yCONFIG_NF_CT_PROTO_SCTP=yCONFIG_NF_CT_PROTO_UDPLITE=yCONFIG_NF_CONNTRACK_AMANDA=yCONFIG_NF_CONNTRACK_FTP=yCONFIG_NF_CONNTRACK_H323=yCONFIG_NF_CONNTRACK_IRC=yCONFIG_NF_CONNTRACK_BROADCAST=yCONFIG_NF_CONNTRACK_NETBIOS_NS=yCONFIG_NF_CONNTRACK_SNMP=yCONFIG_NF_CONNTRACK_PPTP=yCONFIG_NF_CONNTRACK_SANE=yCONFIG_NF_CONNTRACK_SIP=yCONFIG_NF_CONNTRACK_TFTP=yCONFIG_NF_CT_NETLINK=yCONFIG_NF_CT_NETLINK_TIMEOUT=yCONFIG_NF_CT_NETLINK_HELPER=yCONFIG_NETFILTER_NETLINK_GLUE_CT=yCONFIG_NF_NAT=yCONFIG_NF_NAT_AMANDA=yCONFIG_NF_NAT_FTP=yCONFIG_NF_NAT_IRC=yCONFIG_NF_NAT_SIP=yCONFIG_NF_NAT_TFTP=yCONFIG_NF_NAT_REDIRECT=yCONFIG_NF_NAT_MASQUERADE=yCONFIG_NETFILTER_SYNPROXY=yCONFIG_NF_TABLES=yCONFIG_NF_TABLES_INET=yCONFIG_NF_TABLES_NETDEV=yCONFIG_NFT_NUMGEN=yCONFIG_NFT_CT=yCONFIG_NFT_FLOW_OFFLOAD=yCONFIG_NFT_CONNLIMIT=yCONFIG_NFT_LOG=yCONFIG_NFT_LIMIT=yCONFIG_NFT_MASQ=yCONFIG_NFT_REDIR=yCONFIG_NFT_NAT=yCONFIG_NFT_TUNNEL=yCONFIG_NFT_OBJREF=yCONFIG_NFT_QUEUE=yCONFIG_NFT_QUOTA=yCONFIG_NFT_REJECT=yCONFIG_NFT_REJECT_INET=yCONFIG_NFT_COMPAT=yCONFIG_NFT_HASH=yCONFIG_NFT_FIB=yCONFIG_NFT_FIB_INET=yCONFIG_NFT_XFRM=yCONFIG_NFT_SOCKET=yCONFIG_NFT_OSF=yCONFIG_NFT_TPROXY=yCONFIG_NFT_SYNPROXY=yCONFIG_NF_DUP_NETDEV=yCONFIG_NFT_DUP_NETDEV=yCONFIG_NFT_FWD_NETDEV=yCONFIG_NFT_FIB_NETDEV=yCONFIG_NFT_REJECT_NETDEV=yCONFIG_NF_FLOW_TABLE_INET=yCONFIG_NF_FLOW_TABLE=yCONFIG_NF_FLOW_TABLE_PROCFS=yCONFIG_NETFILTER_XTABLES=yCONFIG_NETFILTER_XTABLES_COMPAT=y
#
# Xtables combined modules
#CONFIG_NETFILTER_XT_MARK=yCONFIG_NETFILTER_XT_CONNMARK=yCONFIG_NETFILTER_XT_SET=y
#
# Xtables targets
#CONFIG_NETFILTER_XT_TARGET_AUDIT=yCONFIG_NETFILTER_XT_TARGET_CHECKSUM=yCONFIG_NETFILTER_XT_TARGET_CLASSIFY=yCONFIG_NETFILTER_XT_TARGET_CONNMARK=yCONFIG_NETFILTER_XT_TARGET_CONNSECMARK=yCONFIG_NETFILTER_XT_TARGET_CT=yCONFIG_NETFILTER_XT_TARGET_DSCP=yCONFIG_NETFILTER_XT_TARGET_HL=yCONFIG_NETFILTER_XT_TARGET_HMARK=yCONFIG_NETFILTER_XT_TARGET_IDLETIMER=yCONFIG_NETFILTER_XT_TARGET_LED=yCONFIG_NETFILTER_XT_TARGET_LOG=yCONFIG_NETFILTER_XT_TARGET_MARK=yCONFIG_NETFILTER_XT_NAT=yCONFIG_NETFILTER_XT_TARGET_NETMAP=yCONFIG_NETFILTER_XT_TARGET_NFLOG=yCONFIG_NETFILTER_XT_TARGET_NFQUEUE=yCONFIG_NETFILTER_XT_TARGET_NOTRACK=yCONFIG_NETFILTER_XT_TARGET_RATEEST=yCONFIG_NETFILTER_XT_TARGET_REDIRECT=yCONFIG_NETFILTER_XT_TARGET_MASQUERADE=yCONFIG_NETFILTER_XT_TARGET_TEE=yCONFIG_NETFILTER_XT_TARGET_TPROXY=yCONFIG_NETFILTER_XT_TARGET_TRACE=yCONFIG_NETFILTER_XT_TARGET_SECMARK=yCONFIG_NETFILTER_XT_TARGET_TCPMSS=yCONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=y
#
# Xtables matches
#CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=yCONFIG_NETFILTER_XT_MATCH_BPF=yCONFIG_NETFILTER_XT_MATCH_CGROUP=yCONFIG_NETFILTER_XT_MATCH_CLUSTER=yCONFIG_NETFILTER_XT_MATCH_COMMENT=yCONFIG_NETFILTER_XT_MATCH_CONNBYTES=yCONFIG_NETFILTER_XT_MATCH_CONNLABEL=yCONFIG_NETFILTER_XT_MATCH_CONNLIMIT=yCONFIG_NETFILTER_XT_MATCH_CONNMARK=yCONFIG_NETFILTER_XT_MATCH_CONNTRACK=yCONFIG_NETFILTER_XT_MATCH_CPU=yCONFIG_NETFILTER_XT_MATCH_DCCP=yCONFIG_NETFILTER_XT_MATCH_DEVGROUP=yCONFIG_NETFILTER_XT_MATCH_DSCP=yCONFIG_NETFILTER_XT_MATCH_ECN=yCONFIG_NETFILTER_XT_MATCH_ESP=yCONFIG_NETFILTER_XT_MATCH_HASHLIMIT=yCONFIG_NETFILTER_XT_MATCH_HELPER=yCONFIG_NETFILTER_XT_MATCH_HL=yCONFIG_NETFILTER_XT_MATCH_IPCOMP=yCONFIG_NETFILTER_XT_MATCH_IPRANGE=yCONFIG_NETFILTER_XT_MATCH_IPVS=yCONFIG_NETFILTER_XT_MATCH_L2TP=yCONFIG_NETFILTER_XT_MATCH_LENGTH=yCONFIG_NETFILTER_XT_MATCH_LIMIT=yCONFIG_NETFILTER_XT_MATCH_MAC=yCONFIG_NETFILTER_XT_MATCH_MARK=yCONFIG_NETFILTER_XT_MATCH_MULTIPORT=yCONFIG_NETFILTER_XT_MATCH_NFACCT=yCONFIG_NETFILTER_XT_MATCH_OSF=yCONFIG_NETFILTER_XT_MATCH_OWNER=yCONFIG_NETFILTER_XT_MATCH_POLICY=yCONFIG_NETFILTER_XT_MATCH_PHYSDEV=yCONFIG_NETFILTER_XT_MATCH_PKTTYPE=yCONFIG_NETFILTER_XT_MATCH_QUOTA=yCONFIG_NETFILTER_XT_MATCH_RATEEST=yCONFIG_NETFILTER_XT_MATCH_REALM=yCONFIG_NETFILTER_XT_MATCH_RECENT=yCONFIG_NETFILTER_XT_MATCH_SCTP=yCONFIG_NETFILTER_XT_MATCH_SOCKET=yCONFIG_NETFILTER_XT_MATCH_STATE=yCONFIG_NETFILTER_XT_MATCH_STATISTIC=yCONFIG_NETFILTER_XT_MATCH_STRING=yCONFIG_NETFILTER_XT_MATCH_TCPMSS=yCONFIG_NETFILTER_XT_MATCH_TIME=yCONFIG_NETFILTER_XT_MATCH_U32=y
# end of Core Netfilter Configuration
CONFIG_IP_SET=yCONFIG_IP_SET_MAX=256CONFIG_IP_SET_BITMAP_IP=yCONFIG_IP_SET_BITMAP_IPMAC=yCONFIG_IP_SET_BITMAP_PORT=yCONFIG_IP_SET_HASH_IP=yCONFIG_IP_SET_HASH_IPMARK=yCONFIG_IP_SET_HASH_IPPORT=yCONFIG_IP_SET_HASH_IPPORTIP=yCONFIG_IP_SET_HASH_IPPORTNET=yCONFIG_IP_SET_HASH_IPMAC=yCONFIG_IP_SET_HASH_MAC=yCONFIG_IP_SET_HASH_NETPORTNET=yCONFIG_IP_SET_HASH_NET=yCONFIG_IP_SET_HASH_NETNET=yCONFIG_IP_SET_HASH_NETPORT=yCONFIG_IP_SET_HASH_NETIFACE=yCONFIG_IP_SET_LIST_SET=yCONFIG_IP_VS=yCONFIG_IP_VS_IPV6=yCONFIG_IP_VS_DEBUG=yCONFIG_IP_VS_TAB_BITS=12
#
# IPVS transport protocol load balancing support
#CONFIG_IP_VS_PROTO_TCP=yCONFIG_IP_VS_PROTO_UDP=yCONFIG_IP_VS_PROTO_AH_ESP=yCONFIG_IP_VS_PROTO_ESP=yCONFIG_IP_VS_PROTO_AH=yCONFIG_IP_VS_PROTO_SCTP=y
#
# IPVS scheduler
#CONFIG_IP_VS_RR=yCONFIG_IP_VS_WRR=yCONFIG_IP_VS_LC=yCONFIG_IP_VS_WLC=yCONFIG_IP_VS_FO=yCONFIG_IP_VS_OVF=yCONFIG_IP_VS_LBLC=yCONFIG_IP_VS_LBLCR=yCONFIG_IP_VS_DH=yCONFIG_IP_VS_SH=yCONFIG_IP_VS_MH=yCONFIG_IP_VS_SED=yCONFIG_IP_VS_NQ=yCONFIG_IP_VS_TWOS=y
#
# IPVS SH scheduler
#CONFIG_IP_VS_SH_TAB_BITS=8
#
# IPVS MH scheduler
#CONFIG_IP_VS_MH_TAB_INDEX=12
#
# IPVS application helper
#CONFIG_IP_VS_FTP=yCONFIG_IP_VS_NFCT=yCONFIG_IP_VS_PE_SIP=y
#
# IP: Netfilter Configuration
#CONFIG_NF_DEFRAG_IPV4=yCONFIG_NF_SOCKET_IPV4=yCONFIG_NF_TPROXY_IPV4=yCONFIG_NF_TABLES_IPV4=yCONFIG_NFT_REJECT_IPV4=yCONFIG_NFT_DUP_IPV4=yCONFIG_NFT_FIB_IPV4=yCONFIG_NF_TABLES_ARP=yCONFIG_NF_DUP_IPV4=yCONFIG_NF_LOG_ARP=yCONFIG_NF_LOG_IPV4=yCONFIG_NF_REJECT_IPV4=yCONFIG_NF_NAT_SNMP_BASIC=yCONFIG_NF_NAT_PPTP=yCONFIG_NF_NAT_H323=yCONFIG_IP_NF_IPTABLES=yCONFIG_IP_NF_MATCH_AH=yCONFIG_IP_NF_MATCH_ECN=yCONFIG_IP_NF_MATCH_RPFILTER=yCONFIG_IP_NF_MATCH_TTL=yCONFIG_IP_NF_FILTER=yCONFIG_IP_NF_TARGET_REJECT=yCONFIG_IP_NF_TARGET_SYNPROXY=yCONFIG_IP_NF_NAT=yCONFIG_IP_NF_TARGET_MASQUERADE=yCONFIG_IP_NF_TARGET_NETMAP=yCONFIG_IP_NF_TARGET_REDIRECT=yCONFIG_IP_NF_MANGLE=yCONFIG_IP_NF_TARGET_CLUSTERIP=yCONFIG_IP_NF_TARGET_ECN=yCONFIG_IP_NF_TARGET_TTL=yCONFIG_IP_NF_RAW=yCONFIG_IP_NF_SECURITY=yCONFIG_IP_NF_ARPTABLES=yCONFIG_IP_NF_ARPFILTER=yCONFIG_IP_NF_ARP_MANGLE=y
# end of IP: Netfilter Configuration
#
# IPv6: Netfilter Configuration
#CONFIG_NF_SOCKET_IPV6=yCONFIG_NF_TPROXY_IPV6=yCONFIG_NF_TABLES_IPV6=yCONFIG_NFT_REJECT_IPV6=yCONFIG_NFT_DUP_IPV6=yCONFIG_NFT_FIB_IPV6=yCONFIG_NF_DUP_IPV6=yCONFIG_NF_REJECT_IPV6=yCONFIG_NF_LOG_IPV6=yCONFIG_IP6_NF_IPTABLES=yCONFIG_IP6_NF_MATCH_AH=yCONFIG_IP6_NF_MATCH_EUI64=yCONFIG_IP6_NF_MATCH_FRAG=yCONFIG_IP6_NF_MATCH_OPTS=yCONFIG_IP6_NF_MATCH_HL=yCONFIG_IP6_NF_MATCH_IPV6HEADER=yCONFIG_IP6_NF_MATCH_MH=yCONFIG_IP6_NF_MATCH_RPFILTER=yCONFIG_IP6_NF_MATCH_RT=yCONFIG_IP6_NF_MATCH_SRH=yCONFIG_IP6_NF_TARGET_HL=yCONFIG_IP6_NF_FILTER=yCONFIG_IP6_NF_TARGET_REJECT=yCONFIG_IP6_NF_TARGET_SYNPROXY=yCONFIG_IP6_NF_MANGLE=yCONFIG_IP6_NF_RAW=yCONFIG_IP6_NF_SECURITY=yCONFIG_IP6_NF_NAT=yCONFIG_IP6_NF_TARGET_MASQUERADE=yCONFIG_IP6_NF_TARGET_NPT=y
# end of IPv6: Netfilter Configuration
CONFIG_NF_DEFRAG_IPV6=yCONFIG_NF_TABLES_BRIDGE=yCONFIG_NFT_BRIDGE_META=yCONFIG_NFT_BRIDGE_REJECT=yCONFIG_NF_CONNTRACK_BRIDGE=yCONFIG_BRIDGE_NF_EBTABLES=yCONFIG_BRIDGE_EBT_BROUTE=yCONFIG_BRIDGE_EBT_T_FILTER=yCONFIG_BRIDGE_EBT_T_NAT=yCONFIG_BRIDGE_EBT_802_3=yCONFIG_BRIDGE_EBT_AMONG=yCONFIG_BRIDGE_EBT_ARP=yCONFIG_BRIDGE_EBT_IP=yCONFIG_BRIDGE_EBT_IP6=yCONFIG_BRIDGE_EBT_LIMIT=yCONFIG_BRIDGE_EBT_MARK=yCONFIG_BRIDGE_EBT_PKTTYPE=yCONFIG_BRIDGE_EBT_STP=yCONFIG_BRIDGE_EBT_VLAN=yCONFIG_BRIDGE_EBT_ARPREPLY=yCONFIG_BRIDGE_EBT_DNAT=yCONFIG_BRIDGE_EBT_MARK_T=yCONFIG_BRIDGE_EBT_REDIRECT=yCONFIG_BRIDGE_EBT_SNAT=yCONFIG_BRIDGE_EBT_LOG=yCONFIG_BRIDGE_EBT_NFLOG=yCONFIG_BPFILTER=yCONFIG_IP_DCCP=yCONFIG_INET_DCCP_DIAG=y
#
# DCCP CCIDs Configuration
#CONFIG_IP_DCCP_CCID2_DEBUG=yCONFIG_IP_DCCP_CCID3=yCONFIG_IP_DCCP_CCID3_DEBUG=yCONFIG_IP_DCCP_TFRC_LIB=yCONFIG_IP_DCCP_TFRC_DEBUG=y
# end of DCCP CCIDs Configuration
#
# DCCP Kernel Hacking
#CONFIG_IP_DCCP_DEBUG=y
# end of DCCP Kernel Hacking
CONFIG_IP_SCTP=yCONFIG_SCTP_DBG_OBJCNT=yCONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y
# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set
# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not setCONFIG_SCTP_COOKIE_HMAC_MD5=yCONFIG_SCTP_COOKIE_HMAC_SHA1=yCONFIG_INET_SCTP_DIAG=yCONFIG_RDS=yCONFIG_RDS_RDMA=yCONFIG_RDS_TCP=yCONFIG_RDS_DEBUG=yCONFIG_TIPC=yCONFIG_TIPC_MEDIA_IB=yCONFIG_TIPC_MEDIA_UDP=yCONFIG_TIPC_CRYPTO=yCONFIG_TIPC_DIAG=yCONFIG_ATM=yCONFIG_ATM_CLIP=yCONFIG_ATM_CLIP_NO_ICMP=yCONFIG_ATM_LANE=yCONFIG_ATM_MPOA=yCONFIG_ATM_BR2684=yCONFIG_ATM_BR2684_IPFILTER=yCONFIG_L2TP=yCONFIG_L2TP_DEBUGFS=yCONFIG_L2TP_V3=yCONFIG_L2TP_IP=yCONFIG_L2TP_ETH=yCONFIG_STP=yCONFIG_GARP=yCONFIG_MRP=yCONFIG_BRIDGE=yCONFIG_BRIDGE_IGMP_SNOOPING=yCONFIG_BRIDGE_VLAN_FILTERING=yCONFIG_BRIDGE_MRP=yCONFIG_BRIDGE_CFM=yCONFIG_NET_DSA=yCONFIG_NET_DSA_TAG_AR9331=yCONFIG_NET_DSA_TAG_BRCM_COMMON=yCONFIG_NET_DSA_TAG_BRCM=yCONFIG_NET_DSA_TAG_BRCM_LEGACY=yCONFIG_NET_DSA_TAG_BRCM_PREPEND=yCONFIG_NET_DSA_TAG_HELLCREEK=yCONFIG_NET_DSA_TAG_GSWIP=yCONFIG_NET_DSA_TAG_DSA_COMMON=yCONFIG_NET_DSA_TAG_DSA=yCONFIG_NET_DSA_TAG_EDSA=yCONFIG_NET_DSA_TAG_MTK=yCONFIG_NET_DSA_TAG_KSZ=yCONFIG_NET_DSA_TAG_OCELOT=yCONFIG_NET_DSA_TAG_OCELOT_8021Q=yCONFIG_NET_DSA_TAG_QCA=yCONFIG_NET_DSA_TAG_RTL4_A=yCONFIG_NET_DSA_TAG_RTL8_4=yCONFIG_NET_DSA_TAG_RZN1_A5PSW=yCONFIG_NET_DSA_TAG_LAN9303=yCONFIG_NET_DSA_TAG_SJA1105=yCONFIG_NET_DSA_TAG_TRAILER=yCONFIG_NET_DSA_TAG_XRS700X=yCONFIG_VLAN_8021Q=yCONFIG_VLAN_8021Q_GVRP=yCONFIG_VLAN_8021Q_MVRP=yCONFIG_LLC=yCONFIG_LLC2=yCONFIG_ATALK=yCONFIG_DEV_APPLETALK=yCONFIG_IPDDP=yCONFIG_IPDDP_ENCAP=yCONFIG_X25=yCONFIG_LAPB=yCONFIG_PHONET=yCONFIG_6LOWPAN=yCONFIG_6LOWPAN_DEBUGFS=yCONFIG_6LOWPAN_NHC=yCONFIG_6LOWPAN_NHC_DEST=yCONFIG_6LOWPAN_NHC_FRAGMENT=yCONFIG_6LOWPAN_NHC_HOP=yCONFIG_6LOWPAN_NHC_IPV6=yCONFIG_6LOWPAN_NHC_MOBILITY=yCONFIG_6LOWPAN_NHC_ROUTING=yCONFIG_6LOWPAN_NHC_UDP=yCONFIG_6LOWPAN_GHC_EXT_HDR_HOP=yCONFIG_6LOWPAN_GHC_UDP=yCONFIG_6LOWPAN_GHC_ICMPV6=yCONFIG_6LOWPAN_GHC_EXT_HDR_DEST=yCONFIG_6LOWPAN_GHC_EXT_HDR_FRAG=yCONFIG_6LOWPAN_GHC_EXT_HDR_ROUTE=yCONFIG_IEEE802154=yCONFIG_IEEE802154_NL802154_EXPERIMENTAL=yCONFIG_IEEE802154_SOCKET=yCONFIG_IEEE802154_6LOWPAN=yCONFIG_MAC802154=yCONFIG_NET_SCHED=y
#
# Queueing/Scheduling
#CONFIG_NET_SCH_CBQ=yCONFIG_NET_SCH_HTB=yCONFIG_NET_SCH_HFSC=yCONFIG_NET_SCH_ATM=yCONFIG_NET_SCH_PRIO=yCONFIG_NET_SCH_MULTIQ=yCONFIG_NET_SCH_RED=yCONFIG_NET_SCH_SFB=yCONFIG_NET_SCH_SFQ=yCONFIG_NET_SCH_TEQL=yCONFIG_NET_SCH_TBF=yCONFIG_NET_SCH_CBS=yCONFIG_NET_SCH_ETF=yCONFIG_NET_SCH_TAPRIO=yCONFIG_NET_SCH_GRED=yCONFIG_NET_SCH_DSMARK=yCONFIG_NET_SCH_NETEM=yCONFIG_NET_SCH_DRR=yCONFIG_NET_SCH_MQPRIO=yCONFIG_NET_SCH_SKBPRIO=yCONFIG_NET_SCH_CHOKE=yCONFIG_NET_SCH_QFQ=yCONFIG_NET_SCH_CODEL=yCONFIG_NET_SCH_FQ_CODEL=yCONFIG_NET_SCH_CAKE=yCONFIG_NET_SCH_FQ=yCONFIG_NET_SCH_HHF=yCONFIG_NET_SCH_PIE=yCONFIG_NET_SCH_FQ_PIE=yCONFIG_NET_SCH_INGRESS=yCONFIG_NET_SCH_PLUG=yCONFIG_NET_SCH_ETS=yCONFIG_NET_SCH_DEFAULT=y
# CONFIG_DEFAULT_FQ is not set
# CONFIG_DEFAULT_CODEL is not set
# CONFIG_DEFAULT_FQ_CODEL is not set
# CONFIG_DEFAULT_FQ_PIE is not set
# CONFIG_DEFAULT_SFQ is not setCONFIG_DEFAULT_PFIFO_FAST=yCONFIG_DEFAULT_NET_SCH="pfifo_fast"
#
# Classification
#CONFIG_NET_CLS=yCONFIG_NET_CLS_BASIC=yCONFIG_NET_CLS_TCINDEX=yCONFIG_NET_CLS_ROUTE4=yCONFIG_NET_CLS_FW=yCONFIG_NET_CLS_U32=yCONFIG_CLS_U32_PERF=yCONFIG_CLS_U32_MARK=yCONFIG_NET_CLS_RSVP=yCONFIG_NET_CLS_RSVP6=yCONFIG_NET_CLS_FLOW=yCONFIG_NET_CLS_CGROUP=yCONFIG_NET_CLS_BPF=yCONFIG_NET_CLS_FLOWER=yCONFIG_NET_CLS_MATCHALL=yCONFIG_NET_EMATCH=yCONFIG_NET_EMATCH_STACK=32CONFIG_NET_EMATCH_CMP=yCONFIG_NET_EMATCH_NBYTE=yCONFIG_NET_EMATCH_U32=yCONFIG_NET_EMATCH_META=yCONFIG_NET_EMATCH_TEXT=yCONFIG_NET_EMATCH_CANID=yCONFIG_NET_EMATCH_IPSET=yCONFIG_NET_EMATCH_IPT=yCONFIG_NET_CLS_ACT=yCONFIG_NET_ACT_POLICE=yCONFIG_NET_ACT_GACT=yCONFIG_GACT_PROB=yCONFIG_NET_ACT_MIRRED=yCONFIG_NET_ACT_SAMPLE=yCONFIG_NET_ACT_IPT=yCONFIG_NET_ACT_NAT=yCONFIG_NET_ACT_PEDIT=yCONFIG_NET_ACT_SIMP=yCONFIG_NET_ACT_SKBEDIT=yCONFIG_NET_ACT_CSUM=yCONFIG_NET_ACT_MPLS=yCONFIG_NET_ACT_VLAN=yCONFIG_NET_ACT_BPF=yCONFIG_NET_ACT_CONNMARK=yCONFIG_NET_ACT_CTINFO=yCONFIG_NET_ACT_SKBMOD=yCONFIG_NET_ACT_IFE=yCONFIG_NET_ACT_TUNNEL_KEY=yCONFIG_NET_ACT_CT=yCONFIG_NET_ACT_GATE=yCONFIG_NET_IFE_SKBMARK=yCONFIG_NET_IFE_SKBPRIO=yCONFIG_NET_IFE_SKBTCINDEX=yCONFIG_NET_TC_SKB_EXT=yCONFIG_NET_SCH_FIFO=yCONFIG_DCB=yCONFIG_DNS_RESOLVER=yCONFIG_BATMAN_ADV=yCONFIG_BATMAN_ADV_BATMAN_V=yCONFIG_BATMAN_ADV_BLA=yCONFIG_BATMAN_ADV_DAT=yCONFIG_BATMAN_ADV_NC=yCONFIG_BATMAN_ADV_MCAST=yCONFIG_BATMAN_ADV_DEBUG=yCONFIG_BATMAN_ADV_TRACING=yCONFIG_OPENVSWITCH=yCONFIG_OPENVSWITCH_GRE=yCONFIG_OPENVSWITCH_VXLAN=yCONFIG_OPENVSWITCH_GENEVE=yCONFIG_VSOCKETS=yCONFIG_VSOCKETS_DIAG=yCONFIG_VSOCKETS_LOOPBACK=yCONFIG_VIRTIO_VSOCKETS=yCONFIG_VIRTIO_VSOCKETS_COMMON=yCONFIG_NETLINK_DIAG=yCONFIG_MPLS=yCONFIG_NET_MPLS_GSO=yCONFIG_MPLS_ROUTING=yCONFIG_MPLS_IPTUNNEL=yCONFIG_NET_NSH=yCONFIG_HSR=yCONFIG_NET_SWITCHDEV=yCONFIG_NET_L3_MASTER_DEV=yCONFIG_QRTR=yCONFIG_QRTR_SMD=yCONFIG_QRTR_TUN=yCONFIG_QRTR_MHI=yCONFIG_NET_NCSI=yCONFIG_NCSI_OEM_CMD_GET_MAC=yCONFIG_NCSI_OEM_CMD_KEEP_PHY=yCONFIG_PCPU_DEV_REFCNT=yCONFIG_RPS=yCONFIG_RFS_ACCEL=yCONFIG_SOCK_RX_QUEUE_MAPPING=yCONFIG_XPS=yCONFIG_CGROUP_NET_PRIO=yCONFIG_CGROUP_NET_CLASSID=yCONFIG_NET_RX_BUSY_POLL=yCONFIG_BQL=yCONFIG_BPF_STREAM_PARSER=yCONFIG_NET_FLOW_LIMIT=y
#
# Network testing
#CONFIG_NET_PKTGEN=yCONFIG_NET_DROP_MONITOR=y
# end of Network testing # end of Networking options
CONFIG_HAMRADIO=y
#
# Packet Radio protocols
#CONFIG_AX25=yCONFIG_AX25_DAMA_SLAVE=yCONFIG_NETROM=yCONFIG_ROSE=y
#
# AX.25 network device drivers
#CONFIG_MKISS=yCONFIG_6PACK=yCONFIG_BPQETHER=yCONFIG_BAYCOM_SER_FDX=yCONFIG_BAYCOM_SER_HDX=yCONFIG_BAYCOM_PAR=yCONFIG_YAM=y
# end of AX.25 network device drivers
CONFIG_CAN=yCONFIG_CAN_RAW=yCONFIG_CAN_BCM=yCONFIG_CAN_GW=yCONFIG_CAN_J1939=yCONFIG_CAN_ISOTP=yCONFIG_BT=yCONFIG_BT_BREDR=yCONFIG_BT_RFCOMM=yCONFIG_BT_RFCOMM_TTY=yCONFIG_BT_BNEP=yCONFIG_BT_BNEP_MC_FILTER=yCONFIG_BT_BNEP_PROTO_FILTER=yCONFIG_BT_CMTP=yCONFIG_BT_HIDP=yCONFIG_BT_HS=yCONFIG_BT_LE=yCONFIG_BT_6LOWPAN=yCONFIG_BT_LEDS=yCONFIG_BT_MSFTEXT=yCONFIG_BT_AOSPEXT=yCONFIG_BT_DEBUGFS=yCONFIG_BT_SELFTEST=yCONFIG_BT_SELFTEST_ECDH=yCONFIG_BT_SELFTEST_SMP=y
#
# Bluetooth device drivers
#CONFIG_BT_INTEL=yCONFIG_BT_BCM=yCONFIG_BT_RTL=yCONFIG_BT_QCA=yCONFIG_BT_MTK=yCONFIG_BT_HCIBTUSB=yCONFIG_BT_HCIBTUSB_AUTOSUSPEND=yCONFIG_BT_HCIBTUSB_BCM=yCONFIG_BT_HCIBTUSB_MTK=yCONFIG_BT_HCIBTUSB_RTL=yCONFIG_BT_HCIBTSDIO=yCONFIG_BT_HCIUART=yCONFIG_BT_HCIUART_SERDEV=yCONFIG_BT_HCIUART_H4=yCONFIG_BT_HCIUART_NOKIA=yCONFIG_BT_HCIUART_BCSP=yCONFIG_BT_HCIUART_ATH3K=yCONFIG_BT_HCIUART_LL=yCONFIG_BT_HCIUART_3WIRE=yCONFIG_BT_HCIUART_INTEL=yCONFIG_BT_HCIUART_BCM=yCONFIG_BT_HCIUART_RTL=yCONFIG_BT_HCIUART_QCA=yCONFIG_BT_HCIUART_AG6XX=yCONFIG_BT_HCIUART_MRVL=yCONFIG_BT_HCIBCM203X=yCONFIG_BT_HCIBPA10X=yCONFIG_BT_HCIBFUSB=yCONFIG_BT_HCIDTL1=yCONFIG_BT_HCIBT3C=yCONFIG_BT_HCIBLUECARD=yCONFIG_BT_HCIVHCI=yCONFIG_BT_MRVL=yCONFIG_BT_MRVL_SDIO=yCONFIG_BT_ATH3K=yCONFIG_BT_MTKSDIO=yCONFIG_BT_MTKUART=yCONFIG_BT_QCOMSMD=yCONFIG_BT_HCIRSI=yCONFIG_BT_VIRTIO=y
# end of Bluetooth device drivers
CONFIG_AF_RXRPC=yCONFIG_AF_RXRPC_IPV6=yCONFIG_AF_RXRPC_INJECT_LOSS=yCONFIG_AF_RXRPC_DEBUG=yCONFIG_RXKAD=yCONFIG_AF_KCM=yCONFIG_STREAM_PARSER=yCONFIG_MCTP=yCONFIG_MCTP_TEST=yCONFIG_MCTP_FLOWS=yCONFIG_FIB_RULES=yCONFIG_WIRELESS=yCONFIG_WIRELESS_EXT=yCONFIG_WEXT_CORE=yCONFIG_WEXT_PROC=yCONFIG_WEXT_SPY=yCONFIG_WEXT_PRIV=yCONFIG_CFG80211=yCONFIG_NL80211_TESTMODE=yCONFIG_CFG80211_DEVELOPER_WARNINGS=yCONFIG_CFG80211_CERTIFICATION_ONUS=yCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=yCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=yCONFIG_CFG80211_EXTRA_REGDB_KEYDIR=""CONFIG_CFG80211_REG_CELLULAR_HINTS=yCONFIG_CFG80211_REG_RELAX_NO_IR=yCONFIG_CFG80211_DEFAULT_PS=yCONFIG_CFG80211_DEBUGFS=yCONFIG_CFG80211_CRDA_SUPPORT=yCONFIG_CFG80211_WEXT=yCONFIG_CFG80211_WEXT_EXPORT=yCONFIG_LIB80211=yCONFIG_LIB80211_CRYPT_WEP=yCONFIG_LIB80211_CRYPT_CCMP=yCONFIG_LIB80211_CRYPT_TKIP=yCONFIG_LIB80211_DEBUG=yCONFIG_MAC80211=yCONFIG_MAC80211_HAS_RC=yCONFIG_MAC80211_RC_MINSTREL=yCONFIG_MAC80211_RC_DEFAULT_MINSTREL=yCONFIG_MAC80211_RC_DEFAULT="minstrel_ht"CONFIG_MAC80211_MESH=yCONFIG_MAC80211_LEDS=yCONFIG_MAC80211_DEBUGFS=yCONFIG_MAC80211_MESSAGE_TRACING=yCONFIG_MAC80211_DEBUG_MENU=yCONFIG_MAC80211_NOINLINE=yCONFIG_MAC80211_VERBOSE_DEBUG=yCONFIG_MAC80211_MLME_DEBUG=yCONFIG_MAC80211_STA_DEBUG=yCONFIG_MAC80211_HT_DEBUG=yCONFIG_MAC80211_OCB_DEBUG=yCONFIG_MAC80211_IBSS_DEBUG=yCONFIG_MAC80211_PS_DEBUG=yCONFIG_MAC80211_MPL_DEBUG=yCONFIG_MAC80211_MPATH_DEBUG=yCONFIG_MAC80211_MHWMP_DEBUG=yCONFIG_MAC80211_MESH_SYNC_DEBUG=yCONFIG_MAC80211_MESH_CSA_DEBUG=yCONFIG_MAC80211_MESH_PS_DEBUG=yCONFIG_MAC80211_TDLS_DEBUG=yCONFIG_MAC80211_DEBUG_COUNTERS=yCONFIG_MAC80211_STA_HASH_MAX_SIZE=0CONFIG_RFKILL=yCONFIG_RFKILL_LEDS=yCONFIG_RFKILL_INPUT=yCONFIG_RFKILL_GPIO=yCONFIG_NET_9P=yCONFIG_NET_9P_FD=yCONFIG_NET_9P_VIRTIO=yCONFIG_NET_9P_RDMA=yCONFIG_NET_9P_DEBUG=yCONFIG_CAIF=yCONFIG_CAIF_DEBUG=yCONFIG_CAIF_NETDEV=yCONFIG_CAIF_USB=yCONFIG_CEPH_LIB=yCONFIG_CEPH_LIB_PRETTYDEBUG=yCONFIG_CEPH_LIB_USE_DNS_RESOLVER=yCONFIG_NFC=yCONFIG_NFC_DIGITAL=yCONFIG_NFC_NCI=yCONFIG_NFC_NCI_SPI=yCONFIG_NFC_NCI_UART=yCONFIG_NFC_HCI=yCONFIG_NFC_SHDLC=y
#
# Near Field Communication (NFC) devices
#CONFIG_NFC_TRF7970A=yCONFIG_NFC_SIM=yCONFIG_NFC_PORT100=yCONFIG_NFC_VIRTUAL_NCI=yCONFIG_NFC_FDP=yCONFIG_NFC_FDP_I2C=yCONFIG_NFC_PN544=yCONFIG_NFC_PN544_I2C=yCONFIG_NFC_PN533=yCONFIG_NFC_PN533_USB=yCONFIG_NFC_PN533_I2C=yCONFIG_NFC_PN532_UART=yCONFIG_NFC_MICROREAD=yCONFIG_NFC_MICROREAD_I2C=yCONFIG_NFC_MRVL=yCONFIG_NFC_MRVL_USB=yCONFIG_NFC_MRVL_UART=yCONFIG_NFC_MRVL_I2C=yCONFIG_NFC_MRVL_SPI=yCONFIG_NFC_ST21NFCA=yCONFIG_NFC_ST21NFCA_I2C=yCONFIG_NFC_ST_NCI=yCONFIG_NFC_ST_NCI_I2C=yCONFIG_NFC_ST_NCI_SPI=yCONFIG_NFC_NXP_NCI=yCONFIG_NFC_NXP_NCI_I2C=yCONFIG_NFC_S3FWRN5=yCONFIG_NFC_S3FWRN5_I2C=yCONFIG_NFC_S3FWRN82_UART=yCONFIG_NFC_ST95HF=y
# end of Near Field Communication (NFC) devices
CONFIG_PSAMPLE=yCONFIG_NET_IFE=yCONFIG_LWTUNNEL=yCONFIG_LWTUNNEL_BPF=yCONFIG_DST_CACHE=yCONFIG_GRO_CELLS=yCONFIG_SOCK_VALIDATE_XMIT=yCONFIG_NET_SELFTESTS=yCONFIG_NET_SOCK_MSG=yCONFIG_NET_DEVLINK=yCONFIG_PAGE_POOL=yCONFIG_PAGE_POOL_STATS=yCONFIG_FAILOVER=yCONFIG_ETHTOOL_NETLINK=yCONFIG_NETDEV_ADDR_LIST_TEST=y
#
# Device Drivers
#CONFIG_HAVE_PCI=yCONFIG_PCI=yCONFIG_PCI_DOMAINS=yCONFIG_PCI_SYSCALL=yCONFIG_PCIEPORTBUS=yCONFIG_HOTPLUG_PCI_PCIE=yCONFIG_PCIEAER=yCONFIG_PCIEAER_INJECT=yCONFIG_PCIE_ECRC=yCONFIG_PCIEASPM=yCONFIG_PCIEASPM_DEFAULT=y
# CONFIG_PCIEASPM_POWERSAVE is not set
# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
# CONFIG_PCIEASPM_PERFORMANCE is not setCONFIG_PCIE_PME=yCONFIG_PCIE_DPC=yCONFIG_PCIE_PTM=yCONFIG_PCI_MSI=yCONFIG_PCI_MSI_IRQ_DOMAIN=yCONFIG_PCI_MSI_ARCH_FALLBACKS=yCONFIG_PCI_QUIRKS=yCONFIG_PCI_DEBUG=yCONFIG_PCI_REALLOC_ENABLE_AUTO=yCONFIG_PCI_STUB=yCONFIG_PCI_PF_STUB=yCONFIG_PCI_ATS=yCONFIG_PCI_DOE=yCONFIG_PCI_ECAM=yCONFIG_PCI_BRIDGE_EMUL=yCONFIG_PCI_IOV=yCONFIG_PCI_PRI=yCONFIG_PCI_PASID=y
# CONFIG_PCIE_BUS_TUNE_OFF is not setCONFIG_PCIE_BUS_DEFAULT=y
# CONFIG_PCIE_BUS_SAFE is not set
# CONFIG_PCIE_BUS_PERFORMANCE is not set
# CONFIG_PCIE_BUS_PEER2PEER is not setCONFIG_VGA_ARB=yCONFIG_VGA_ARB_MAX_GPUS=16CONFIG_HOTPLUG_PCI=yCONFIG_HOTPLUG_PCI_CPCI=yCONFIG_HOTPLUG_PCI_SHPC=y
#
# PCI controller drivers
#CONFIG_PCI_AARDVARK=yCONFIG_PCIE_XILINX_NWL=yCONFIG_PCI_FTPCI100=yCONFIG_PCI_TEGRA=yCONFIG_PCIE_RCAR_HOST=yCONFIG_PCIE_RCAR_EP=yCONFIG_PCI_HOST_COMMON=yCONFIG_PCI_HOST_GENERIC=yCONFIG_PCIE_XILINX=yCONFIG_PCIE_XILINX_CPM=yCONFIG_PCI_XGENE=yCONFIG_PCI_XGENE_MSI=yCONFIG_PCI_V3_SEMI=yCONFIG_PCI_VERSATILE=yCONFIG_PCIE_ALTERA=yCONFIG_PCIE_ALTERA_MSI=yCONFIG_PCI_HOST_THUNDER_PEM=yCONFIG_PCI_HOST_THUNDER_ECAM=yCONFIG_PCIE_ROCKCHIP=yCONFIG_PCIE_ROCKCHIP_HOST=yCONFIG_PCIE_ROCKCHIP_EP=yCONFIG_PCIE_MEDIATEK=yCONFIG_PCIE_MEDIATEK_GEN3=yCONFIG_PCIE_BRCMSTB=yCONFIG_PCI_LOONGSON=yCONFIG_PCIE_MICROCHIP_HOST=yCONFIG_PCIE_APPLE_MSI_DOORBELL_ADDR=0xfffff000CONFIG_PCIE_APPLE=yCONFIG_PCIE_MT7621=y
#
# DesignWare PCI Core Support
#CONFIG_PCIE_DW=yCONFIG_PCIE_DW_HOST=yCONFIG_PCIE_DW_EP=yCONFIG_PCI_DRA7XX=yCONFIG_PCI_DRA7XX_HOST=yCONFIG_PCI_DRA7XX_EP=yCONFIG_PCIE_DW_PLAT=yCONFIG_PCIE_DW_PLAT_HOST=yCONFIG_PCIE_DW_PLAT_EP=yCONFIG_PCI_EXYNOS=yCONFIG_PCI_IMX6=yCONFIG_PCIE_SPEAR13XX=yCONFIG_PCI_KEYSTONE=yCONFIG_PCI_KEYSTONE_HOST=yCONFIG_PCI_KEYSTONE_EP=yCONFIG_PCI_LAYERSCAPE=yCONFIG_PCI_LAYERSCAPE_EP=yCONFIG_PCI_HISI=yCONFIG_PCIE_QCOM=yCONFIG_PCIE_QCOM_EP=yCONFIG_PCIE_ARMADA_8K=yCONFIG_PCIE_ARTPEC6=yCONFIG_PCIE_ARTPEC6_HOST=yCONFIG_PCIE_ARTPEC6_EP=yCONFIG_PCIE_ROCKCHIP_DW_HOST=yCONFIG_PCIE_INTEL_GW=yCONFIG_PCIE_KEEMBAY=yCONFIG_PCIE_KEEMBAY_HOST=yCONFIG_PCIE_KEEMBAY_EP=yCONFIG_PCIE_KIRIN=yCONFIG_PCIE_HISI_STB=yCONFIG_PCI_MESON=yCONFIG_PCIE_TEGRA194=yCONFIG_PCIE_TEGRA194_HOST=yCONFIG_PCIE_TEGRA194_EP=yCONFIG_PCIE_VISCONTI_HOST=yCONFIG_PCIE_UNIPHIER=yCONFIG_PCIE_UNIPHIER_EP=yCONFIG_PCIE_AL=yCONFIG_PCIE_FU740=y
# end of DesignWare PCI Core Support
#
# Mobiveil PCIe Core Support
#CONFIG_PCIE_MOBIVEIL=yCONFIG_PCIE_MOBIVEIL_HOST=yCONFIG_PCIE_MOBIVEIL_PLAT=yCONFIG_PCIE_LAYERSCAPE_GEN4=y
# end of Mobiveil PCIe Core Support
#
# Cadence PCIe controllers support
#CONFIG_PCIE_CADENCE=yCONFIG_PCIE_CADENCE_HOST=yCONFIG_PCIE_CADENCE_EP=yCONFIG_PCIE_CADENCE_PLAT=yCONFIG_PCIE_CADENCE_PLAT_HOST=yCONFIG_PCIE_CADENCE_PLAT_EP=yCONFIG_PCI_J721E=yCONFIG_PCI_J721E_HOST=yCONFIG_PCI_J721E_EP=y
# end of Cadence PCIe controllers support # end of PCI controller drivers
#
# PCI Endpoint
#CONFIG_PCI_ENDPOINT=yCONFIG_PCI_ENDPOINT_CONFIGFS=yCONFIG_PCI_EPF_TEST=yCONFIG_PCI_EPF_NTB=yCONFIG_PCI_EPF_VNTB=y
# end of PCI Endpoint
#
# PCI switch controller drivers
#CONFIG_PCI_SW_SWITCHTEC=y
# end of PCI switch controller drivers
CONFIG_CXL_BUS=yCONFIG_CXL_PCI=yCONFIG_CXL_MEM_RAW_COMMANDS=yCONFIG_CXL_PMEM=yCONFIG_CXL_MEM=yCONFIG_CXL_PORT=yCONFIG_CXL_REGION=yCONFIG_PCCARD=yCONFIG_PCMCIA=yCONFIG_PCMCIA_LOAD_CIS=yCONFIG_CARDBUS=y
#
# PC-card bridges
#CONFIG_YENTA=yCONFIG_YENTA_O2=yCONFIG_YENTA_RICOH=yCONFIG_YENTA_TI=yCONFIG_YENTA_ENE_TUNE=yCONFIG_YENTA_TOSHIBA=yCONFIG_PD6729=yCONFIG_I82092=yCONFIG_PCCARD_NONSTATIC=yCONFIG_RAPIDIO=yCONFIG_RAPIDIO_TSI721=yCONFIG_RAPIDIO_DISC_TIMEOUT=30CONFIG_RAPIDIO_ENABLE_RX_TX_PORTS=yCONFIG_RAPIDIO_DMA_ENGINE=yCONFIG_RAPIDIO_DEBUG=yCONFIG_RAPIDIO_ENUM_BASIC=yCONFIG_RAPIDIO_CHMAN=yCONFIG_RAPIDIO_MPORT_CDEV=y
#
# RapidIO Switch drivers
#CONFIG_RAPIDIO_CPS_XX=yCONFIG_RAPIDIO_CPS_GEN2=yCONFIG_RAPIDIO_RXS_GEN3=y
# end of RapidIO Switch drivers
#
# Generic Driver Options
#CONFIG_AUXILIARY_BUS=yCONFIG_UEVENT_HELPER=yCONFIG_UEVENT_HELPER_PATH=""CONFIG_DEVTMPFS=yCONFIG_DEVTMPFS_MOUNT=yCONFIG_DEVTMPFS_SAFE=yCONFIG_STANDALONE=yCONFIG_PREVENT_FIRMWARE_BUILD=y
#
# Firmware loader
#CONFIG_FW_LOADER=yCONFIG_FW_LOADER_PAGED_BUF=yCONFIG_FW_LOADER_SYSFS=yCONFIG_EXTRA_FIRMWARE=""CONFIG_FW_LOADER_USER_HELPER=yCONFIG_FW_LOADER_USER_HELPER_FALLBACK=yCONFIG_FW_LOADER_COMPRESS=yCONFIG_FW_LOADER_COMPRESS_XZ=yCONFIG_FW_LOADER_COMPRESS_ZSTD=yCONFIG_FW_CACHE=yCONFIG_FW_UPLOAD=y
# end of Firmware loader
CONFIG_WANT_DEV_COREDUMP=yCONFIG_ALLOW_DEV_COREDUMP=yCONFIG_DEV_COREDUMP=yCONFIG_DEBUG_DRIVER=yCONFIG_DEBUG_DEVRES=yCONFIG_DEBUG_TEST_DRIVER_REMOVE=yCONFIG_PM_QOS_KUNIT_TEST=yCONFIG_TEST_ASYNC_DRIVER_PROBE=mCONFIG_DRIVER_PE_KUNIT_TEST=yCONFIG_SOC_BUS=yCONFIG_REGMAP=yCONFIG_REGMAP_AC97=yCONFIG_REGMAP_I2C=yCONFIG_REGMAP_SLIMBUS=yCONFIG_REGMAP_SPI=yCONFIG_REGMAP_SPMI=yCONFIG_REGMAP_W1=yCONFIG_REGMAP_MMIO=yCONFIG_REGMAP_IRQ=yCONFIG_REGMAP_SOUNDWIRE=yCONFIG_REGMAP_SOUNDWIRE_MBQ=yCONFIG_REGMAP_SCCB=yCONFIG_REGMAP_I3C=yCONFIG_REGMAP_SPI_AVMM=yCONFIG_DMA_SHARED_BUFFER=yCONFIG_DMA_FENCE_TRACE=y
# end of Generic Driver Options
#
# Bus devices
#CONFIG_ARM_INTEGRATOR_LM=yCONFIG_BT1_APB=yCONFIG_BT1_AXI=yCONFIG_MOXTET=yCONFIG_HISILICON_LPC=yCONFIG_INTEL_IXP4XX_EB=yCONFIG_QCOM_EBI2=yCONFIG_MHI_BUS=yCONFIG_MHI_BUS_DEBUG=yCONFIG_MHI_BUS_PCI_GENERIC=yCONFIG_MHI_BUS_EP=y
# end of Bus devices
CONFIG_CONNECTOR=yCONFIG_PROC_EVENTS=y
#
# Firmware Drivers
#
#
# ARM System Control and Management Interface Protocol #CONFIG_ARM_SCMI_PROTOCOL=y CONFIG_ARM_SCMI_HAVE_TRANSPORT=y CONFIG_ARM_SCMI_HAVE_SHMEM=y CONFIG_ARM_SCMI_HAVE_MSG=y CONFIG_ARM_SCMI_TRANSPORT_MAILBOX=y CONFIG_ARM_SCMI_TRANSPORT_VIRTIO=y CONFIG_ARM_SCMI_TRANSPORT_VIRTIO_VERSION1_COMPLIANCE=y CONFIG_ARM_SCMI_TRANSPORT_VIRTIO_ATOMIC_ENABLE=y CONFIG_ARM_SCMI_POWER_DOMAIN=y CONFIG_ARM_SCMI_POWER_CONTROL=y
# end of ARM System Control and Management Interface Protocol
CONFIG_ARM_SCPI_PROTOCOL=yCONFIG_ARM_SCPI_POWER_DOMAIN=yCONFIG_FIRMWARE_MEMMAP=yCONFIG_FW_CFG_SYSFS=yCONFIG_FW_CFG_SYSFS_CMDLINE=yCONFIG_MTK_ADSP_IPC=yCONFIG_QCOM_SCM=yCONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT=yCONFIG_TURRIS_MOX_RWTM=yCONFIG_BCM47XX_NVRAM=yCONFIG_BCM47XX_SPROM=yCONFIG_TEE_BNXT_FW=yCONFIG_CS_DSP=yCONFIG_GOOGLE_FIRMWARE=yCONFIG_GOOGLE_COREBOOT_TABLE=yCONFIG_GOOGLE_MEMCONSOLE=yCONFIG_GOOGLE_MEMCONSOLE_COREBOOT=yCONFIG_GOOGLE_VPD=yCONFIG_IMX_DSP=yCONFIG_IMX_SCU=yCONFIG_IMX_SCU_PD=y
#
# Tegra firmware driver
#
# end of Tegra firmware driver # end of Firmware Drivers
CONFIG_GNSS=yCONFIG_GNSS_SERIAL=yCONFIG_GNSS_MTK_SERIAL=yCONFIG_GNSS_SIRF_SERIAL=yCONFIG_GNSS_UBX_SERIAL=yCONFIG_GNSS_USB=yCONFIG_MTD=yCONFIG_MTD_TESTS=m
#
# Partition parsers
#CONFIG_MTD_AR7_PARTS=yCONFIG_MTD_BCM63XX_PARTS=yCONFIG_MTD_BRCM_U_BOOT=yCONFIG_MTD_CMDLINE_PARTS=yCONFIG_MTD_OF_PARTS=yCONFIG_MTD_OF_PARTS_BCM4908=yCONFIG_MTD_OF_PARTS_LINKSYS_NS=yCONFIG_MTD_PARSER_IMAGETAG=yCONFIG_MTD_PARSER_TRX=yCONFIG_MTD_SHARPSL_PARTS=yCONFIG_MTD_REDBOOT_PARTS=yCONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=yCONFIG_MTD_REDBOOT_PARTS_READONLY=yCONFIG_MTD_QCOMSMEM_PARTS=y
# end of Partition parsers
#
# User Modules And Translation Layers
#CONFIG_MTD_BLKDEVS=yCONFIG_MTD_BLOCK=y
#
# Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK. #CONFIG_FTL=yCONFIG_NFTL=yCONFIG_NFTL_RW=yCONFIG_INFTL=yCONFIG_RFD_FTL=yCONFIG_SSFDC=yCONFIG_SM_FTL=yCONFIG_MTD_OOPS=yCONFIG_MTD_PSTORE=yCONFIG_MTD_SWAP=yCONFIG_MTD_PARTITIONED_MASTER=y
#
# RAM/ROM/Flash chip drivers
#CONFIG_MTD_CFI=yCONFIG_MTD_JEDECPROBE=yCONFIG_MTD_GEN_PROBE=yCONFIG_MTD_CFI_ADV_OPTIONS=yCONFIG_MTD_CFI_NOSWAP=y
# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
# CONFIG_MTD_CFI_LE_BYTE_SWAP is not setCONFIG_MTD_CFI_GEOMETRY=yCONFIG_MTD_MAP_BANK_WIDTH_1=yCONFIG_MTD_MAP_BANK_WIDTH_2=yCONFIG_MTD_MAP_BANK_WIDTH_4=yCONFIG_MTD_MAP_BANK_WIDTH_8=yCONFIG_MTD_MAP_BANK_WIDTH_16=yCONFIG_MTD_MAP_BANK_WIDTH_32=yCONFIG_MTD_CFI_I1=yCONFIG_MTD_CFI_I2=yCONFIG_MTD_CFI_I4=yCONFIG_MTD_CFI_I8=yCONFIG_MTD_OTP=yCONFIG_MTD_CFI_INTELEXT=yCONFIG_MTD_CFI_AMDSTD=yCONFIG_MTD_CFI_STAA=yCONFIG_MTD_CFI_UTIL=yCONFIG_MTD_RAM=yCONFIG_MTD_ROM=yCONFIG_MTD_ABSENT=y
# end of RAM/ROM/Flash chip drivers
#
# Mapping drivers for chip access
#CONFIG_MTD_COMPLEX_MAPPINGS=yCONFIG_MTD_PHYSMAP=yCONFIG_MTD_PHYSMAP_COMPAT=yCONFIG_MTD_PHYSMAP_START=0x8000000CONFIG_MTD_PHYSMAP_LEN=0CONFIG_MTD_PHYSMAP_BANKWIDTH=2CONFIG_MTD_PHYSMAP_OF=yCONFIG_MTD_PHYSMAP_BT1_ROM=yCONFIG_MTD_PHYSMAP_VERSATILE=yCONFIG_MTD_PHYSMAP_GEMINI=yCONFIG_MTD_PHYSMAP_GPIO_ADDR=yCONFIG_MTD_SUN_UFLASH=yCONFIG_MTD_SC520CDP=yCONFIG_MTD_NETSC520=yCONFIG_MTD_TS5500=yCONFIG_MTD_PCI=yCONFIG_MTD_PCMCIA=yCONFIG_MTD_PCMCIA_ANONYMOUS=yCONFIG_MTD_INTEL_VR_NOR=yCONFIG_MTD_PLATRAM=y
# end of Mapping drivers for chip access
#
# Self-contained MTD device drivers
#CONFIG_MTD_PMC551=yCONFIG_MTD_PMC551_BUGFIX=yCONFIG_MTD_PMC551_DEBUG=yCONFIG_MTD_DATAFLASH=yCONFIG_MTD_DATAFLASH_WRITE_VERIFY=yCONFIG_MTD_DATAFLASH_OTP=yCONFIG_MTD_MCHP23K256=yCONFIG_MTD_MCHP48L640=yCONFIG_MTD_SPEAR_SMI=yCONFIG_MTD_SST25L=yCONFIG_MTD_SLRAM=yCONFIG_MTD_PHRAM=yCONFIG_MTD_MTDRAM=yCONFIG_MTDRAM_TOTAL_SIZE=4096CONFIG_MTDRAM_ERASE_SIZE=128CONFIG_MTD_BLOCK2MTD=y
#
# Disk-On-Chip Device Drivers
#CONFIG_MTD_DOCG3=yCONFIG_BCH_CONST_M=14CONFIG_BCH_CONST_T=4
# end of Self-contained MTD device drivers
#
# NAND
#CONFIG_MTD_NAND_CORE=yCONFIG_MTD_ONENAND=yCONFIG_MTD_ONENAND_VERIFY_WRITE=yCONFIG_MTD_ONENAND_GENERIC=yCONFIG_MTD_ONENAND_SAMSUNG=yCONFIG_MTD_ONENAND_OTP=yCONFIG_MTD_ONENAND_2X_PROGRAM=yCONFIG_MTD_RAW_NAND=y
#
# Raw/parallel NAND flash controllers
#CONFIG_MTD_NAND_DENALI=yCONFIG_MTD_NAND_DENALI_PCI=yCONFIG_MTD_NAND_DENALI_DT=yCONFIG_MTD_NAND_AMS_DELTA=yCONFIG_MTD_NAND_SHARPSL=yCONFIG_MTD_NAND_CAFE=yCONFIG_MTD_NAND_ATMEL=yCONFIG_MTD_NAND_MARVELL=yCONFIG_MTD_NAND_SLC_LPC32XX=yCONFIG_MTD_NAND_MLC_LPC32XX=yCONFIG_MTD_NAND_BRCMNAND=yCONFIG_MTD_NAND_BRCMNAND_BCM63XX=yCONFIG_MTD_NAND_BRCMNAND_BCMA=yCONFIG_MTD_NAND_BRCMNAND_BCMBCA=yCONFIG_MTD_NAND_BRCMNAND_BRCMSTB=yCONFIG_MTD_NAND_BRCMNAND_IPROC=yCONFIG_MTD_NAND_BCM47XXNFLASH=yCONFIG_MTD_NAND_OXNAS=yCONFIG_MTD_NAND_GPMI_NAND=yCONFIG_MTD_NAND_FSL_IFC=yCONFIG_MTD_NAND_VF610_NFC=yCONFIG_MTD_NAND_MXC=yCONFIG_MTD_NAND_SH_FLCTL=yCONFIG_MTD_NAND_DAVINCI=yCONFIG_MTD_NAND_TXX9NDFMC=yCONFIG_MTD_NAND_JZ4780=yCONFIG_MTD_NAND_INGENIC_ECC=yCONFIG_MTD_NAND_JZ4740_ECC=yCONFIG_MTD_NAND_JZ4725B_BCH=yCONFIG_MTD_NAND_JZ4780_BCH=yCONFIG_MTD_NAND_FSMC=yCONFIG_MTD_NAND_SUNXI=yCONFIG_MTD_NAND_HISI504=yCONFIG_MTD_NAND_QCOM=yCONFIG_MTD_NAND_MTK=yCONFIG_MTD_NAND_MXIC=yCONFIG_MTD_NAND_TEGRA=yCONFIG_MTD_NAND_STM32_FMC2=yCONFIG_MTD_NAND_MESON=yCONFIG_MTD_NAND_GPIO=yCONFIG_MTD_NAND_PLATFORM=yCONFIG_MTD_NAND_CADENCE=yCONFIG_MTD_NAND_ARASAN=yCONFIG_MTD_NAND_INTEL_LGM=yCONFIG_MTD_NAND_RENESAS=y
#
# Misc
#CONFIG_MTD_SM_COMMON=yCONFIG_MTD_NAND_NANDSIM=yCONFIG_MTD_NAND_RICOH=yCONFIG_MTD_NAND_DISKONCHIP=yCONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED=yCONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0CONFIG_MTD_NAND_DISKONCHIP_PROBE_HIGH=yCONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=yCONFIG_MTD_SPI_NAND=y
#
# ECC engine support
#CONFIG_MTD_NAND_ECC=yCONFIG_MTD_NAND_ECC_SW_HAMMING=yCONFIG_MTD_NAND_ECC_SW_HAMMING_SMC=yCONFIG_MTD_NAND_ECC_SW_BCH=yCONFIG_MTD_NAND_ECC_MXIC=yCONFIG_MTD_NAND_ECC_MEDIATEK=y
# end of ECC engine support # end of NAND
#
# LPDDR & LPDDR2 PCM memory drivers
#CONFIG_MTD_LPDDR=yCONFIG_MTD_QINFO_PROBE=y
# end of LPDDR & LPDDR2 PCM memory drivers
CONFIG_MTD_SPI_NOR=yCONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
# CONFIG_MTD_SPI_NOR_SWP_DISABLE is not setCONFIG_MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE=y
# CONFIG_MTD_SPI_NOR_SWP_KEEP is not setCONFIG_SPI_HISI_SFC=yCONFIG_SPI_NXP_SPIFI=yCONFIG_MTD_UBI=yCONFIG_MTD_UBI_WL_THRESHOLD=4096CONFIG_MTD_UBI_BEB_LIMIT=20CONFIG_MTD_UBI_FASTMAP=yCONFIG_MTD_UBI_GLUEBI=yCONFIG_MTD_UBI_BLOCK=yCONFIG_MTD_HYPERBUS=yCONFIG_HBMC_AM654=yCONFIG_DTC=yCONFIG_OF=yCONFIG_OF_ALL_DTBS=yCONFIG_OF_FLATTREE=yCONFIG_OF_EARLY_FLATTREE=yCONFIG_OF_PROMTREE=yCONFIG_OF_KOBJ=yCONFIG_OF_DYNAMIC=yCONFIG_OF_RESERVED_MEM=yCONFIG_OF_RESOLVE=yCONFIG_OF_OVERLAY=yCONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=yCONFIG_PARPORT=yCONFIG_PARPORT_PC=yCONFIG_PARPORT_SERIAL=yCONFIG_PARPORT_PC_FIFO=yCONFIG_PARPORT_PC_SUPERIO=yCONFIG_PARPORT_PC_PCMCIA=yCONFIG_PARPORT_SUNBPP=yCONFIG_PARPORT_AX88796=yCONFIG_PARPORT_1284=yCONFIG_PARPORT_NOT_PC=yCONFIG_BLK_DEV=yCONFIG_BLK_DEV_NULL_BLK=yCONFIG_BLK_DEV_NULL_BLK_FAULT_INJECTION=yCONFIG_BLK_DEV_FD=yCONFIG_BLK_DEV_FD_RAWCMD=yCONFIG_CDROM=yCONFIG_PARIDE=y
#
# Parallel IDE high-level drivers
#CONFIG_PARIDE_PD=yCONFIG_PARIDE_PCD=yCONFIG_PARIDE_PF=yCONFIG_PARIDE_PT=yCONFIG_PARIDE_PG=y
#
# Parallel IDE protocol modules
#CONFIG_PARIDE_ATEN=yCONFIG_PARIDE_BPCK=yCONFIG_PARIDE_COMM=yCONFIG_PARIDE_DSTR=yCONFIG_PARIDE_FIT2=yCONFIG_PARIDE_FIT3=yCONFIG_PARIDE_EPAT=yCONFIG_PARIDE_EPATC8=yCONFIG_PARIDE_EPIA=yCONFIG_PARIDE_FRIQ=yCONFIG_PARIDE_FRPW=yCONFIG_PARIDE_KBIC=yCONFIG_PARIDE_KTTI=yCONFIG_PARIDE_ON20=yCONFIG_PARIDE_ON26=yCONFIG_BLK_DEV_PCIESSD_MTIP32XX=yCONFIG_ZRAM=yCONFIG_ZRAM_DEF_COMP_LZORLE=y
# CONFIG_ZRAM_DEF_COMP_ZSTD is not set
# CONFIG_ZRAM_DEF_COMP_LZ4 is not set
# CONFIG_ZRAM_DEF_COMP_LZO is not set
# CONFIG_ZRAM_DEF_COMP_LZ4HC is not set
# CONFIG_ZRAM_DEF_COMP_842 is not setCONFIG_ZRAM_DEF_COMP="lzo-rle"CONFIG_ZRAM_WRITEBACK=yCONFIG_ZRAM_MEMORY_TRACKING=yCONFIG_BLK_DEV_LOOP=yCONFIG_BLK_DEV_LOOP_MIN_COUNT=8CONFIG_BLK_DEV_DRBD=yCONFIG_DRBD_FAULT_INJECTION=yCONFIG_BLK_DEV_NBD=yCONFIG_BLK_DEV_RAM=yCONFIG_BLK_DEV_RAM_COUNT=16CONFIG_BLK_DEV_RAM_SIZE=4096CONFIG_CDROM_PKTCDVD=yCONFIG_CDROM_PKTCDVD_BUFFERS=8CONFIG_CDROM_PKTCDVD_WCACHE=yCONFIG_ATA_OVER_ETH=yCONFIG_SUNVDC=yCONFIG_VIRTIO_BLK=yCONFIG_BLK_DEV_RBD=yCONFIG_BLK_DEV_UBLK=yCONFIG_BLK_DEV_RNBD=yCONFIG_BLK_DEV_RNBD_CLIENT=yCONFIG_BLK_DEV_RNBD_SERVER=y
#
# NVME Support
#CONFIG_NVME_COMMON=yCONFIG_NVME_CORE=yCONFIG_BLK_DEV_NVME=yCONFIG_NVME_MULTIPATH=yCONFIG_NVME_VERBOSE_ERRORS=yCONFIG_NVME_HWMON=yCONFIG_NVME_FABRICS=yCONFIG_NVME_RDMA=yCONFIG_NVME_FC=yCONFIG_NVME_TCP=yCONFIG_NVME_AUTH=yCONFIG_NVME_APPLE=yCONFIG_NVME_TARGET=yCONFIG_NVME_TARGET_PASSTHRU=yCONFIG_NVME_TARGET_LOOP=yCONFIG_NVME_TARGET_RDMA=yCONFIG_NVME_TARGET_FC=yCONFIG_NVME_TARGET_FCLOOP=yCONFIG_NVME_TARGET_TCP=yCONFIG_NVME_TARGET_AUTH=y
# end of NVME Support
#
# Misc devices
#CONFIG_SENSORS_LIS3LV02D=yCONFIG_AD525X_DPOT=yCONFIG_AD525X_DPOT_I2C=yCONFIG_AD525X_DPOT_SPI=yCONFIG_DUMMY_IRQ=yCONFIG_PHANTOM=yCONFIG_TIFM_CORE=yCONFIG_TIFM_7XX1=yCONFIG_ICS932S401=yCONFIG_ATMEL_SSC=yCONFIG_ENCLOSURE_SERVICES=yCONFIG_GEHC_ACHC=yCONFIG_HI6421V600_IRQ=yCONFIG_HP_ILO=yCONFIG_QCOM_COINCELL=yCONFIG_QCOM_FASTRPC=yCONFIG_APDS9802ALS=yCONFIG_ISL29003=yCONFIG_ISL29020=yCONFIG_SENSORS_TSL2550=yCONFIG_SENSORS_BH1770=yCONFIG_SENSORS_APDS990X=yCONFIG_HMC6352=yCONFIG_DS1682=yCONFIG_PCH_PHUB=yCONFIG_LATTICE_ECP3_CONFIG=yCONFIG_SRAM=yCONFIG_DW_XDATA_PCIE=yCONFIG_PCI_ENDPOINT_TEST=yCONFIG_XILINX_SDFEC=yCONFIG_MISC_RTSX=yCONFIG_HISI_HIKEY_USB=yCONFIG_OPEN_DICE=yCONFIG_VCPU_STALL_DETECTOR=yCONFIG_C2PORT=y
#
# EEPROM support
#CONFIG_EEPROM_AT24=yCONFIG_EEPROM_AT25=yCONFIG_EEPROM_LEGACY=yCONFIG_EEPROM_MAX6875=yCONFIG_EEPROM_93CX6=yCONFIG_EEPROM_93XX46=yCONFIG_EEPROM_IDT_89HPESX=yCONFIG_EEPROM_EE1004=y
# end of EEPROM support
CONFIG_CB710_CORE=yCONFIG_CB710_DEBUG=yCONFIG_CB710_DEBUG_ASSUMPTIONS=y
#
# Texas Instruments shared transport line discipline #CONFIG_TI_ST=y
# end of Texas Instruments shared transport line discipline
CONFIG_SENSORS_LIS3_SPI=yCONFIG_SENSORS_LIS3_I2C=yCONFIG_ALTERA_STAPL=yCONFIG_GENWQE=yCONFIG_GENWQE_PLATFORM_ERROR_RECOVERY=0CONFIG_ECHO=yCONFIG_BCM_VK=yCONFIG_BCM_VK_TTY=yCONFIG_MISC_ALCOR_PCI=yCONFIG_MISC_RTSX_PCI=yCONFIG_MISC_RTSX_USB=yCONFIG_HABANA_AI=yCONFIG_UACCE=yCONFIG_PVPANIC=yCONFIG_PVPANIC_MMIO=yCONFIG_PVPANIC_PCI=yCONFIG_GP_PCI1XXXX=y
# end of Misc devices
#
# SCSI device support
#CONFIG_SCSI_MOD=yCONFIG_RAID_ATTRS=yCONFIG_SCSI_COMMON=yCONFIG_SCSI=yCONFIG_SCSI_DMA=yCONFIG_SCSI_NETLINK=yCONFIG_SCSI_PROC_FS=y
#
# SCSI support type (disk, tape, CD-ROM)
#CONFIG_BLK_DEV_SD=yCONFIG_CHR_DEV_ST=yCONFIG_BLK_DEV_SR=yCONFIG_CHR_DEV_SG=yCONFIG_BLK_DEV_BSG=yCONFIG_CHR_DEV_SCH=yCONFIG_SCSI_ENCLOSURE=yCONFIG_SCSI_CONSTANTS=yCONFIG_SCSI_LOGGING=yCONFIG_SCSI_SCAN_ASYNC=y
#
# SCSI Transports
#CONFIG_SCSI_SPI_ATTRS=yCONFIG_SCSI_FC_ATTRS=yCONFIG_SCSI_ISCSI_ATTRS=yCONFIG_SCSI_SAS_ATTRS=yCONFIG_SCSI_SAS_LIBSAS=yCONFIG_SCSI_SAS_ATA=yCONFIG_SCSI_SAS_HOST_SMP=yCONFIG_SCSI_SRP_ATTRS=y
# end of SCSI Transports
CONFIG_SCSI_LOWLEVEL=yCONFIG_ISCSI_TCP=yCONFIG_ISCSI_BOOT_SYSFS=yCONFIG_SCSI_CXGB3_ISCSI=yCONFIG_SCSI_CXGB4_ISCSI=yCONFIG_SCSI_BNX2_ISCSI=yCONFIG_SCSI_BNX2X_FCOE=yCONFIG_BE2ISCSI=yCONFIG_BLK_DEV_3W_XXXX_RAID=yCONFIG_SCSI_HPSA=yCONFIG_SCSI_3W_9XXX=yCONFIG_SCSI_3W_SAS=yCONFIG_SCSI_ACARD=yCONFIG_SCSI_AACRAID=yCONFIG_SCSI_AIC7XXX=yCONFIG_AIC7XXX_CMDS_PER_DEVICE=32CONFIG_AIC7XXX_RESET_DELAY_MS=5000CONFIG_AIC7XXX_DEBUG_ENABLE=yCONFIG_AIC7XXX_DEBUG_MASK=0CONFIG_AIC7XXX_REG_PRETTY_PRINT=yCONFIG_SCSI_AIC79XX=yCONFIG_AIC79XX_CMDS_PER_DEVICE=32CONFIG_AIC79XX_RESET_DELAY_MS=5000CONFIG_AIC79XX_DEBUG_ENABLE=yCONFIG_AIC79XX_DEBUG_MASK=0CONFIG_AIC79XX_REG_PRETTY_PRINT=yCONFIG_SCSI_AIC94XX=yCONFIG_AIC94XX_DEBUG=yCONFIG_SCSI_HISI_SAS=yCONFIG_SCSI_HISI_SAS_DEBUGFS_DEFAULT_ENABLE=yCONFIG_SCSI_MVSAS=yCONFIG_SCSI_MVSAS_DEBUG=yCONFIG_SCSI_MVSAS_TASKLET=yCONFIG_SCSI_MVUMI=yCONFIG_SCSI_ADVANSYS=yCONFIG_SCSI_ARCMSR=yCONFIG_SCSI_ESAS2R=yCONFIG_MEGARAID_NEWGEN=yCONFIG_MEGARAID_MM=yCONFIG_MEGARAID_MAILBOX=yCONFIG_MEGARAID_LEGACY=yCONFIG_MEGARAID_SAS=yCONFIG_SCSI_MPT3SAS=yCONFIG_SCSI_MPT2SAS_MAX_SGE=128CONFIG_SCSI_MPT3SAS_MAX_SGE=128CONFIG_SCSI_MPT2SAS=yCONFIG_SCSI_MPI3MR=yCONFIG_SCSI_SMARTPQI=yCONFIG_SCSI_HPTIOP=yCONFIG_SCSI_BUSLOGIC=yCONFIG_SCSI_FLASHPOINT=yCONFIG_SCSI_MYRB=yCONFIG_SCSI_MYRS=yCONFIG_LIBFC=yCONFIG_LIBFCOE=yCONFIG_FCOE=yCONFIG_SCSI_SNIC=yCONFIG_SCSI_SNIC_DEBUG_FS=yCONFIG_SCSI_DMX3191D=yCONFIG_SCSI_FDOMAIN=yCONFIG_SCSI_FDOMAIN_PCI=yCONFIG_SCSI_IPS=yCONFIG_SCSI_INITIO=yCONFIG_SCSI_INIA100=yCONFIG_SCSI_PPA=yCONFIG_SCSI_IMM=yCONFIG_SCSI_IZIP_EPP16=yCONFIG_SCSI_IZIP_SLOW_CTR=yCONFIG_SCSI_STEX=yCONFIG_SCSI_SYM53C8XX_2=yCONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64CONFIG_SCSI_SYM53C8XX_MMIO=yCONFIG_SCSI_IPR=yCONFIG_SCSI_IPR_TRACE=yCONFIG_SCSI_IPR_DUMP=yCONFIG_SCSI_QLOGIC_1280=yCONFIG_SCSI_QLOGICPTI=yCONFIG_SCSI_QLA_FC=yCONFIG_TCM_QLA2XXX=yCONFIG_TCM_QLA2XXX_DEBUG=yCONFIG_SCSI_QLA_ISCSI=yCONFIG_QEDI=yCONFIG_QEDF=yCONFIG_SCSI_LPFC=yCONFIG_SCSI_LPFC_DEBUG_FS=yCONFIG_SCSI_EFCT=y
CONFIG_SCSI_DC395x=yCONFIG_SCSI_AM53C974=yCONFIG_SCSI_WD719X=yCONFIG_SCSI_DEBUG=yCONFIG_SCSI_SUNESP=yCONFIG_SCSI_PMCRAID=yCONFIG_SCSI_PM8001=yCONFIG_SCSI_BFA_FC=yCONFIG_SCSI_VIRTIO=yCONFIG_SCSI_CHELSIO_FCOE=yCONFIG_SCSI_LOWLEVEL_PCMCIA=yCONFIG_PCMCIA_AHA152X=mCONFIG_PCMCIA_FDOMAIN=mCONFIG_PCMCIA_NINJA_SCSI=mCONFIG_PCMCIA_QLOGIC=mCONFIG_PCMCIA_SYM53C500=mCONFIG_SCSI_DH=yCONFIG_SCSI_DH_RDAC=yCONFIG_SCSI_DH_HP_SW=yCONFIG_SCSI_DH_EMC=yCONFIG_SCSI_DH_ALUA=y
# end of SCSI device support
CONFIG_ATA=yCONFIG_SATA_HOST=yCONFIG_PATA_TIMINGS=yCONFIG_ATA_VERBOSE_ERROR=yCONFIG_ATA_FORCE=yCONFIG_SATA_PMP=y
#
# Controllers with non-SFF native interface
#CONFIG_SATA_AHCI=yCONFIG_SATA_MOBILE_LPM_POLICY=0CONFIG_SATA_AHCI_PLATFORM=yCONFIG_AHCI_BRCM=yCONFIG_AHCI_DA850=yCONFIG_AHCI_DM816=yCONFIG_AHCI_DWC=yCONFIG_AHCI_ST=yCONFIG_AHCI_IMX=yCONFIG_AHCI_CEVA=yCONFIG_AHCI_MTK=yCONFIG_AHCI_MVEBU=yCONFIG_AHCI_SUNXI=yCONFIG_AHCI_TEGRA=yCONFIG_AHCI_XGENE=yCONFIG_AHCI_QORIQ=yCONFIG_SATA_FSL=yCONFIG_SATA_GEMINI=yCONFIG_SATA_AHCI_SEATTLE=yCONFIG_SATA_INIC162X=yCONFIG_SATA_ACARD_AHCI=yCONFIG_SATA_SIL24=yCONFIG_ATA_SFF=y
#
# SFF controllers with custom DMA interface
#CONFIG_PDC_ADMA=yCONFIG_SATA_QSTOR=yCONFIG_SATA_SX4=yCONFIG_ATA_BMDMA=y
#
# SATA SFF controllers with BMDMA
#CONFIG_ATA_PIIX=yCONFIG_SATA_DWC=yCONFIG_SATA_DWC_OLD_DMA=yCONFIG_SATA_HIGHBANK=yCONFIG_SATA_MV=yCONFIG_SATA_NV=yCONFIG_SATA_PROMISE=yCONFIG_SATA_RCAR=yCONFIG_SATA_SIL=yCONFIG_SATA_SIS=yCONFIG_SATA_SVW=yCONFIG_SATA_ULI=yCONFIG_SATA_VIA=yCONFIG_SATA_VITESSE=y
#
# PATA SFF controllers with BMDMA
#CONFIG_PATA_ALI=yCONFIG_PATA_AMD=yCONFIG_PATA_ARASAN_CF=yCONFIG_PATA_ARTOP=yCONFIG_PATA_ATIIXP=yCONFIG_PATA_ATP867X=yCONFIG_PATA_BK3710=yCONFIG_PATA_CMD64X=yCONFIG_PATA_CS5520=yCONFIG_PATA_CS5530=yCONFIG_PATA_CS5536=yCONFIG_PATA_CYPRESS=yCONFIG_PATA_EFAR=yCONFIG_PATA_FTIDE010=yCONFIG_PATA_HPT366=yCONFIG_PATA_HPT37X=yCONFIG_PATA_HPT3X2N=yCONFIG_PATA_HPT3X3=yCONFIG_PATA_HPT3X3_DMA=yCONFIG_PATA_IMX=yCONFIG_PATA_IT8213=yCONFIG_PATA_IT821X=yCONFIG_PATA_JMICRON=yCONFIG_PATA_MARVELL=yCONFIG_PATA_NETCELL=yCONFIG_PATA_NINJA32=yCONFIG_PATA_NS87415=yCONFIG_PATA_OLDPIIX=yCONFIG_PATA_OPTIDMA=yCONFIG_PATA_PDC2027X=yCONFIG_PATA_PDC_OLD=yCONFIG_PATA_RADISYS=yCONFIG_PATA_RDC=yCONFIG_PATA_SC1200=yCONFIG_PATA_SCH=yCONFIG_PATA_SERVERWORKS=yCONFIG_PATA_SIL680=yCONFIG_PATA_SIS=yCONFIG_PATA_TOSHIBA=yCONFIG_PATA_TRIFLEX=yCONFIG_PATA_VIA=yCONFIG_PATA_PXA=yCONFIG_PATA_WINBOND=y
#
# PIO-only SFF controllers
#CONFIG_PATA_CMD640_PCI=yCONFIG_PATA_IXP4XX_CF=yCONFIG_PATA_MPIIX=yCONFIG_PATA_NS87410=yCONFIG_PATA_OPTI=yCONFIG_PATA_PCMCIA=yCONFIG_PATA_PLATFORM=yCONFIG_PATA_OF_PLATFORM=yCONFIG_PATA_RZ1000=yCONFIG_PATA_SAMSUNG_CF=y
#
# Generic fallback / legacy drivers
#CONFIG_ATA_GENERIC=yCONFIG_PATA_LEGACY=yCONFIG_MD=yCONFIG_BLK_DEV_MD=yCONFIG_MD_AUTODETECT=yCONFIG_MD_LINEAR=yCONFIG_MD_RAID0=yCONFIG_MD_RAID1=yCONFIG_MD_RAID10=yCONFIG_MD_RAID456=yCONFIG_MD_MULTIPATH=yCONFIG_MD_FAULTY=yCONFIG_MD_CLUSTER=yCONFIG_BCACHE=yCONFIG_BCACHE_DEBUG=y CONFIG_BCACHE_CLOSURES_DEBUG=y CONFIG_BCACHE_ASYNC_REGISTRATION=y CONFIG_BLK_DEV_DM_BUILTIN=yCONFIG_BLK_DEV_DM=yCONFIG_DM_DEBUG=yCONFIG_DM_BUFIO=y CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING=y CONFIG_DM_DEBUG_BLOCK_STACK_TRACING=y CONFIG_DM_BIO_PRISON=y CONFIG_DM_PERSISTENT_DATA=y CONFIG_DM_UNSTRIPED=yCONFIG_DM_CRYPT=yCONFIG_DM_SNAPSHOT=y CONFIG_DM_THIN_PROVISIONING=yCONFIG_DM_CACHE=yCONFIG_DM_CACHE_SMQ=yCONFIG_DM_WRITECACHE=yCONFIG_DM_EBS=yCONFIG_DM_ERA=yCONFIG_DM_CLONE=yCONFIG_DM_MIRROR=yCONFIG_DM_LOG_USERSPACE=yCONFIG_DM_RAID=yCONFIG_DM_ZERO=yCONFIG_DM_MULTIPATH=yCONFIG_DM_MULTIPATH_QL=y CONFIG_DM_MULTIPATH_ST=y CONFIG_DM_MULTIPATH_HST=y CONFIG_DM_MULTIPATH_IOA=yCONFIG_DM_DELAY=yCONFIG_DM_DUST=yCONFIG_DM_INIT=yCONFIG_DM_UEVENT=yCONFIG_DM_FLAKEY=yCONFIG_DM_VERITY=y CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG=y CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG_SECONDARY_KEYRING=y CONFIG_DM_VERITY_FEC=yCONFIG_DM_SWITCH=yCONFIG_DM_LOG_WRITES=yCONFIG_DM_INTEGRITY=yCONFIG_DM_ZONED=yCONFIG_DM_AUDIT=yCONFIG_TARGET_CORE=yCONFIG_TCM_IBLOCK=yCONFIG_TCM_FILEIO=yCONFIG_TCM_PSCSI=yCONFIG_TCM_USER2=yCONFIG_LOOPBACK_TARGET=yCONFIG_TCM_FC=yCONFIG_ISCSI_TARGET=y CONFIG_ISCSI_TARGET_CXGB4=yCONFIG_SBP_TARGET=yCONFIG_FUSION=yCONFIG_FUSION_SPI=yCONFIG_FUSION_FC=yCONFIG_FUSION_SAS=yCONFIG_FUSION_MAX_SGE=128CONFIG_FUSION_CTL=yCONFIG_FUSION_LAN=yCONFIG_FUSION_LOGGING=y
#
# IEEE 1394 (FireWire) support
#CONFIG_FIREWIRE=yCONFIG_FIREWIRE_OHCI=yCONFIG_FIREWIRE_SBP2=yCONFIG_FIREWIRE_NET=yCONFIG_FIREWIRE_NOSY=y
# end of IEEE 1394 (FireWire) support
CONFIG_NETDEVICES=yCONFIG_MII=yCONFIG_NET_CORE=yCONFIG_BONDING=yCONFIG_DUMMY=yCONFIG_WIREGUARD=yCONFIG_WIREGUARD_DEBUG=yCONFIG_EQUALIZER=yCONFIG_NET_FC=yCONFIG_IFB=yCONFIG_NET_TEAM=yCONFIG_NET_TEAM_MODE_BROADCAST=yCONFIG_NET_TEAM_MODE_ROUNDROBIN=yCONFIG_NET_TEAM_MODE_RANDOM=yCONFIG_NET_TEAM_MODE_ACTIVEBACKUP=yCONFIG_NET_TEAM_MODE_LOADBALANCE=yCONFIG_MACVLAN=yCONFIG_MACVTAP=yCONFIG_IPVLAN_L3S=yCONFIG_IPVLAN=yCONFIG_IPVTAP=yCONFIG_VXLAN=yCONFIG_GENEVE=yCONFIG_BAREUDP=yCONFIG_GTP=yCONFIG_AMT=yCONFIG_MACSEC=yCONFIG_NETCONSOLE=yCONFIG_NETCONSOLE_DYNAMIC=yCONFIG_NETPOLL=yCONFIG_NET_POLL_CONTROLLER=yCONFIG_NTB_NETDEV=yCONFIG_RIONET=yCONFIG_RIONET_TX_SIZE=128CONFIG_RIONET_RX_SIZE=128CONFIG_TUN=yCONFIG_TAP=yCONFIG_TUN_VNET_CROSS_LE=yCONFIG_VETH=yCONFIG_VIRTIO_NET=yCONFIG_NLMON=yCONFIG_NET_VRF=yCONFIG_VSOCKMON=yCONFIG_MHI_NET=yCONFIG_SUNGEM_PHY=yCONFIG_ARCNET=yCONFIG_ARCNET_1201=yCONFIG_ARCNET_1051=yCONFIG_ARCNET_RAW=yCONFIG_ARCNET_CAP=y
CONFIG_ARCNET_COM90xx=y
CONFIG_ARCNET_COM90xxIO=yCONFIG_ARCNET_RIM_I=yCONFIG_ARCNET_COM20020=yCONFIG_ARCNET_COM20020_PCI=yCONFIG_ARCNET_COM20020_CS=yCONFIG_ATM_DRIVERS=yCONFIG_ATM_DUMMY=yCONFIG_ATM_TCP=yCONFIG_ATM_LANAI=yCONFIG_ATM_ENI=yCONFIG_ATM_ENI_DEBUG=yCONFIG_ATM_ENI_TUNE_BURST=yCONFIG_ATM_ENI_BURST_TX_16W=yCONFIG_ATM_ENI_BURST_TX_8W=yCONFIG_ATM_ENI_BURST_TX_4W=yCONFIG_ATM_ENI_BURST_TX_2W=yCONFIG_ATM_ENI_BURST_RX_16W=yCONFIG_ATM_ENI_BURST_RX_8W=yCONFIG_ATM_ENI_BURST_RX_4W=yCONFIG_ATM_ENI_BURST_RX_2W=yCONFIG_ATM_NICSTAR=yCONFIG_ATM_NICSTAR_USE_SUNI=yCONFIG_ATM_NICSTAR_USE_IDT77105=yCONFIG_ATM_IDT77252=yCONFIG_ATM_IDT77252_DEBUG=yCONFIG_ATM_IDT77252_RCV_ALL=yCONFIG_ATM_IDT77252_USE_SUNI=yCONFIG_ATM_IA=yCONFIG_ATM_IA_DEBUG=yCONFIG_ATM_FORE200E=yCONFIG_ATM_FORE200E_USE_TASKLET=yCONFIG_ATM_FORE200E_TX_RETRY=16CONFIG_ATM_FORE200E_DEBUG=0CONFIG_ATM_HE=yCONFIG_ATM_HE_USE_SUNI=yCONFIG_ATM_SOLOS=yCONFIG_CAIF_DRIVERS=yCONFIG_CAIF_TTY=yCONFIG_CAIF_VIRTIO=y
#
# Distributed Switch Architecture drivers
#CONFIG_B53=yCONFIG_B53_SPI_DRIVER=yCONFIG_B53_MDIO_DRIVER=yCONFIG_B53_MMAP_DRIVER=yCONFIG_B53_SRAB_DRIVER=yCONFIG_B53_SERDES=yCONFIG_NET_DSA_BCM_SF2=yCONFIG_NET_DSA_LOOP=yCONFIG_NET_DSA_HIRSCHMANN_HELLCREEK=yCONFIG_NET_DSA_LANTIQ_GSWIP=yCONFIG_NET_DSA_MT7530=yCONFIG_NET_DSA_MV88E6060=yCONFIG_NET_DSA_MICROCHIP_KSZ_COMMON=yCONFIG_NET_DSA_MICROCHIP_KSZ9477_I2C=yCONFIG_NET_DSA_MICROCHIP_KSZ_SPI=yCONFIG_NET_DSA_MICROCHIP_KSZ8863_SMI=yCONFIG_NET_DSA_MV88E6XXX=yCONFIG_NET_DSA_MV88E6XXX_PTP=yCONFIG_NET_DSA_MSCC_FELIX=yCONFIG_NET_DSA_MSCC_SEVILLE=yCONFIG_NET_DSA_AR9331=yCONFIG_NET_DSA_QCA8K=yCONFIG_NET_DSA_SJA1105=yCONFIG_NET_DSA_SJA1105_PTP=yCONFIG_NET_DSA_SJA1105_TAS=yCONFIG_NET_DSA_SJA1105_VL=yCONFIG_NET_DSA_XRS700X=yCONFIG_NET_DSA_XRS700X_I2C=yCONFIG_NET_DSA_XRS700X_MDIO=yCONFIG_NET_DSA_REALTEK=yCONFIG_NET_DSA_REALTEK_MDIO=yCONFIG_NET_DSA_REALTEK_SMI=yCONFIG_NET_DSA_REALTEK_RTL8365MB=yCONFIG_NET_DSA_REALTEK_RTL8366RB=yCONFIG_NET_DSA_SMSC_LAN9303=yCONFIG_NET_DSA_SMSC_LAN9303_I2C=yCONFIG_NET_DSA_SMSC_LAN9303_MDIO=yCONFIG_NET_DSA_VITESSE_VSC73XX=yCONFIG_NET_DSA_VITESSE_VSC73XX_SPI=yCONFIG_NET_DSA_VITESSE_VSC73XX_PLATFORM=y
# end of Distributed Switch Architecture drivers
CONFIG_ETHERNET=yCONFIG_MDIO=yCONFIG_NET_VENDOR_3COM=yCONFIG_PCMCIA_3C574=yCONFIG_PCMCIA_3C589=yCONFIG_VORTEX=yCONFIG_TYPHOON=yCONFIG_NET_VENDOR_ACTIONS=yCONFIG_OWL_EMAC=yCONFIG_NET_VENDOR_ADAPTEC=yCONFIG_ADAPTEC_STARFIRE=yCONFIG_GRETH=yCONFIG_NET_VENDOR_AGERE=yCONFIG_ET131X=yCONFIG_NET_VENDOR_ALACRITECH=yCONFIG_SLICOSS=yCONFIG_NET_VENDOR_ALTEON=yCONFIG_ACENIC=yCONFIG_ACENIC_OMIT_TIGON_I=yCONFIG_ALTERA_TSE=yCONFIG_NET_VENDOR_AMAZON=yCONFIG_NET_VENDOR_AMD=yCONFIG_AMD8111_ETH=yCONFIG_PCNET32=yCONFIG_PCMCIA_NMCLAN=yCONFIG_SUNLANCE=yCONFIG_AMD_XGBE=yCONFIG_AMD_XGBE_DCB=yCONFIG_NET_XGENE=yCONFIG_NET_XGENE_V2=yCONFIG_NET_VENDOR_AQUANTIA=yCONFIG_AQTION=yCONFIG_NET_VENDOR_ARC=yCONFIG_NET_VENDOR_ASIX=yCONFIG_SPI_AX88796C=yCONFIG_SPI_AX88796C_COMPRESSION=yCONFIG_NET_VENDOR_ATHEROS=yCONFIG_ATL2=yCONFIG_ATL1=yCONFIG_ATL1E=yCONFIG_ATL1C=yCONFIG_ALX=yCONFIG_CX_ECAT=yCONFIG_NET_VENDOR_BROADCOM=yCONFIG_B44=yCONFIG_B44_PCI_AUTOSELECT=yCONFIG_B44_PCICORE_AUTOSELECT=yCONFIG_B44_PCI=yCONFIG_BCM4908_ENET=yCONFIG_BCMGENET=yCONFIG_BNX2=yCONFIG_CNIC=yCONFIG_TIGON3=yCONFIG_TIGON3_HWMON=yCONFIG_BNX2X=yCONFIG_BNX2X_SRIOV=yCONFIG_BGMAC=yCONFIG_BGMAC_BCMA=yCONFIG_BGMAC_PLATFORM=yCONFIG_SYSTEMPORT=yCONFIG_BNXT=yCONFIG_BNXT_SRIOV=yCONFIG_BNXT_FLOWER_OFFLOAD=yCONFIG_BNXT_DCB=yCONFIG_BNXT_HWMON=yCONFIG_NET_VENDOR_CADENCE=yCONFIG_MACB=yCONFIG_MACB_USE_HWSTAMP=yCONFIG_MACB_PCI=yCONFIG_NET_CALXEDA_XGMAC=yCONFIG_NET_VENDOR_CAVIUM=yCONFIG_THUNDER_NIC_PF=yCONFIG_THUNDER_NIC_VF=yCONFIG_THUNDER_NIC_BGX=yCONFIG_THUNDER_NIC_RGX=yCONFIG_CAVIUM_PTP=yCONFIG_LIQUIDIO=yCONFIG_LIQUIDIO_VF=yCONFIG_NET_VENDOR_CHELSIO=yCONFIG_CHELSIO_T1=yCONFIG_CHELSIO_T1_1G=yCONFIG_CHELSIO_T3=yCONFIG_CHELSIO_T4=yCONFIG_CHELSIO_T4_DCB=yCONFIG_CHELSIO_T4_FCOE=yCONFIG_CHELSIO_T4VF=yCONFIG_CHELSIO_LIB=yCONFIG_CHELSIO_INLINE_CRYPTO=yCONFIG_CRYPTO_DEV_CHELSIO_TLS=yCONFIG_CHELSIO_IPSEC_INLINE=yCONFIG_CHELSIO_TLS_DEVICE=yCONFIG_NET_VENDOR_CIRRUS=y
CONFIG_CS89x0=y
CONFIG_CS89x0_PLATFORM=yCONFIG_EP93XX_ETH=yCONFIG_NET_VENDOR_CISCO=yCONFIG_ENIC=yCONFIG_NET_VENDOR_CORTINA=yCONFIG_GEMINI_ETHERNET=yCONFIG_NET_VENDOR_DAVICOM=yCONFIG_DM9000=yCONFIG_DM9000_FORCE_SIMPLE_PHY_POLL=yCONFIG_DM9051=yCONFIG_DNET=yCONFIG_NET_VENDOR_DEC=yCONFIG_NET_TULIP=yCONFIG_DE2104X=yCONFIG_DE2104X_DSL=0CONFIG_TULIP=yCONFIG_TULIP_MWI=yCONFIG_TULIP_MMIO=yCONFIG_TULIP_NAPI=yCONFIG_TULIP_NAPI_HW_MITIGATION=yCONFIG_TULIP_DM910X=yCONFIG_WINBOND_840=yCONFIG_DM9102=yCONFIG_ULI526X=yCONFIG_PCMCIA_XIRCOM=yCONFIG_NET_VENDOR_DLINK=yCONFIG_DL2K=yCONFIG_SUNDANCE=yCONFIG_SUNDANCE_MMIO=yCONFIG_NET_VENDOR_EMULEX=yCONFIG_BE2NET=yCONFIG_BE2NET_HWMON=yCONFIG_BE2NET_BE2=yCONFIG_BE2NET_BE3=yCONFIG_BE2NET_LANCER=yCONFIG_BE2NET_SKYHAWK=yCONFIG_NET_VENDOR_ENGLEDER=yCONFIG_TSNEP=yCONFIG_TSNEP_SELFTESTS=yCONFIG_NET_VENDOR_EZCHIP=yCONFIG_NET_VENDOR_FARADAY=yCONFIG_NET_VENDOR_FREESCALE=yCONFIG_FEC=yCONFIG_FSL_FMAN=yCONFIG_FSL_PQ_MDIO=yCONFIG_FSL_XGMAC_MDIO=yCONFIG_GIANFAR=yCONFIG_FSL_DPAA2_SWITCH=yCONFIG_FSL_ENETC=yCONFIG_FSL_ENETC_VF=yCONFIG_FSL_ENETC_IERB=yCONFIG_FSL_ENETC_MDIO=yCONFIG_FSL_ENETC_PTP_CLOCK=yCONFIG_FSL_ENETC_QOS=yCONFIG_NET_VENDOR_FUJITSU=yCONFIG_PCMCIA_FMVJ18X=yCONFIG_NET_VENDOR_FUNGIBLE=yCONFIG_FUN_CORE=yCONFIG_FUN_ETH=yCONFIG_NET_VENDOR_GOOGLE=yCONFIG_NET_VENDOR_HISILICON=yCONFIG_HIX5HD2_GMAC=yCONFIG_HISI_FEMAC=yCONFIG_HIP04_ETH=yCONFIG_HI13X1_GMAC=yCONFIG_HNS_MDIO=yCONFIG_HNS=yCONFIG_HNS_DSAF=yCONFIG_HNS_ENET=yCONFIG_HNS3=yCONFIG_HNS3_HCLGE=yCONFIG_HNS3_DCB=yCONFIG_HNS3_HCLGEVF=yCONFIG_HNS3_ENET=yCONFIG_NET_VENDOR_HUAWEI=yCONFIG_NET_VENDOR_I825XX=yCONFIG_NET_VENDOR_INTEL=yCONFIG_E100=yCONFIG_E1000=yCONFIG_E1000E=yCONFIG_IGB=yCONFIG_IGB_HWMON=yCONFIG_IGBVF=yCONFIG_IXGB=yCONFIG_IXGBE=yCONFIG_IXGBE_HWMON=yCONFIG_IXGBE_DCB=yCONFIG_IXGBE_IPSEC=yCONFIG_IXGBEVF=yCONFIG_IXGBEVF_IPSEC=yCONFIG_I40E=yCONFIG_I40E_DCB=yCONFIG_IAVF=yCONFIG_I40EVF=yCONFIG_ICE=yCONFIG_ICE_SWITCHDEV=yCONFIG_FM10K=yCONFIG_IGC=yCONFIG_NET_VENDOR_WANGXUN=yCONFIG_NGBE=yCONFIG_TXGBE=yCONFIG_JME=yCONFIG_KORINA=yCONFIG_NET_VENDOR_ADI=yCONFIG_ADIN1110=yCONFIG_NET_VENDOR_LITEX=yCONFIG_LITEX_LITEETH=yCONFIG_NET_VENDOR_MARVELL=yCONFIG_MV643XX_ETH=yCONFIG_MVMDIO=yCONFIG_MVNETA=yCONFIG_MVPP2=yCONFIG_MVPP2_PTP=yCONFIG_PXA168_ETH=yCONFIG_SKGE=yCONFIG_SKGE_DEBUG=yCONFIG_SKGE_GENESIS=yCONFIG_SKY2=yCONFIG_SKY2_DEBUG=yCONFIG_OCTEONTX2_MBOX=yCONFIG_OCTEONTX2_AF=yCONFIG_NDC_DIS_DYNAMIC_CACHING=yCONFIG_OCTEONTX2_PF=yCONFIG_OCTEONTX2_VF=yCONFIG_OCTEON_EP=yCONFIG_PRESTERA=yCONFIG_PRESTERA_PCI=yCONFIG_NET_VENDOR_MEDIATEK=yCONFIG_NET_MEDIATEK_SOC_WED=yCONFIG_NET_MEDIATEK_SOC=yCONFIG_NET_MEDIATEK_STAR_EMAC=yCONFIG_NET_VENDOR_MELLANOX=yCONFIG_MLX4_EN=yCONFIG_MLX4_EN_DCB=yCONFIG_MLX4_CORE=yCONFIG_MLX4_DEBUG=yCONFIG_MLX4_CORE_GEN2=yCONFIG_MLX5_CORE=yCONFIG_MLX5_FPGA=yCONFIG_MLX5_CORE_EN=yCONFIG_MLX5_EN_ARFS=yCONFIG_MLX5_EN_RXNFC=yCONFIG_MLX5_MPFS=yCONFIG_MLX5_ESWITCH=yCONFIG_MLX5_BRIDGE=yCONFIG_MLX5_CLS_ACT=yCONFIG_MLX5_TC_CT=yCONFIG_MLX5_TC_SAMPLE=yCONFIG_MLX5_CORE_EN_DCB=yCONFIG_MLX5_CORE_IPOIB=yCONFIG_MLX5_EN_MACSEC=yCONFIG_MLX5_EN_IPSEC=yCONFIG_MLX5_EN_TLS=yCONFIG_MLX5_SW_STEERING=yCONFIG_MLX5_SF=yCONFIG_MLX5_SF_MANAGER=yCONFIG_MLXSW_CORE=yCONFIG_MLXSW_CORE_HWMON=yCONFIG_MLXSW_CORE_THERMAL=yCONFIG_MLXSW_PCI=yCONFIG_MLXSW_I2C=yCONFIG_MLXSW_SPECTRUM=yCONFIG_MLXSW_SPECTRUM_DCB=yCONFIG_MLXSW_MINIMAL=yCONFIG_MLXFW=yCONFIG_MLXBF_GIGE=yCONFIG_NET_VENDOR_MICREL=yCONFIG_KS8842=yCONFIG_KS8851=yCONFIG_KS8851_MLL=yCONFIG_KSZ884X_PCI=yCONFIG_NET_VENDOR_MICROCHIP=yCONFIG_ENC28J60=yCONFIG_ENC28J60_WRITEVERIFY=yCONFIG_ENCX24J600=yCONFIG_LAN743X=yCONFIG_LAN966X_SWITCH=yCONFIG_SPARX5_SWITCH=yCONFIG_NET_VENDOR_MICROSEMI=yCONFIG_MSCC_OCELOT_SWITCH_LIB=yCONFIG_MSCC_OCELOT_SWITCH=yCONFIG_NET_VENDOR_MICROSOFT=yCONFIG_NET_VENDOR_MYRI=yCONFIG_MYRI10GE=yCONFIG_FEALNX=yCONFIG_NET_VENDOR_NI=yCONFIG_NI_XGE_MANAGEMENT_ENET=yCONFIG_NET_VENDOR_NATSEMI=yCONFIG_NATSEMI=yCONFIG_NS83820=yCONFIG_NET_VENDOR_NETERION=yCONFIG_S2IO=yCONFIG_NET_VENDOR_NETRONOME=yCONFIG_NFP=yCONFIG_NFP_APP_FLOWER=yCONFIG_NFP_APP_ABM_NIC=yCONFIG_NFP_DEBUG=yCONFIG_NET_VENDOR_8390=yCONFIG_PCMCIA_AXNET=yCONFIG_AX88796=yCONFIG_AX88796_93CX6=yCONFIG_NE2K_PCI=yCONFIG_PCMCIA_PCNET=yCONFIG_NET_VENDOR_NVIDIA=yCONFIG_FORCEDETH=yCONFIG_LPC_ENET=yCONFIG_NET_VENDOR_OKI=yCONFIG_PCH_GBE=yCONFIG_ETHOC=yCONFIG_NET_VENDOR_PACKET_ENGINES=yCONFIG_HAMACHI=yCONFIG_YELLOWFIN=yCONFIG_NET_VENDOR_PENSANDO=yCONFIG_IONIC=yCONFIG_NET_VENDOR_QLOGIC=yCONFIG_QLA3XXX=yCONFIG_QLCNIC=yCONFIG_QLCNIC_SRIOV=yCONFIG_QLCNIC_DCB=yCONFIG_QLCNIC_HWMON=yCONFIG_NETXEN_NIC=yCONFIG_QED=yCONFIG_QED_LL2=yCONFIG_QED_SRIOV=yCONFIG_QEDE=yCONFIG_QED_RDMA=yCONFIG_QED_ISCSI=yCONFIG_QED_FCOE=yCONFIG_QED_OOO=yCONFIG_NET_VENDOR_BROCADE=yCONFIG_BNA=yCONFIG_NET_VENDOR_QUALCOMM=yCONFIG_QCA7000=yCONFIG_QCA7000_SPI=yCONFIG_QCA7000_UART=yCONFIG_QCOM_EMAC=yCONFIG_RMNET=yCONFIG_NET_VENDOR_RDC=yCONFIG_R6040=yCONFIG_NET_VENDOR_REALTEK=yCONFIG_8139CP=yCONFIG_8139TOO=yCONFIG_8139TOO_PIO=yCONFIG_8139TOO_TUNE_TWISTER=yCONFIG_8139TOO_8129=yCONFIG_8139_OLD_RX_RESET=yCONFIG_R8169=yCONFIG_NET_VENDOR_RENESAS=yCONFIG_SH_ETH=yCONFIG_RAVB=yCONFIG_NET_VENDOR_ROCKER=yCONFIG_ROCKER=yCONFIG_NET_VENDOR_SAMSUNG=yCONFIG_SXGBE_ETH=yCONFIG_NET_VENDOR_SEEQ=yCONFIG_NET_VENDOR_SILAN=yCONFIG_SC92031=yCONFIG_NET_VENDOR_SIS=yCONFIG_SIS900=yCONFIG_SIS190=yCONFIG_NET_VENDOR_SOLARFLARE=yCONFIG_SFC=yCONFIG_SFC_MTD=yCONFIG_SFC_MCDI_MON=yCONFIG_SFC_SRIOV=yCONFIG_SFC_MCDI_LOGGING=yCONFIG_SFC_FALCON=yCONFIG_SFC_FALCON_MTD=yCONFIG_SFC_SIENA=yCONFIG_SFC_SIENA_MTD=yCONFIG_SFC_SIENA_MCDI_MON=yCONFIG_SFC_SIENA_SRIOV=yCONFIG_SFC_SIENA_MCDI_LOGGING=yCONFIG_NET_VENDOR_SMSC=yCONFIG_SMC91X=yCONFIG_PCMCIA_SMC91C92=yCONFIG_EPIC100=yCONFIG_SMC911X=yCONFIG_SMSC911X=yCONFIG_SMSC9420=yCONFIG_NET_VENDOR_SOCIONEXT=yCONFIG_SNI_AVE=yCONFIG_SNI_NETSEC=yCONFIG_NET_VENDOR_STMICRO=yCONFIG_STMMAC_ETH=yCONFIG_STMMAC_SELFTESTS=yCONFIG_STMMAC_PLATFORM=yCONFIG_DWMAC_DWC_QOS_ETH=yCONFIG_DWMAC_GENERIC=yCONFIG_DWMAC_ANARION=yCONFIG_DWMAC_INGENIC=yCONFIG_DWMAC_IPQ806X=yCONFIG_DWMAC_LPC18XX=yCONFIG_DWMAC_MEDIATEK=yCONFIG_DWMAC_MESON=yCONFIG_DWMAC_OXNAS=yCONFIG_DWMAC_QCOM_ETHQOS=yCONFIG_DWMAC_ROCKCHIP=yCONFIG_DWMAC_SOCFPGA=yCONFIG_DWMAC_STI=yCONFIG_DWMAC_STM32=yCONFIG_DWMAC_SUNXI=yCONFIG_DWMAC_SUN8I=yCONFIG_DWMAC_IMX8=yCONFIG_DWMAC_INTEL_PLAT=yCONFIG_DWMAC_VISCONTI=yCONFIG_DWMAC_LOONGSON=yCONFIG_STMMAC_PCI=yCONFIG_NET_VENDOR_SUN=yCONFIG_HAPPYMEAL=yCONFIG_SUNBMAC=yCONFIG_SUNQE=yCONFIG_SUNGEM=yCONFIG_CASSINI=yCONFIG_SUNVNET_COMMON=yCONFIG_SUNVNET=yCONFIG_LDMVSW=yCONFIG_NIU=yCONFIG_NET_VENDOR_SUNPLUS=yCONFIG_SP7021_EMAC=yCONFIG_NET_VENDOR_SYNOPSYS=yCONFIG_DWC_XLGMAC=yCONFIG_DWC_XLGMAC_PCI=yCONFIG_NET_VENDOR_TEHUTI=yCONFIG_TEHUTI=yCONFIG_NET_VENDOR_TI=yCONFIG_TI_DAVINCI_EMAC=yCONFIG_TI_DAVINCI_MDIO=yCONFIG_TI_CPSW_PHY_SEL=yCONFIG_TI_CPSW=yCONFIG_TI_CPSW_SWITCHDEV=yCONFIG_TI_CPTS=yCONFIG_TLAN=yCONFIG_NET_VENDOR_VERTEXCOM=yCONFIG_MSE102X=yCONFIG_NET_VENDOR_VIA=yCONFIG_VIA_RHINE=yCONFIG_VIA_RHINE_MMIO=yCONFIG_VIA_VELOCITY=yCONFIG_NET_VENDOR_WIZNET=yCONFIG_WIZNET_W5100=yCONFIG_WIZNET_W5300=y
# CONFIG_WIZNET_BUS_DIRECT is not set
# CONFIG_WIZNET_BUS_INDIRECT is not setCONFIG_WIZNET_BUS_ANY=yCONFIG_WIZNET_W5100_SPI=yCONFIG_NET_VENDOR_XILINX=yCONFIG_XILINX_EMACLITE=yCONFIG_XILINX_AXI_EMAC=yCONFIG_XILINX_LL_TEMAC=yCONFIG_NET_VENDOR_XIRCOM=yCONFIG_PCMCIA_XIRC2PS=yCONFIG_FDDI=yCONFIG_DEFXX=yCONFIG_SKFP=yCONFIG_HIPPI=yCONFIG_ROADRUNNER=yCONFIG_ROADRUNNER_LARGE_RINGS=yCONFIG_QCOM_IPA=yCONFIG_PHYLINK=yCONFIG_PHYLIB=yCONFIG_SWPHY=yCONFIG_LED_TRIGGER_PHY=yCONFIG_FIXED_PHY=yCONFIG_SFP=y
#
# MII PHY device drivers
#CONFIG_AMD_PHY=yCONFIG_MESON_GXL_PHY=yCONFIG_ADIN_PHY=yCONFIG_ADIN1100_PHY=yCONFIG_AQUANTIA_PHY=yCONFIG_AX88796B_PHY=yCONFIG_BROADCOM_PHY=yCONFIG_BCM54140_PHY=yCONFIG_BCM63XX_PHY=yCONFIG_BCM7XXX_PHY=yCONFIG_BCM84881_PHY=yCONFIG_BCM87XX_PHY=yCONFIG_BCM_CYGNUS_PHY=yCONFIG_BCM_NET_PHYLIB=yCONFIG_BCM_NET_PHYPTP=yCONFIG_CICADA_PHY=yCONFIG_CORTINA_PHY=yCONFIG_DAVICOM_PHY=yCONFIG_ICPLUS_PHY=yCONFIG_LXT_PHY=yCONFIG_INTEL_XWAY_PHY=yCONFIG_LSI_ET1011C_PHY=yCONFIG_MARVELL_PHY=yCONFIG_MARVELL_10G_PHY=yCONFIG_MARVELL_88X2222_PHY=yCONFIG_MAXLINEAR_GPHY=yCONFIG_MEDIATEK_GE_PHY=yCONFIG_MICREL_PHY=yCONFIG_MICROCHIP_PHY=yCONFIG_MICROCHIP_T1_PHY=yCONFIG_MICROSEMI_PHY=yCONFIG_MOTORCOMM_PHY=yCONFIG_NATIONAL_PHY=yCONFIG_NXP_C45_TJA11XX_PHY=yCONFIG_NXP_TJA11XX_PHY=yCONFIG_AT803X_PHY=yCONFIG_QSEMI_PHY=yCONFIG_REALTEK_PHY=yCONFIG_RENESAS_PHY=yCONFIG_ROCKCHIP_PHY=yCONFIG_SMSC_PHY=yCONFIG_STE10XP=yCONFIG_TERANETICS_PHY=yCONFIG_DP83822_PHY=yCONFIG_DP83TC811_PHY=yCONFIG_DP83848_PHY=yCONFIG_DP83867_PHY=yCONFIG_DP83869_PHY=yCONFIG_DP83TD510_PHY=yCONFIG_VITESSE_PHY=yCONFIG_XILINX_GMII2RGMII=yCONFIG_MICREL_KS8995MA=yCONFIG_PSE_CONTROLLER=yCONFIG_PSE_REGULATOR=yCONFIG_CAN_DEV=yCONFIG_CAN_VCAN=yCONFIG_CAN_VXCAN=yCONFIG_CAN_NETLINK=yCONFIG_CAN_CALC_BITTIMING=yCONFIG_CAN_RX_OFFLOAD=yCONFIG_CAN_AT91=yCONFIG_CAN_CAN327=yCONFIG_CAN_FLEXCAN=yCONFIG_CAN_GRCAN=yCONFIG_CAN_JANZ_ICAN3=yCONFIG_CAN_KVASER_PCIEFD=yCONFIG_CAN_SLCAN=yCONFIG_CAN_SUN4I=yCONFIG_CAN_XILINXCAN=yCONFIG_PCH_CAN=yCONFIG_CAN_C_CAN=yCONFIG_CAN_C_CAN_PLATFORM=yCONFIG_CAN_C_CAN_PCI=yCONFIG_CAN_CC770=yCONFIG_CAN_CC770_ISA=yCONFIG_CAN_CC770_PLATFORM=yCONFIG_CAN_CTUCANFD=yCONFIG_CAN_CTUCANFD_PCI=yCONFIG_CAN_CTUCANFD_PLATFORM=yCONFIG_CAN_IFI_CANFD=yCONFIG_CAN_M_CAN=yCONFIG_CAN_M_CAN_PCI=yCONFIG_CAN_M_CAN_PLATFORM=yCONFIG_CAN_M_CAN_TCAN4X5X=yCONFIG_CAN_PEAK_PCIEFD=yCONFIG_CAN_RCAR=yCONFIG_CAN_RCAR_CANFD=yCONFIG_CAN_SJA1000=yCONFIG_CAN_EMS_PCI=yCONFIG_CAN_EMS_PCMCIA=yCONFIG_CAN_F81601=yCONFIG_CAN_KVASER_PCI=yCONFIG_CAN_PEAK_PCI=yCONFIG_CAN_PEAK_PCIEC=yCONFIG_CAN_PEAK_PCMCIA=yCONFIG_CAN_PLX_PCI=yCONFIG_CAN_SJA1000_ISA=yCONFIG_CAN_SJA1000_PLATFORM=yCONFIG_CAN_SOFTING=yCONFIG_CAN_SOFTING_CS=y
#
# CAN SPI interfaces
#CONFIG_CAN_HI311X=yCONFIG_CAN_MCP251X=yCONFIG_CAN_MCP251XFD=yCONFIG_CAN_MCP251XFD_SANITY=y
# end of CAN SPI interfaces
#
# CAN USB interfaces
#CONFIG_CAN_8DEV_USB=yCONFIG_CAN_EMS_USB=yCONFIG_CAN_ESD_USB=yCONFIG_CAN_ETAS_ES58X=yCONFIG_CAN_GS_USB=yCONFIG_CAN_KVASER_USB=yCONFIG_CAN_MCBA_USB=yCONFIG_CAN_PEAK_USB=yCONFIG_CAN_UCAN=y
# end of CAN USB interfaces
CONFIG_CAN_DEBUG_DEVICES=y
#
# MCTP Device Drivers
#CONFIG_MCTP_SERIAL=yCONFIG_MCTP_TRANSPORT_I2C=y
# end of MCTP Device Drivers
CONFIG_MDIO_DEVICE=yCONFIG_MDIO_BUS=yCONFIG_FWNODE_MDIO=yCONFIG_OF_MDIO=yCONFIG_MDIO_DEVRES=yCONFIG_MDIO_SUN4I=yCONFIG_MDIO_XGENE=yCONFIG_MDIO_ASPEED=yCONFIG_MDIO_BITBANG=yCONFIG_MDIO_BCM_IPROC=yCONFIG_MDIO_BCM_UNIMAC=yCONFIG_MDIO_CAVIUM=yCONFIG_MDIO_GPIO=yCONFIG_MDIO_HISI_FEMAC=yCONFIG_MDIO_I2C=yCONFIG_MDIO_MVUSB=yCONFIG_MDIO_MSCC_MIIM=yCONFIG_MDIO_MOXART=yCONFIG_MDIO_OCTEON=yCONFIG_MDIO_IPQ4019=yCONFIG_MDIO_IPQ8064=yCONFIG_MDIO_THUNDER=y
#
# MDIO Multiplexers
#CONFIG_MDIO_BUS_MUX=yCONFIG_MDIO_BUS_MUX_MESON_G12A=yCONFIG_MDIO_BUS_MUX_BCM6368=yCONFIG_MDIO_BUS_MUX_BCM_IPROC=yCONFIG_MDIO_BUS_MUX_GPIO=yCONFIG_MDIO_BUS_MUX_MULTIPLEXER=yCONFIG_MDIO_BUS_MUX_MMIOREG=y
#
# PCS device drivers
#CONFIG_PCS_XPCS=yCONFIG_PCS_LYNX=yCONFIG_PCS_RZN1_MIIC=yCONFIG_PCS_ALTERA_TSE=y
# end of PCS device drivers
CONFIG_PLIP=yCONFIG_PPP=yCONFIG_PPP_BSDCOMP=yCONFIG_PPP_DEFLATE=yCONFIG_PPP_FILTER=yCONFIG_PPP_MPPE=yCONFIG_PPP_MULTILINK=yCONFIG_PPPOATM=yCONFIG_PPPOE=yCONFIG_PPTP=yCONFIG_PPPOL2TP=yCONFIG_PPP_ASYNC=yCONFIG_PPP_SYNC_TTY=yCONFIG_SLIP=yCONFIG_SLHC=yCONFIG_SLIP_COMPRESSED=yCONFIG_SLIP_SMART=yCONFIG_SLIP_MODE_SLIP6=yCONFIG_USB_NET_DRIVERS=yCONFIG_USB_CATC=yCONFIG_USB_KAWETH=yCONFIG_USB_PEGASUS=yCONFIG_USB_RTL8150=yCONFIG_USB_RTL8152=yCONFIG_USB_LAN78XX=yCONFIG_USB_USBNET=yCONFIG_USB_NET_AX8817X=yCONFIG_USB_NET_AX88179_178A=yCONFIG_USB_NET_CDCETHER=yCONFIG_USB_NET_CDC_EEM=yCONFIG_USB_NET_CDC_NCM=yCONFIG_USB_NET_HUAWEI_CDC_NCM=yCONFIG_USB_NET_CDC_MBIM=yCONFIG_USB_NET_DM9601=yCONFIG_USB_NET_SR9700=yCONFIG_USB_NET_SR9800=yCONFIG_USB_NET_SMSC75XX=yCONFIG_USB_NET_SMSC95XX=yCONFIG_USB_NET_GL620A=yCONFIG_USB_NET_NET1080=yCONFIG_USB_NET_PLUSB=yCONFIG_USB_NET_MCS7830=yCONFIG_USB_NET_RNDIS_HOST=yCONFIG_USB_NET_CDC_SUBSET_ENABLE=yCONFIG_USB_NET_CDC_SUBSET=yCONFIG_USB_ALI_M5632=yCONFIG_USB_AN2720=yCONFIG_USB_BELKIN=yCONFIG_USB_ARMLINUX=yCONFIG_USB_EPSON2888=yCONFIG_USB_KC2190=yCONFIG_USB_NET_ZAURUS=yCONFIG_USB_NET_CX82310_ETH=yCONFIG_USB_NET_KALMIA=yCONFIG_USB_NET_QMI_WWAN=yCONFIG_USB_HSO=yCONFIG_USB_NET_INT51X1=yCONFIG_USB_CDC_PHONET=yCONFIG_USB_IPHETH=yCONFIG_USB_SIERRA_NET=yCONFIG_USB_VL600=yCONFIG_USB_NET_CH9200=yCONFIG_USB_NET_AQC111=yCONFIG_USB_RTL8153_ECM=yCONFIG_WLAN=yCONFIG_WLAN_VENDOR_ADMTEK=yCONFIG_ADM8211=yCONFIG_ATH_COMMON=yCONFIG_WLAN_VENDOR_ATH=yCONFIG_ATH_DEBUG=yCONFIG_ATH_TRACEPOINTS=yCONFIG_ATH_REG_DYNAMIC_USER_REG_HINTS=yCONFIG_ATH_REG_DYNAMIC_USER_CERT_TESTING=yCONFIG_ATH5K=yCONFIG_ATH5K_DEBUG=yCONFIG_ATH5K_TRACER=yCONFIG_ATH5K_PCI=yCONFIG_ATH5K_TEST_CHANNELS=yCONFIG_ATH9K_HW=yCONFIG_ATH9K_COMMON=yCONFIG_ATH9K_COMMON_DEBUG=yCONFIG_ATH9K_DFS_DEBUGFS=yCONFIG_ATH9K_BTCOEX_SUPPORT=yCONFIG_ATH9K=yCONFIG_ATH9K_PCI=yCONFIG_ATH9K_AHB=yCONFIG_ATH9K_DEBUGFS=yCONFIG_ATH9K_STATION_STATISTICS=yCONFIG_ATH9K_TX99=yCONFIG_ATH9K_DFS_CERTIFIED=yCONFIG_ATH9K_DYNACK=yCONFIG_ATH9K_WOW=yCONFIG_ATH9K_RFKILL=yCONFIG_ATH9K_CHANNEL_CONTEXT=yCONFIG_ATH9K_PCOEM=yCONFIG_ATH9K_PCI_NO_EEPROM=yCONFIG_ATH9K_HTC=yCONFIG_ATH9K_HTC_DEBUGFS=yCONFIG_ATH9K_HWRNG=yCONFIG_ATH9K_COMMON_SPECTRAL=yCONFIG_CARL9170=yCONFIG_CARL9170_LEDS=yCONFIG_CARL9170_DEBUGFS=yCONFIG_CARL9170_WPC=yCONFIG_CARL9170_HWRNG=yCONFIG_ATH6KL=yCONFIG_ATH6KL_SDIO=yCONFIG_ATH6KL_USB=yCONFIG_ATH6KL_DEBUG=yCONFIG_ATH6KL_TRACING=yCONFIG_ATH6KL_REGDOMAIN=yCONFIG_AR5523=yCONFIG_WIL6210=yCONFIG_WIL6210_ISR_COR=yCONFIG_WIL6210_TRACING=yCONFIG_WIL6210_DEBUGFS=yCONFIG_ATH10K=yCONFIG_ATH10K_CE=yCONFIG_ATH10K_PCI=yCONFIG_ATH10K_AHB=yCONFIG_ATH10K_SDIO=yCONFIG_ATH10K_USB=yCONFIG_ATH10K_SNOC=yCONFIG_ATH10K_DEBUG=yCONFIG_ATH10K_DEBUGFS=yCONFIG_ATH10K_SPECTRAL=yCONFIG_ATH10K_TRACING=yCONFIG_ATH10K_DFS_CERTIFIED=yCONFIG_WCN36XX=yCONFIG_WCN36XX_DEBUGFS=yCONFIG_ATH11K=yCONFIG_ATH11K_AHB=yCONFIG_ATH11K_PCI=yCONFIG_ATH11K_DEBUG=yCONFIG_ATH11K_DEBUGFS=yCONFIG_ATH11K_TRACING=yCONFIG_ATH11K_SPECTRAL=yCONFIG_WLAN_VENDOR_ATMEL=yCONFIG_ATMEL=yCONFIG_PCI_ATMEL=yCONFIG_PCMCIA_ATMEL=yCONFIG_AT76C50X_USB=yCONFIG_WLAN_VENDOR_BROADCOM=yCONFIG_B43=yCONFIG_B43_BCMA=yCONFIG_B43_SSB=yCONFIG_B43_BUSES_BCMA_AND_SSB=y
# CONFIG_B43_BUSES_BCMA is not set
# CONFIG_B43_BUSES_SSB is not setCONFIG_B43_PCI_AUTOSELECT=yCONFIG_B43_PCICORE_AUTOSELECT=yCONFIG_B43_SDIO=yCONFIG_B43_BCMA_PIO=yCONFIG_B43_PIO=yCONFIG_B43_PHY_G=yCONFIG_B43_PHY_N=yCONFIG_B43_PHY_LP=yCONFIG_B43_PHY_HT=yCONFIG_B43_LEDS=yCONFIG_B43_HWRNG=yCONFIG_B43_DEBUG=yCONFIG_B43LEGACY=yCONFIG_B43LEGACY_PCI_AUTOSELECT=yCONFIG_B43LEGACY_PCICORE_AUTOSELECT=yCONFIG_B43LEGACY_LEDS=yCONFIG_B43LEGACY_HWRNG=yCONFIG_B43LEGACY_DEBUG=yCONFIG_B43LEGACY_DMA=yCONFIG_B43LEGACY_PIO=yCONFIG_B43LEGACY_DMA_AND_PIO_MODE=y
# CONFIG_B43LEGACY_DMA_MODE is not set
# CONFIG_B43LEGACY_PIO_MODE is not setCONFIG_BRCMUTIL=yCONFIG_BRCMSMAC=yCONFIG_BRCMSMAC_LEDS=yCONFIG_BRCMFMAC=yCONFIG_BRCMFMAC_PROTO_BCDC=yCONFIG_BRCMFMAC_PROTO_MSGBUF=yCONFIG_BRCMFMAC_SDIO=yCONFIG_BRCMFMAC_USB=yCONFIG_BRCMFMAC_PCIE=yCONFIG_BRCM_TRACING=yCONFIG_BRCMDBG=yCONFIG_WLAN_VENDOR_CISCO=yCONFIG_AIRO_CS=yCONFIG_WLAN_VENDOR_INTEL=yCONFIG_IPW2100=yCONFIG_IPW2100_MONITOR=yCONFIG_IPW2100_DEBUG=yCONFIG_IPW2200=yCONFIG_IPW2200_MONITOR=yCONFIG_IPW2200_RADIOTAP=yCONFIG_IPW2200_PROMISCUOUS=yCONFIG_IPW2200_QOS=yCONFIG_IPW2200_DEBUG=yCONFIG_LIBIPW=yCONFIG_LIBIPW_DEBUG=yCONFIG_IWLEGACY=yCONFIG_IWL4965=yCONFIG_IWL3945=y
#
# iwl3945 / iwl4965 Debugging Options # CONFIG_IWLEGACY_DEBUG=y CONFIG_IWLEGACY_DEBUGFS=y # end of iwl3945 / iwl4965 Debugging Options
CONFIG_IWLWIFI=yCONFIG_IWLWIFI_LEDS=yCONFIG_IWLDVM=yCONFIG_IWLMVM=y
#
# Debugging Options
#CONFIG_IWLWIFI_DEBUG=yCONFIG_IWLWIFI_DEBUGFS=yCONFIG_IWLWIFI_DEVICE_TRACING=y
# end of Debugging Options
CONFIG_WLAN_VENDOR_INTERSIL=yCONFIG_HOSTAP=yCONFIG_HOSTAP_FIRMWARE=yCONFIG_HOSTAP_FIRMWARE_NVRAM=yCONFIG_HOSTAP_PLX=yCONFIG_HOSTAP_PCI=yCONFIG_HOSTAP_CS=yCONFIG_HERMES=yCONFIG_HERMES_PRISM=yCONFIG_HERMES_CACHE_FW_ON_INIT=yCONFIG_PLX_HERMES=yCONFIG_TMD_HERMES=yCONFIG_NORTEL_HERMES=yCONFIG_PCI_HERMES=yCONFIG_PCMCIA_HERMES=yCONFIG_PCMCIA_SPECTRUM=yCONFIG_ORINOCO_USB=yCONFIG_P54_COMMON=yCONFIG_P54_USB=yCONFIG_P54_PCI=yCONFIG_P54_SPI=yCONFIG_P54_SPI_DEFAULT_EEPROM=yCONFIG_P54_LEDS=yCONFIG_WLAN_VENDOR_MARVELL=yCONFIG_LIBERTAS=yCONFIG_LIBERTAS_USB=yCONFIG_LIBERTAS_CS=yCONFIG_LIBERTAS_SDIO=yCONFIG_LIBERTAS_SPI=yCONFIG_LIBERTAS_DEBUG=yCONFIG_LIBERTAS_MESH=yCONFIG_LIBERTAS_THINFIRM=yCONFIG_LIBERTAS_THINFIRM_DEBUG=yCONFIG_LIBERTAS_THINFIRM_USB=yCONFIG_MWIFIEX=yCONFIG_MWIFIEX_SDIO=yCONFIG_MWIFIEX_PCIE=yCONFIG_MWIFIEX_USB=yCONFIG_MWL8K=yCONFIG_WLAN_VENDOR_MEDIATEK=yCONFIG_MT7601U=yCONFIG_MT76_CORE=yCONFIG_MT76_LEDS=yCONFIG_MT76_USB=yCONFIG_MT76_SDIO=y
CONFIG_MT76x02_LIB=y
CONFIG_MT76x02_USB=yCONFIG_MT76_CONNAC_LIB=y
CONFIG_MT76x0_COMMON=y
CONFIG_MT76x0U=y
CONFIG_MT76x0E=y
CONFIG_MT76x2_COMMON=y
CONFIG_MT76x2E=y
CONFIG_MT76x2U=yCONFIG_MT7603E=yCONFIG_MT7615_COMMON=yCONFIG_MT7615E=yCONFIG_MT7622_WMAC=yCONFIG_MT7663_USB_SDIO_COMMON=yCONFIG_MT7663U=yCONFIG_MT7663S=yCONFIG_MT7915E=yCONFIG_MT7986_WMAC=yCONFIG_MT7921_COMMON=yCONFIG_MT7921E=yCONFIG_MT7921S=yCONFIG_MT7921U=yCONFIG_WLAN_VENDOR_MICROCHIP=yCONFIG_WILC1000=yCONFIG_WILC1000_SDIO=yCONFIG_WILC1000_SPI=yCONFIG_WILC1000_HW_OOB_INTR=yCONFIG_WLAN_VENDOR_PURELIFI=yCONFIG_PLFXLC=yCONFIG_WLAN_VENDOR_RALINK=yCONFIG_RT2X00=yCONFIG_RT2400PCI=yCONFIG_RT2500PCI=yCONFIG_RT61PCI=yCONFIG_RT2800PCI=yCONFIG_RT2800PCI_RT33XX=yCONFIG_RT2800PCI_RT35XX=yCONFIG_RT2800PCI_RT53XX=yCONFIG_RT2800PCI_RT3290=yCONFIG_RT2500USB=yCONFIG_RT73USB=yCONFIG_RT2800USB=yCONFIG_RT2800USB_RT33XX=yCONFIG_RT2800USB_RT35XX=yCONFIG_RT2800USB_RT3573=yCONFIG_RT2800USB_RT53XX=yCONFIG_RT2800USB_RT55XX=yCONFIG_RT2800USB_UNKNOWN=yCONFIG_RT2800_LIB=yCONFIG_RT2800_LIB_MMIO=yCONFIG_RT2X00_LIB_MMIO=yCONFIG_RT2X00_LIB_PCI=yCONFIG_RT2X00_LIB_USB=yCONFIG_RT2X00_LIB=yCONFIG_RT2X00_LIB_FIRMWARE=yCONFIG_RT2X00_LIB_CRYPTO=yCONFIG_RT2X00_LIB_LEDS=yCONFIG_RT2X00_LIB_DEBUGFS=yCONFIG_RT2X00_DEBUG=yCONFIG_WLAN_VENDOR_REALTEK=yCONFIG_RTL8180=yCONFIG_RTL8187=yCONFIG_RTL8187_LEDS=yCONFIG_RTL_CARDS=yCONFIG_RTL8192CE=yCONFIG_RTL8192SE=yCONFIG_RTL8192DE=yCONFIG_RTL8723AE=yCONFIG_RTL8723BE=yCONFIG_RTL8188EE=yCONFIG_RTL8192EE=yCONFIG_RTL8821AE=yCONFIG_RTL8192CU=yCONFIG_RTLWIFI=yCONFIG_RTLWIFI_PCI=yCONFIG_RTLWIFI_USB=yCONFIG_RTLWIFI_DEBUG=yCONFIG_RTL8192C_COMMON=yCONFIG_RTL8723_COMMON=yCONFIG_RTLBTCOEXIST=yCONFIG_RTL8XXXU=yCONFIG_RTL8XXXU_UNTESTED=yCONFIG_RTW88=yCONFIG_RTW88_CORE=yCONFIG_RTW88_PCI=yCONFIG_RTW88_8822B=yCONFIG_RTW88_8822C=yCONFIG_RTW88_8723D=yCONFIG_RTW88_8821C=yCONFIG_RTW88_8822BE=yCONFIG_RTW88_8822CE=yCONFIG_RTW88_8723DE=yCONFIG_RTW88_8821CE=yCONFIG_RTW88_DEBUG=yCONFIG_RTW88_DEBUGFS=yCONFIG_RTW89=yCONFIG_RTW89_CORE=yCONFIG_RTW89_PCI=yCONFIG_RTW89_8852A=yCONFIG_RTW89_8852C=yCONFIG_RTW89_8852AE=yCONFIG_RTW89_8852CE=yCONFIG_RTW89_DEBUG=yCONFIG_RTW89_DEBUGMSG=yCONFIG_RTW89_DEBUGFS=yCONFIG_WLAN_VENDOR_RSI=yCONFIG_RSI_91X=yCONFIG_RSI_DEBUGFS=yCONFIG_RSI_SDIO=yCONFIG_RSI_USB=yCONFIG_RSI_COEX=yCONFIG_WLAN_VENDOR_SILABS=yCONFIG_WFX=yCONFIG_WLAN_VENDOR_ST=yCONFIG_CW1200=yCONFIG_CW1200_WLAN_SDIO=yCONFIG_CW1200_WLAN_SPI=yCONFIG_WLAN_VENDOR_TI=yCONFIG_WL1251=yCONFIG_WL1251_SPI=yCONFIG_WL1251_SDIO=yCONFIG_WL12XX=yCONFIG_WL18XX=yCONFIG_WLCORE=yCONFIG_WLCORE_SPI=yCONFIG_WLCORE_SDIO=yCONFIG_WILINK_PLATFORM_DATA=yCONFIG_WLAN_VENDOR_ZYDAS=yCONFIG_USB_ZD1201=yCONFIG_ZD1211RW=yCONFIG_ZD1211RW_DEBUG=yCONFIG_WLAN_VENDOR_QUANTENNA=yCONFIG_QTNFMAC=yCONFIG_QTNFMAC_PCIE=yCONFIG_PCMCIA_RAYCS=yCONFIG_PCMCIA_WL3501=yCONFIG_MAC80211_HWSIM=yCONFIG_USB_NET_RNDIS_WLAN=yCONFIG_VIRT_WIFI=yCONFIG_WAN=yCONFIG_HDLC=yCONFIG_HDLC_RAW=yCONFIG_HDLC_RAW_ETH=yCONFIG_HDLC_CISCO=yCONFIG_HDLC_FR=yCONFIG_HDLC_PPP=yCONFIG_HDLC_X25=yCONFIG_PCI200SYN=yCONFIG_WANXL=yCONFIG_PC300TOO=yCONFIG_FARSYNC=yCONFIG_FSL_UCC_HDLC=yCONFIG_SLIC_DS26522=yCONFIG_LAPBETHER=yCONFIG_IEEE802154_DRIVERS=yCONFIG_IEEE802154_FAKELB=yCONFIG_IEEE802154_AT86RF230=yCONFIG_IEEE802154_MRF24J40=yCONFIG_IEEE802154_CC2520=yCONFIG_IEEE802154_ATUSB=yCONFIG_IEEE802154_ADF7242=yCONFIG_IEEE802154_CA8210=yCONFIG_IEEE802154_CA8210_DEBUGFS=yCONFIG_IEEE802154_MCR20A=yCONFIG_IEEE802154_HWSIM=y
#
# Wireless WAN
#CONFIG_WWAN=yCONFIG_WWAN_DEBUGFS=yCONFIG_WWAN_HWSIM=yCONFIG_MHI_WWAN_CTRL=yCONFIG_MHI_WWAN_MBIM=yCONFIG_QCOM_BAM_DMUX=yCONFIG_RPMSG_WWAN_CTRL=yCONFIG_MTK_T7XX=y
# end of Wireless WAN
CONFIG_VMXNET3=yCONFIG_USB4_NET=yCONFIG_NETDEVSIM=yCONFIG_NET_FAILOVER=yCONFIG_ISDN=yCONFIG_ISDN_CAPI=yCONFIG_CAPI_TRACE=yCONFIG_ISDN_CAPI_MIDDLEWARE=yCONFIG_MISDN=yCONFIG_MISDN_DSP=yCONFIG_MISDN_L1OIP=y
#
# mISDN hardware drivers
#CONFIG_MISDN_HFCPCI=yCONFIG_MISDN_HFCMULTI=yCONFIG_MISDN_HFCUSB=yCONFIG_MISDN_AVMFRITZ=yCONFIG_MISDN_SPEEDFAX=yCONFIG_MISDN_INFINEON=yCONFIG_MISDN_W6692=yCONFIG_MISDN_NETJET=yCONFIG_MISDN_HDLC=yCONFIG_MISDN_IPAC=yCONFIG_MISDN_ISAR=y
#
# Input device support
#CONFIG_INPUT=yCONFIG_INPUT_LEDS=yCONFIG_INPUT_FF_MEMLESS=yCONFIG_INPUT_SPARSEKMAP=yCONFIG_INPUT_MATRIXKMAP=yCONFIG_INPUT_VIVALDIFMAP=y
#
# Userland interfaces
#CONFIG_INPUT_MOUSEDEV=yCONFIG_INPUT_MOUSEDEV_PSAUX=yCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768CONFIG_INPUT_JOYDEV=yCONFIG_INPUT_EVDEV=yCONFIG_INPUT_EVBUG=y
#
# Input Device Drivers
#CONFIG_INPUT_KEYBOARD=yCONFIG_KEYBOARD_ADC=yCONFIG_KEYBOARD_ADP5520=yCONFIG_KEYBOARD_ADP5588=yCONFIG_KEYBOARD_ADP5589=yCONFIG_KEYBOARD_ATKBD=yCONFIG_KEYBOARD_QT1050=yCONFIG_KEYBOARD_QT1070=yCONFIG_KEYBOARD_QT2160=yCONFIG_KEYBOARD_CLPS711X=yCONFIG_KEYBOARD_DLINK_DIR685=yCONFIG_KEYBOARD_LKKBD=yCONFIG_KEYBOARD_EP93XX=yCONFIG_KEYBOARD_GPIO=yCONFIG_KEYBOARD_GPIO_POLLED=yCONFIG_KEYBOARD_TCA6416=yCONFIG_KEYBOARD_TCA8418=yCONFIG_KEYBOARD_MATRIX=yCONFIG_KEYBOARD_LM8323=yCONFIG_KEYBOARD_LM8333=yCONFIG_KEYBOARD_MAX7359=yCONFIG_KEYBOARD_MCS=yCONFIG_KEYBOARD_MPR121=yCONFIG_KEYBOARD_SNVS_PWRKEY=yCONFIG_KEYBOARD_IMX=yCONFIG_KEYBOARD_IMX_SC_KEY=yCONFIG_KEYBOARD_NEWTON=yCONFIG_KEYBOARD_OPENCORES=yCONFIG_KEYBOARD_PINEPHONE=yCONFIG_KEYBOARD_PMIC8XXX=yCONFIG_KEYBOARD_SAMSUNG=yCONFIG_KEYBOARD_GOLDFISH_EVENTS=yCONFIG_KEYBOARD_STOWAWAY=yCONFIG_KEYBOARD_ST_KEYSCAN=yCONFIG_KEYBOARD_SUNKBD=yCONFIG_KEYBOARD_SH_KEYSC=yCONFIG_KEYBOARD_STMPE=yCONFIG_KEYBOARD_IQS62X=yCONFIG_KEYBOARD_OMAP4=yCONFIG_KEYBOARD_TC3589X=yCONFIG_KEYBOARD_TM2_TOUCHKEY=yCONFIG_KEYBOARD_TWL4030=yCONFIG_KEYBOARD_XTKBD=yCONFIG_KEYBOARD_CROS_EC=yCONFIG_KEYBOARD_CAP11XX=yCONFIG_KEYBOARD_BCM=yCONFIG_KEYBOARD_MT6779=yCONFIG_KEYBOARD_MTK_PMIC=yCONFIG_KEYBOARD_CYPRESS_SF=yCONFIG_INPUT_MOUSE=yCONFIG_MOUSE_PS2=yCONFIG_MOUSE_PS2_ALPS=yCONFIG_MOUSE_PS2_BYD=yCONFIG_MOUSE_PS2_LOGIPS2PP=yCONFIG_MOUSE_PS2_SYNAPTICS=yCONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=yCONFIG_MOUSE_PS2_CYPRESS=yCONFIG_MOUSE_PS2_TRACKPOINT=yCONFIG_MOUSE_PS2_ELANTECH=yCONFIG_MOUSE_PS2_ELANTECH_SMBUS=yCONFIG_MOUSE_PS2_SENTELIC=yCONFIG_MOUSE_PS2_TOUCHKIT=yCONFIG_MOUSE_PS2_FOCALTECH=yCONFIG_MOUSE_PS2_SMBUS=yCONFIG_MOUSE_SERIAL=yCONFIG_MOUSE_APPLETOUCH=yCONFIG_MOUSE_BCM5974=yCONFIG_MOUSE_CYAPA=yCONFIG_MOUSE_ELAN_I2C=yCONFIG_MOUSE_ELAN_I2C_I2C=yCONFIG_MOUSE_ELAN_I2C_SMBUS=yCONFIG_MOUSE_VSXXXAA=yCONFIG_MOUSE_GPIO=yCONFIG_MOUSE_SYNAPTICS_I2C=yCONFIG_MOUSE_SYNAPTICS_USB=yCONFIG_INPUT_JOYSTICK=yCONFIG_JOYSTICK_ANALOG=yCONFIG_JOYSTICK_A3D=yCONFIG_JOYSTICK_ADC=yCONFIG_JOYSTICK_ADI=yCONFIG_JOYSTICK_COBRA=yCONFIG_JOYSTICK_GF2K=yCONFIG_JOYSTICK_GRIP=yCONFIG_JOYSTICK_GRIP_MP=yCONFIG_JOYSTICK_GUILLEMOT=yCONFIG_JOYSTICK_INTERACT=yCONFIG_JOYSTICK_SIDEWINDER=yCONFIG_JOYSTICK_TMDC=yCONFIG_JOYSTICK_IFORCE=yCONFIG_JOYSTICK_IFORCE_USB=yCONFIG_JOYSTICK_IFORCE_232=yCONFIG_JOYSTICK_WARRIOR=yCONFIG_JOYSTICK_MAGELLAN=yCONFIG_JOYSTICK_SPACEORB=yCONFIG_JOYSTICK_SPACEBALL=yCONFIG_JOYSTICK_STINGER=yCONFIG_JOYSTICK_TWIDJOY=yCONFIG_JOYSTICK_ZHENHUA=yCONFIG_JOYSTICK_DB9=yCONFIG_JOYSTICK_GAMECON=yCONFIG_JOYSTICK_TURBOGRAFX=yCONFIG_JOYSTICK_AS5011=yCONFIG_JOYSTICK_JOYDUMP=yCONFIG_JOYSTICK_XPAD=yCONFIG_JOYSTICK_XPAD_FF=yCONFIG_JOYSTICK_XPAD_LEDS=yCONFIG_JOYSTICK_WALKERA0701=yCONFIG_JOYSTICK_PSXPAD_SPI=yCONFIG_JOYSTICK_PSXPAD_SPI_FF=yCONFIG_JOYSTICK_PXRC=yCONFIG_JOYSTICK_QWIIC=yCONFIG_JOYSTICK_FSIA6B=yCONFIG_JOYSTICK_SENSEHAT=yCONFIG_INPUT_TABLET=yCONFIG_TABLET_USB_ACECAD=yCONFIG_TABLET_USB_AIPTEK=yCONFIG_TABLET_USB_HANWANG=yCONFIG_TABLET_USB_KBTAB=yCONFIG_TABLET_USB_PEGASUS=yCONFIG_TABLET_SERIAL_WACOM4=yCONFIG_INPUT_TOUCHSCREEN=yCONFIG_TOUCHSCREEN_88PM860X=yCONFIG_TOUCHSCREEN_ADS7846=yCONFIG_TOUCHSCREEN_AD7877=yCONFIG_TOUCHSCREEN_AD7879=yCONFIG_TOUCHSCREEN_AD7879_I2C=yCONFIG_TOUCHSCREEN_AD7879_SPI=yCONFIG_TOUCHSCREEN_ADC=yCONFIG_TOUCHSCREEN_AR1021_I2C=yCONFIG_TOUCHSCREEN_ATMEL_MXT=yCONFIG_TOUCHSCREEN_ATMEL_MXT_T37=yCONFIG_TOUCHSCREEN_AUO_PIXCIR=yCONFIG_TOUCHSCREEN_BU21013=yCONFIG_TOUCHSCREEN_BU21029=yCONFIG_TOUCHSCREEN_CHIPONE_ICN8318=yCONFIG_TOUCHSCREEN_CY8CTMA140=yCONFIG_TOUCHSCREEN_CY8CTMG110=yCONFIG_TOUCHSCREEN_CYTTSP_CORE=yCONFIG_TOUCHSCREEN_CYTTSP_I2C=yCONFIG_TOUCHSCREEN_CYTTSP_SPI=yCONFIG_TOUCHSCREEN_CYTTSP4_CORE=yCONFIG_TOUCHSCREEN_CYTTSP4_I2C=yCONFIG_TOUCHSCREEN_CYTTSP4_SPI=yCONFIG_TOUCHSCREEN_DA9034=yCONFIG_TOUCHSCREEN_DA9052=yCONFIG_TOUCHSCREEN_DYNAPRO=yCONFIG_TOUCHSCREEN_HAMPSHIRE=yCONFIG_TOUCHSCREEN_EETI=yCONFIG_TOUCHSCREEN_EGALAX=yCONFIG_TOUCHSCREEN_EGALAX_SERIAL=yCONFIG_TOUCHSCREEN_EXC3000=yCONFIG_TOUCHSCREEN_FUJITSU=yCONFIG_TOUCHSCREEN_GOODIX=yCONFIG_TOUCHSCREEN_HIDEEP=yCONFIG_TOUCHSCREEN_HYCON_HY46XX=yCONFIG_TOUCHSCREEN_ILI210X=yCONFIG_TOUCHSCREEN_ILITEK=yCONFIG_TOUCHSCREEN_IPROC=yCONFIG_TOUCHSCREEN_S6SY761=yCONFIG_TOUCHSCREEN_GUNZE=yCONFIG_TOUCHSCREEN_EKTF2127=yCONFIG_TOUCHSCREEN_ELAN=yCONFIG_TOUCHSCREEN_ELO=yCONFIG_TOUCHSCREEN_WACOM_W8001=yCONFIG_TOUCHSCREEN_WACOM_I2C=yCONFIG_TOUCHSCREEN_MAX11801=yCONFIG_TOUCHSCREEN_MCS5000=yCONFIG_TOUCHSCREEN_MMS114=yCONFIG_TOUCHSCREEN_MELFAS_MIP4=yCONFIG_TOUCHSCREEN_MSG2638=yCONFIG_TOUCHSCREEN_MTOUCH=yCONFIG_TOUCHSCREEN_IMAGIS=yCONFIG_TOUCHSCREEN_IMX6UL_TSC=yCONFIG_TOUCHSCREEN_INEXIO=yCONFIG_TOUCHSCREEN_MK712=yCONFIG_TOUCHSCREEN_PENMOUNT=yCONFIG_TOUCHSCREEN_EDT_FT5X06=yCONFIG_TOUCHSCREEN_RASPBERRYPI_FW=yCONFIG_TOUCHSCREEN_MIGOR=yCONFIG_TOUCHSCREEN_TOUCHRIGHT=yCONFIG_TOUCHSCREEN_TOUCHWIN=yCONFIG_TOUCHSCREEN_TI_AM335X_TSC=yCONFIG_TOUCHSCREEN_UCB1400=yCONFIG_TOUCHSCREEN_PIXCIR=yCONFIG_TOUCHSCREEN_WDT87XX_I2C=yCONFIG_TOUCHSCREEN_WM831X=yCONFIG_TOUCHSCREEN_WM97XX=yCONFIG_TOUCHSCREEN_WM9705=yCONFIG_TOUCHSCREEN_WM9712=yCONFIG_TOUCHSCREEN_WM9713=yCONFIG_TOUCHSCREEN_USB_COMPOSITE=yCONFIG_TOUCHSCREEN_MXS_LRADC=yCONFIG_TOUCHSCREEN_MX25=yCONFIG_TOUCHSCREEN_MC13783=yCONFIG_TOUCHSCREEN_USB_EGALAX=yCONFIG_TOUCHSCREEN_USB_PANJIT=yCONFIG_TOUCHSCREEN_USB_3M=yCONFIG_TOUCHSCREEN_USB_ITM=yCONFIG_TOUCHSCREEN_USB_ETURBO=yCONFIG_TOUCHSCREEN_USB_GUNZE=yCONFIG_TOUCHSCREEN_USB_DMC_TSC10=yCONFIG_TOUCHSCREEN_USB_IRTOUCH=yCONFIG_TOUCHSCREEN_USB_IDEALTEK=yCONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=yCONFIG_TOUCHSCREEN_USB_GOTOP=yCONFIG_TOUCHSCREEN_USB_JASTEC=yCONFIG_TOUCHSCREEN_USB_ELO=yCONFIG_TOUCHSCREEN_USB_E2I=yCONFIG_TOUCHSCREEN_USB_ZYTRONIC=yCONFIG_TOUCHSCREEN_USB_ETT_TC45USB=yCONFIG_TOUCHSCREEN_USB_NEXIO=yCONFIG_TOUCHSCREEN_USB_EASYTOUCH=yCONFIG_TOUCHSCREEN_TOUCHIT213=yCONFIG_TOUCHSCREEN_TS4800=yCONFIG_TOUCHSCREEN_TSC_SERIO=yCONFIG_TOUCHSCREEN_TSC200X_CORE=yCONFIG_TOUCHSCREEN_TSC2004=yCONFIG_TOUCHSCREEN_TSC2005=yCONFIG_TOUCHSCREEN_TSC2007=yCONFIG_TOUCHSCREEN_TSC2007_IIO=yCONFIG_TOUCHSCREEN_PCAP=yCONFIG_TOUCHSCREEN_RM_TS=yCONFIG_TOUCHSCREEN_SILEAD=yCONFIG_TOUCHSCREEN_SIS_I2C=yCONFIG_TOUCHSCREEN_ST1232=yCONFIG_TOUCHSCREEN_STMFTS=yCONFIG_TOUCHSCREEN_STMPE=yCONFIG_TOUCHSCREEN_SUN4I=yCONFIG_TOUCHSCREEN_SUR40=yCONFIG_TOUCHSCREEN_SURFACE3_SPI=yCONFIG_TOUCHSCREEN_SX8654=yCONFIG_TOUCHSCREEN_TPS6507X=yCONFIG_TOUCHSCREEN_ZET6223=yCONFIG_TOUCHSCREEN_ZFORCE=yCONFIG_TOUCHSCREEN_COLIBRI_VF50=yCONFIG_TOUCHSCREEN_ROHM_BU21023=yCONFIG_TOUCHSCREEN_IQS5XX=yCONFIG_TOUCHSCREEN_ZINITIX=yCONFIG_INPUT_MISC=yCONFIG_INPUT_88PM860X_ONKEY=yCONFIG_INPUT_88PM80X_ONKEY=yCONFIG_INPUT_AD714X=yCONFIG_INPUT_AD714X_I2C=yCONFIG_INPUT_AD714X_SPI=yCONFIG_INPUT_ARIEL_PWRBUTTON=yCONFIG_INPUT_ARIZONA_HAPTICS=yCONFIG_INPUT_ATC260X_ONKEY=yCONFIG_INPUT_ATMEL_CAPTOUCH=yCONFIG_INPUT_BMA150=yCONFIG_INPUT_E3X0_BUTTON=yCONFIG_INPUT_PM8941_PWRKEY=yCONFIG_INPUT_PM8XXX_VIBRATOR=yCONFIG_INPUT_PMIC8XXX_PWRKEY=yCONFIG_INPUT_SPARCSPKR=yCONFIG_INPUT_MAX77650_ONKEY=yCONFIG_INPUT_MAX77693_HAPTIC=yCONFIG_INPUT_MAX8925_ONKEY=yCONFIG_INPUT_MAX8997_HAPTIC=yCONFIG_INPUT_MC13783_PWRBUTTON=yCONFIG_INPUT_MMA8450=yCONFIG_INPUT_GPIO_BEEPER=yCONFIG_INPUT_GPIO_DECODER=yCONFIG_INPUT_GPIO_VIBRA=yCONFIG_INPUT_CPCAP_PWRBUTTON=yCONFIG_INPUT_ATI_REMOTE2=yCONFIG_INPUT_KEYSPAN_REMOTE=yCONFIG_INPUT_KXTJ9=yCONFIG_INPUT_POWERMATE=yCONFIG_INPUT_YEALINK=yCONFIG_INPUT_CM109=yCONFIG_INPUT_REGULATOR_HAPTIC=yCONFIG_INPUT_RETU_PWRBUTTON=yCONFIG_INPUT_TPS65218_PWRBUTTON=yCONFIG_INPUT_AXP20X_PEK=yCONFIG_INPUT_TWL4030_PWRBUTTON=yCONFIG_INPUT_TWL4030_VIBRA=yCONFIG_INPUT_TWL6040_VIBRA=yCONFIG_INPUT_UINPUT=yCONFIG_INPUT_PALMAS_PWRBUTTON=yCONFIG_INPUT_PCF50633_PMU=yCONFIG_INPUT_PCF8574=yCONFIG_INPUT_PWM_BEEPER=yCONFIG_INPUT_PWM_VIBRA=yCONFIG_INPUT_RK805_PWRKEY=yCONFIG_INPUT_GPIO_ROTARY_ENCODER=yCONFIG_INPUT_DA7280_HAPTICS=yCONFIG_INPUT_DA9052_ONKEY=yCONFIG_INPUT_DA9055_ONKEY=yCONFIG_INPUT_DA9063_ONKEY=yCONFIG_INPUT_WM831X_ON=yCONFIG_INPUT_PCAP=yCONFIG_INPUT_ADXL34X=yCONFIG_INPUT_ADXL34X_I2C=yCONFIG_INPUT_ADXL34X_SPI=yCONFIG_INPUT_IBM_PANEL=yCONFIG_INPUT_IMS_PCU=yCONFIG_INPUT_IQS269A=yCONFIG_INPUT_IQS626A=yCONFIG_INPUT_IQS7222=yCONFIG_INPUT_CMA3000=yCONFIG_INPUT_CMA3000_I2C=yCONFIG_INPUT_IDEAPAD_SLIDEBAR=yCONFIG_INPUT_DRV260X_HAPTICS=yCONFIG_INPUT_DRV2665_HAPTICS=yCONFIG_INPUT_DRV2667_HAPTICS=yCONFIG_INPUT_HISI_POWERKEY=yCONFIG_INPUT_RAVE_SP_PWRBUTTON=yCONFIG_INPUT_SC27XX_VIBRA=yCONFIG_INPUT_RT5120_PWRKEY=yCONFIG_INPUT_STPMIC1_ONKEY=yCONFIG_RMI4_CORE=yCONFIG_RMI4_I2C=yCONFIG_RMI4_SPI=yCONFIG_RMI4_SMB=yCONFIG_RMI4_F03=yCONFIG_RMI4_F03_SERIO=yCONFIG_RMI4_2D_SENSOR=yCONFIG_RMI4_F11=yCONFIG_RMI4_F12=yCONFIG_RMI4_F30=yCONFIG_RMI4_F34=yCONFIG_RMI4_F3A=yCONFIG_RMI4_F54=yCONFIG_RMI4_F55=y
#
# Hardware I/O ports
#CONFIG_SERIO=yCONFIG_ARCH_MIGHT_HAVE_PC_SERIO=yCONFIG_SERIO_I8042=yCONFIG_SERIO_SERPORT=yCONFIG_SERIO_PARKBD=yCONFIG_SERIO_PCIPS2=yCONFIG_SERIO_LIBPS2=yCONFIG_SERIO_RAW=yCONFIG_SERIO_ALTERA_PS2=yCONFIG_SERIO_PS2MULT=yCONFIG_SERIO_ARC_PS2=yCONFIG_SERIO_APBPS2=yCONFIG_SERIO_OLPC_APSP=yCONFIG_SERIO_SUN4I_PS2=yCONFIG_SERIO_GPIO_PS2=yCONFIG_USERIO=yCONFIG_GAMEPORT=yCONFIG_GAMEPORT_NS558=yCONFIG_GAMEPORT_L4=yCONFIG_GAMEPORT_EMU10K1=yCONFIG_GAMEPORT_FM801=y
# end of Hardware I/O ports # end of Input device support
#
# Character devices
#CONFIG_TTY=yCONFIG_VT=yCONFIG_CONSOLE_TRANSLATIONS=yCONFIG_VT_CONSOLE=yCONFIG_VT_CONSOLE_SLEEP=yCONFIG_HW_CONSOLE=yCONFIG_VT_HW_CONSOLE_BINDING=yCONFIG_UNIX98_PTYS=yCONFIG_LEGACY_PTYS=yCONFIG_LEGACY_PTY_COUNT=256CONFIG_LDISC_AUTOLOAD=y
#
# Serial drivers
#CONFIG_SERIAL_EARLYCON=yCONFIG_SERIAL_8250=yCONFIG_SERIAL_8250_DEPRECATED_OPTIONS=yCONFIG_SERIAL_8250_16550A_VARIANTS=yCONFIG_SERIAL_8250_FINTEK=yCONFIG_SERIAL_8250_CONSOLE=yCONFIG_SERIAL_8250_DMA=yCONFIG_SERIAL_8250_PCI=yCONFIG_SERIAL_8250_EXAR=yCONFIG_SERIAL_8250_CS=yCONFIG_SERIAL_8250_MEN_MCB=yCONFIG_SERIAL_8250_NR_UARTS=4CONFIG_SERIAL_8250_RUNTIME_UARTS=4CONFIG_SERIAL_8250_EXTENDED=yCONFIG_SERIAL_8250_MANY_PORTS=yCONFIG_SERIAL_8250_ASPEED_VUART=yCONFIG_SERIAL_8250_SHARE_IRQ=yCONFIG_SERIAL_8250_DETECT_IRQ=yCONFIG_SERIAL_8250_RSA=yCONFIG_SERIAL_8250_DWLIB=yCONFIG_SERIAL_8250_BCM2835AUX=yCONFIG_SERIAL_8250_FSL=yCONFIG_SERIAL_8250_DW=yCONFIG_SERIAL_8250_EM=yCONFIG_SERIAL_8250_IOC3=yCONFIG_SERIAL_8250_RT288X=yCONFIG_SERIAL_8250_OMAP=yCONFIG_SERIAL_8250_OMAP_TTYO_FIXUP=yCONFIG_SERIAL_8250_LPC18XX=yCONFIG_SERIAL_8250_MT6577=yCONFIG_SERIAL_8250_UNIPHIER=yCONFIG_SERIAL_8250_INGENIC=yCONFIG_SERIAL_8250_LPSS=yCONFIG_SERIAL_8250_MID=yCONFIG_SERIAL_8250_PERICOM=yCONFIG_SERIAL_8250_PXA=yCONFIG_SERIAL_8250_TEGRA=yCONFIG_SERIAL_8250_BCM7271=yCONFIG_SERIAL_OF_PLATFORM=y
#
# Non-8250 serial port support
#CONFIG_SERIAL_AMBA_PL010=yCONFIG_SERIAL_AMBA_PL010_CONSOLE=yCONFIG_SERIAL_ATMEL=yCONFIG_SERIAL_ATMEL_CONSOLE=yCONFIG_SERIAL_ATMEL_PDC=yCONFIG_SERIAL_ATMEL_TTYAT=yCONFIG_SERIAL_KGDB_NMI=yCONFIG_SERIAL_MESON=yCONFIG_SERIAL_MESON_CONSOLE=yCONFIG_SERIAL_CLPS711X=yCONFIG_SERIAL_CLPS711X_CONSOLE=yCONFIG_SERIAL_SAMSUNG=yCONFIG_SERIAL_SAMSUNG_UARTS_4=yCONFIG_SERIAL_SAMSUNG_UARTS=4CONFIG_SERIAL_SAMSUNG_CONSOLE=yCONFIG_SERIAL_TEGRA=yCONFIG_SERIAL_TEGRA_TCU=yCONFIG_SERIAL_TEGRA_TCU_CONSOLE=yCONFIG_SERIAL_MAX3100=yCONFIG_SERIAL_MAX310X=yCONFIG_SERIAL_IMX=yCONFIG_SERIAL_IMX_CONSOLE=yCONFIG_SERIAL_IMX_EARLYCON=yCONFIG_SERIAL_UARTLITE=yCONFIG_SERIAL_UARTLITE_CONSOLE=yCONFIG_SERIAL_UARTLITE_NR_UARTS=1CONFIG_SERIAL_SUNCORE=yCONFIG_SERIAL_SUNZILOG=yCONFIG_SERIAL_SUNZILOG_CONSOLE=yCONFIG_SERIAL_SUNSU=yCONFIG_SERIAL_SUNSU_CONSOLE=yCONFIG_SERIAL_SUNSAB=yCONFIG_SERIAL_SUNSAB_CONSOLE=yCONFIG_SERIAL_SUNHV=yCONFIG_SERIAL_SH_SCI=yCONFIG_SERIAL_SH_SCI_NR_UARTS=2CONFIG_SERIAL_SH_SCI_CONSOLE=yCONFIG_SERIAL_SH_SCI_EARLYCON=yCONFIG_SERIAL_SH_SCI_DMA=yCONFIG_SERIAL_HS_LPC32XX=yCONFIG_SERIAL_HS_LPC32XX_CONSOLE=yCONFIG_SERIAL_CORE=yCONFIG_SERIAL_CORE_CONSOLE=yCONFIG_CONSOLE_POLL=yCONFIG_SERIAL_ICOM=yCONFIG_SERIAL_JSM=yCONFIG_SERIAL_MSM=yCONFIG_SERIAL_MSM_CONSOLE=yCONFIG_SERIAL_QCOM_GENI=yCONFIG_SERIAL_QCOM_GENI_CONSOLE=yCONFIG_SERIAL_VT8500=yCONFIG_SERIAL_VT8500_CONSOLE=yCONFIG_SERIAL_OMAP=yCONFIG_SERIAL_OMAP_CONSOLE=yCONFIG_SERIAL_SIFIVE=yCONFIG_SERIAL_SIFIVE_CONSOLE=yCONFIG_SERIAL_LANTIQ=yCONFIG_SERIAL_LANTIQ_CONSOLE=yCONFIG_SERIAL_QE=yCONFIG_SERIAL_SCCNXP=yCONFIG_SERIAL_SCCNXP_CONSOLE=yCONFIG_SERIAL_SC16IS7XX_CORE=yCONFIG_SERIAL_SC16IS7XX=yCONFIG_SERIAL_SC16IS7XX_I2C=yCONFIG_SERIAL_SC16IS7XX_SPI=yCONFIG_SERIAL_TIMBERDALE=yCONFIG_SERIAL_BCM63XX=yCONFIG_SERIAL_BCM63XX_CONSOLE=yCONFIG_SERIAL_GRLIB_GAISLER_APBUART=yCONFIG_SERIAL_GRLIB_GAISLER_APBUART_CONSOLE=yCONFIG_SERIAL_ALTERA_JTAGUART=yCONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE=yCONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE_BYPASS=yCONFIG_SERIAL_ALTERA_UART=yCONFIG_SERIAL_ALTERA_UART_MAXPORTS=4CONFIG_SERIAL_ALTERA_UART_BAUDRATE=115200CONFIG_SERIAL_ALTERA_UART_CONSOLE=yCONFIG_SERIAL_PCH_UART=yCONFIG_SERIAL_PCH_UART_CONSOLE=yCONFIG_SERIAL_MXS_AUART=yCONFIG_SERIAL_MXS_AUART_CONSOLE=yCONFIG_SERIAL_XILINX_PS_UART=yCONFIG_SERIAL_XILINX_PS_UART_CONSOLE=yCONFIG_SERIAL_MPS2_UART_CONSOLE=yCONFIG_SERIAL_MPS2_UART=yCONFIG_SERIAL_ARC=yCONFIG_SERIAL_ARC_CONSOLE=yCONFIG_SERIAL_ARC_NR_PORTS=1CONFIG_SERIAL_RP2=yCONFIG_SERIAL_RP2_NR_UARTS=32CONFIG_SERIAL_FSL_LPUART=yCONFIG_SERIAL_FSL_LPUART_CONSOLE=yCONFIG_SERIAL_FSL_LINFLEXUART=yCONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE=yCONFIG_SERIAL_CONEXANT_DIGICOLOR=yCONFIG_SERIAL_CONEXANT_DIGICOLOR_CONSOLE=yCONFIG_SERIAL_ST_ASC=yCONFIG_SERIAL_ST_ASC_CONSOLE=yCONFIG_SERIAL_MEN_Z135=yCONFIG_SERIAL_SPRD=yCONFIG_SERIAL_SPRD_CONSOLE=yCONFIG_SERIAL_STM32=yCONFIG_SERIAL_STM32_CONSOLE=yCONFIG_SERIAL_MVEBU_UART=yCONFIG_SERIAL_MVEBU_CONSOLE=yCONFIG_SERIAL_OWL=yCONFIG_SERIAL_OWL_CONSOLE=yCONFIG_SERIAL_RDA=yCONFIG_SERIAL_RDA_CONSOLE=yCONFIG_SERIAL_MILBEAUT_USIO=yCONFIG_SERIAL_MILBEAUT_USIO_PORTS=4CONFIG_SERIAL_MILBEAUT_USIO_CONSOLE=yCONFIG_SERIAL_LITEUART=yCONFIG_SERIAL_LITEUART_MAX_PORTS=1CONFIG_SERIAL_LITEUART_CONSOLE=yCONFIG_SERIAL_SUNPLUS=yCONFIG_SERIAL_SUNPLUS_CONSOLE=y
# end of Serial drivers
CONFIG_SERIAL_MCTRL_GPIO=yCONFIG_SERIAL_NONSTANDARD=yCONFIG_MOXA_INTELLIO=yCONFIG_MOXA_SMARTIO=yCONFIG_SYNCLINK_GT=yCONFIG_N_HDLC=yCONFIG_GOLDFISH_TTY=yCONFIG_GOLDFISH_TTY_EARLY_CONSOLE=yCONFIG_N_GSM=yCONFIG_NOZOMI=yCONFIG_NULL_TTY=yCONFIG_VCC=yCONFIG_HVC_DRIVER=yCONFIG_RPMSG_TTY=yCONFIG_SERIAL_DEV_BUS=yCONFIG_SERIAL_DEV_CTRL_TTYPORT=yCONFIG_TTY_PRINTK=yCONFIG_TTY_PRINTK_LEVEL=6CONFIG_PRINTER=yCONFIG_LP_CONSOLE=yCONFIG_PPDEV=yCONFIG_VIRTIO_CONSOLE=yCONFIG_IPMI_HANDLER=yCONFIG_IPMI_PLAT_DATA=yCONFIG_IPMI_PANIC_EVENT=yCONFIG_IPMI_PANIC_STRING=yCONFIG_IPMI_DEVICE_INTERFACE=yCONFIG_IPMI_SI=yCONFIG_IPMI_SSIF=yCONFIG_IPMI_IPMB=yCONFIG_IPMI_WATCHDOG=yCONFIG_IPMI_POWEROFF=yCONFIG_IPMI_KCS_BMC=yCONFIG_ASPEED_KCS_IPMI_BMC=yCONFIG_NPCM7XX_KCS_IPMI_BMC=yCONFIG_IPMI_KCS_BMC_CDEV_IPMI=yCONFIG_IPMI_KCS_BMC_SERIO=yCONFIG_ASPEED_BT_IPMI_BMC=yCONFIG_IPMB_DEVICE_INTERFACE=yCONFIG_HW_RANDOM=yCONFIG_HW_RANDOM_TIMERIOMEM=yCONFIG_HW_RANDOM_ATMEL=yCONFIG_HW_RANDOM_BA431=yCONFIG_HW_RANDOM_BCM2835=yCONFIG_HW_RANDOM_IPROC_RNG200=yCONFIG_HW_RANDOM_N2RNG=yCONFIG_HW_RANDOM_IXP4XX=yCONFIG_HW_RANDOM_OMAP=yCONFIG_HW_RANDOM_OMAP3_ROM=yCONFIG_HW_RANDOM_VIRTIO=yCONFIG_HW_RANDOM_IMX_RNGC=yCONFIG_HW_RANDOM_NOMADIK=yCONFIG_HW_RANDOM_STM32=yCONFIG_HW_RANDOM_POLARFIRE_SOC=yCONFIG_HW_RANDOM_MESON=yCONFIG_HW_RANDOM_MTK=yCONFIG_HW_RANDOM_EXYNOS=yCONFIG_HW_RANDOM_NPCM=yCONFIG_HW_RANDOM_KEYSTONE=yCONFIG_HW_RANDOM_CCTRNG=yCONFIG_HW_RANDOM_XIPHERA=yCONFIG_HW_RANDOM_CN10K=yCONFIG_APPLICOM=y
#
# PCMCIA character devices
#CONFIG_SYNCLINK_CS=yCONFIG_CARDMAN_4000=yCONFIG_CARDMAN_4040=yCONFIG_SCR24X=yCONFIG_IPWIRELESS=y
# end of PCMCIA character devices
CONFIG_DEVMEM=yCONFIG_DEVPORT=yCONFIG_TCG_TPM=yCONFIG_HW_RANDOM_TPM=yCONFIG_TCG_TIS_CORE=yCONFIG_TCG_TIS=yCONFIG_TCG_TIS_SPI=yCONFIG_TCG_TIS_SPI_CR50=yCONFIG_TCG_TIS_I2C=yCONFIG_TCG_TIS_SYNQUACER=yCONFIG_TCG_TIS_I2C_CR50=yCONFIG_TCG_TIS_I2C_ATMEL=yCONFIG_TCG_TIS_I2C_INFINEON=yCONFIG_TCG_TIS_I2C_NUVOTON=yCONFIG_TCG_ATMEL=yCONFIG_TCG_VTPM_PROXY=yCONFIG_TCG_TIS_ST33ZP24=yCONFIG_TCG_TIS_ST33ZP24_I2C=yCONFIG_TCG_TIS_ST33ZP24_SPI=yCONFIG_XILLYBUS_CLASS=yCONFIG_XILLYBUS=yCONFIG_XILLYBUS_PCIE=yCONFIG_XILLYBUS_OF=yCONFIG_XILLYUSB=yCONFIG_ADI=yCONFIG_RANDOM_TRUST_CPU=yCONFIG_RANDOM_TRUST_BOOTLOADER=y
# end of Character devices
#
# I2C support
#CONFIG_I2C=yCONFIG_I2C_BOARDINFO=yCONFIG_I2C_COMPAT=yCONFIG_I2C_CHARDEV=yCONFIG_I2C_MUX=y
#
# Multiplexer I2C Chip support
#CONFIG_I2C_ARB_GPIO_CHALLENGE=yCONFIG_I2C_MUX_GPIO=yCONFIG_I2C_MUX_GPMUX=yCONFIG_I2C_MUX_LTC4306=yCONFIG_I2C_MUX_PCA9541=y
CONFIG_I2C_MUX_PCA954x=yCONFIG_I2C_MUX_PINCTRL=yCONFIG_I2C_MUX_REG=yCONFIG_I2C_DEMUX_PINCTRL=yCONFIG_I2C_MUX_MLXCPLD=y
# end of Multiplexer I2C Chip support
CONFIG_I2C_HELPER_AUTO=yCONFIG_I2C_SMBUS=yCONFIG_I2C_ALGOBIT=yCONFIG_I2C_ALGOPCA=y
#
# I2C Hardware Bus support
#
#
# PC SMBus host controller drivers
#CONFIG_I2C_CCGX_UCSI=yCONFIG_I2C_ALI1535=yCONFIG_I2C_ALI1563=yCONFIG_I2C_ALI15X3=yCONFIG_I2C_AMD756=yCONFIG_I2C_AMD8111=yCONFIG_I2C_HIX5HD2=yCONFIG_I2C_I801=yCONFIG_I2C_ISCH=yCONFIG_I2C_PIIX4=yCONFIG_I2C_NFORCE2=yCONFIG_I2C_NVIDIA_GPU=yCONFIG_I2C_SIS5595=yCONFIG_I2C_SIS630=yCONFIG_I2C_SIS96X=yCONFIG_I2C_VIA=yCONFIG_I2C_VIAPRO=y
#
# I2C system bus drivers (mostly embedded / system-on-chip) #CONFIG_I2C_ALTERA=yCONFIG_I2C_ASPEED=yCONFIG_I2C_AT91=y CONFIG_I2C_AT91_SLAVE_EXPERIMENTAL=y CONFIG_I2C_AXXIA=yCONFIG_I2C_BCM2835=yCONFIG_I2C_BCM_IPROC=yCONFIG_I2C_BCM_KONA=yCONFIG_I2C_BRCMSTB=yCONFIG_I2C_CADENCE=yCONFIG_I2C_CBUS_GPIO=yCONFIG_I2C_DAVINCI=yCONFIG_I2C_DESIGNWARE_CORE=y CONFIG_I2C_DESIGNWARE_SLAVE=y CONFIG_I2C_DESIGNWARE_PLATFORM=y CONFIG_I2C_DESIGNWARE_PCI=yCONFIG_I2C_DIGICOLOR=yCONFIG_I2C_EG20T=yCONFIG_I2C_EMEV2=yCONFIG_I2C_EXYNOS5=yCONFIG_I2C_GPIO=yCONFIG_I2C_GPIO_FAULT_INJECTOR=y CONFIG_I2C_HIGHLANDER=yCONFIG_I2C_HISI=yCONFIG_I2C_IMG=yCONFIG_I2C_IMX=yCONFIG_I2C_IMX_LPI2C=yCONFIG_I2C_IOP3XX=yCONFIG_I2C_JZ4780=yCONFIG_I2C_KEMPLD=yCONFIG_I2C_LPC2K=yCONFIG_I2C_MESON=yCONFIG_I2C_MICROCHIP_CORE=yCONFIG_I2C_MT65XX=yCONFIG_I2C_MT7621=yCONFIG_I2C_MV64XXX=yCONFIG_I2C_MXS=yCONFIG_I2C_NPCM=yCONFIG_I2C_OCORES=yCONFIG_I2C_OMAP=yCONFIG_I2C_OWL=yCONFIG_I2C_APPLE=yCONFIG_I2C_PCA_PLATFORM=yCONFIG_I2C_PNX=yCONFIG_I2C_PXA=yCONFIG_I2C_PXA_SLAVE=yCONFIG_I2C_QCOM_CCI=yCONFIG_I2C_QCOM_GENI=yCONFIG_I2C_QUP=yCONFIG_I2C_RIIC=yCONFIG_I2C_RK3X=yCONFIG_I2C_RZV2M=yCONFIG_I2C_S3C2410=yCONFIG_I2C_SH_MOBILE=yCONFIG_I2C_SIMTEC=yCONFIG_I2C_SPRD=yCONFIG_I2C_ST=yCONFIG_I2C_STM32F4=yCONFIG_I2C_STM32F7=yCONFIG_I2C_SUN6I_P2WI=yCONFIG_I2C_SYNQUACER=yCONFIG_I2C_TEGRA=yCONFIG_I2C_TEGRA_BPMP=yCONFIG_I2C_UNIPHIER=yCONFIG_I2C_UNIPHIER_F=yCONFIG_I2C_VERSATILE=yCONFIG_I2C_WMT=yCONFIG_I2C_THUNDERX=yCONFIG_I2C_XILINX=yCONFIG_I2C_XLP9XX=yCONFIG_I2C_RCAR=y
#
# External I2C/SMBus adapter drivers
#CONFIG_I2C_DIOLAN_U2C=yCONFIG_I2C_DLN2=yCONFIG_I2C_CP2615=yCONFIG_I2C_PARPORT=yCONFIG_I2C_PCI1XXXX=yCONFIG_I2C_ROBOTFUZZ_OSIF=yCONFIG_I2C_TAOS_EVM=yCONFIG_I2C_TINY_USB=yCONFIG_I2C_VIPERBOARD=y
#
# Other I2C/SMBus bus drivers
#CONFIG_I2C_MLXCPLD=yCONFIG_I2C_CROS_EC_TUNNEL=yCONFIG_I2C_FSI=yCONFIG_I2C_VIRTIO=y
# end of I2C Hardware Bus support
CONFIG_I2C_STUB=mCONFIG_I2C_SLAVE=yCONFIG_I2C_SLAVE_EEPROM=yCONFIG_I2C_SLAVE_TESTUNIT=yCONFIG_I2C_DEBUG_CORE=yCONFIG_I2C_DEBUG_ALGO=yCONFIG_I2C_DEBUG_BUS=y
# end of I2C support
CONFIG_I3C=yCONFIG_CDNS_I3C_MASTER=yCONFIG_DW_I3C_MASTER=yCONFIG_SVC_I3C_MASTER=yCONFIG_MIPI_I3C_HCI=yCONFIG_SPI=yCONFIG_SPI_DEBUG=yCONFIG_SPI_MASTER=yCONFIG_SPI_MEM=y
#
# SPI Master Controller Drivers
#CONFIG_SPI_ALTERA=yCONFIG_SPI_ALTERA_CORE=yCONFIG_SPI_ALTERA_DFL=yCONFIG_SPI_AR934X=yCONFIG_SPI_ATH79=yCONFIG_SPI_ARMADA_3700=yCONFIG_SPI_ASPEED_SMC=yCONFIG_SPI_ATMEL=yCONFIG_SPI_AT91_USART=yCONFIG_SPI_ATMEL_QUADSPI=yCONFIG_SPI_AXI_SPI_ENGINE=yCONFIG_SPI_BCM2835=yCONFIG_SPI_BCM2835AUX=yCONFIG_SPI_BCM63XX=yCONFIG_SPI_BCM63XX_HSSPI=yCONFIG_SPI_BCM_QSPI=yCONFIG_SPI_BITBANG=yCONFIG_SPI_BUTTERFLY=yCONFIG_SPI_CADENCE=yCONFIG_SPI_CADENCE_QUADSPI=yCONFIG_SPI_CADENCE_XSPI=yCONFIG_SPI_CLPS711X=yCONFIG_SPI_DESIGNWARE=yCONFIG_SPI_DW_DMA=yCONFIG_SPI_DW_PCI=yCONFIG_SPI_DW_MMIO=yCONFIG_SPI_DW_BT1=yCONFIG_SPI_DW_BT1_DIRMAP=yCONFIG_SPI_DLN2=yCONFIG_SPI_EP93XX=yCONFIG_SPI_FSI=yCONFIG_SPI_FSL_LPSPI=yCONFIG_SPI_FSL_QUADSPI=yCONFIG_SPI_GXP=yCONFIG_SPI_HISI_KUNPENG=yCONFIG_SPI_HISI_SFC_V3XX=yCONFIG_SPI_NXP_FLEXSPI=yCONFIG_SPI_GPIO=yCONFIG_SPI_IMG_SPFI=yCONFIG_SPI_IMX=yCONFIG_SPI_INGENIC=yCONFIG_SPI_INTEL=yCONFIG_SPI_INTEL_PCI=yCONFIG_SPI_INTEL_PLATFORM=yCONFIG_SPI_JCORE=yCONFIG_SPI_LM70_LLP=yCONFIG_SPI_LP8841_RTC=yCONFIG_SPI_FSL_LIB=yCONFIG_SPI_FSL_SPI=yCONFIG_SPI_FSL_DSPI=yCONFIG_SPI_MESON_SPICC=yCONFIG_SPI_MESON_SPIFC=yCONFIG_SPI_MICROCHIP_CORE=yCONFIG_SPI_MICROCHIP_CORE_QSPI=yCONFIG_SPI_MT65XX=yCONFIG_SPI_MT7621=yCONFIG_SPI_MTK_NOR=yCONFIG_SPI_MTK_SNFI=yCONFIG_SPI_NPCM_FIU=yCONFIG_SPI_NPCM_PSPI=yCONFIG_SPI_LANTIQ_SSC=yCONFIG_SPI_OC_TINY=yCONFIG_SPI_OMAP24XX=yCONFIG_SPI_TI_QSPI=yCONFIG_SPI_OMAP_100K=yCONFIG_SPI_ORION=yCONFIG_SPI_PIC32=yCONFIG_SPI_PIC32_SQI=yCONFIG_SPI_PXA2XX=yCONFIG_SPI_PXA2XX_PCI=yCONFIG_SPI_ROCKCHIP=yCONFIG_SPI_ROCKCHIP_SFC=yCONFIG_SPI_RPCIF=yCONFIG_SPI_RSPI=yCONFIG_SPI_QUP=yCONFIG_SPI_QCOM_GENI=yCONFIG_SPI_S3C64XX=yCONFIG_SPI_SC18IS602=yCONFIG_SPI_SH_MSIOF=yCONFIG_SPI_SH=yCONFIG_SPI_SH_HSPI=yCONFIG_SPI_SIFIVE=yCONFIG_SPI_SLAVE_MT27XX=yCONFIG_SPI_SPRD=yCONFIG_SPI_SPRD_ADI=yCONFIG_SPI_STM32=yCONFIG_SPI_STM32_QSPI=yCONFIG_SPI_ST_SSC4=yCONFIG_SPI_SUN4I=yCONFIG_SPI_SUN6I=yCONFIG_SPI_SUNPLUS_SP7021=yCONFIG_SPI_SYNQUACER=yCONFIG_SPI_MXIC=yCONFIG_SPI_TEGRA210_QUAD=yCONFIG_SPI_TEGRA114=yCONFIG_SPI_TEGRA20_SFLASH=yCONFIG_SPI_TEGRA20_SLINK=yCONFIG_SPI_THUNDERX=yCONFIG_SPI_TOPCLIFF_PCH=yCONFIG_SPI_UNIPHIER=yCONFIG_SPI_XCOMM=yCONFIG_SPI_XILINX=yCONFIG_SPI_XLP=yCONFIG_SPI_XTENSA_XTFPGA=yCONFIG_SPI_ZYNQ_QSPI=yCONFIG_SPI_ZYNQMP_GQSPI=yCONFIG_SPI_AMD=y
#
# SPI Multiplexer support
#CONFIG_SPI_MUX=y
#
# SPI Protocol Masters
#CONFIG_SPI_SPIDEV=yCONFIG_SPI_LOOPBACK_TEST=mCONFIG_SPI_TLE62X0=yCONFIG_SPI_SLAVE=yCONFIG_SPI_SLAVE_TIME=yCONFIG_SPI_SLAVE_SYSTEM_CONTROL=yCONFIG_SPI_DYNAMIC=yCONFIG_SPMI=yCONFIG_SPMI_HISI3670=yCONFIG_SPMI_MSM_PMIC_ARB=yCONFIG_SPMI_MTK_PMIF=yCONFIG_HSI=yCONFIG_HSI_BOARDINFO=y
#
# HSI controllers
#
#
# HSI clients
#CONFIG_HSI_CHAR=yCONFIG_PPS=yCONFIG_PPS_DEBUG=y
#
# PPS clients support
#CONFIG_PPS_CLIENT_KTIMER=yCONFIG_PPS_CLIENT_LDISC=yCONFIG_PPS_CLIENT_PARPORT=yCONFIG_PPS_CLIENT_GPIO=y
#
# PPS generators support
#
#
# PTP clock support
#CONFIG_PTP_1588_CLOCK=yCONFIG_PTP_1588_CLOCK_OPTIONAL=yCONFIG_PTP_1588_CLOCK_DTE=yCONFIG_PTP_1588_CLOCK_QORIQ=yCONFIG_DP83640_PHY=yCONFIG_PTP_1588_CLOCK_INES=yCONFIG_PTP_1588_CLOCK_PCH=yCONFIG_PTP_1588_CLOCK_IDT82P33=yCONFIG_PTP_1588_CLOCK_IDTCM=yCONFIG_PTP_1588_CLOCK_OCP=y
# end of PTP clock support
CONFIG_PINCTRL=yCONFIG_GENERIC_PINCTRL_GROUPS=yCONFIG_PINMUX=yCONFIG_GENERIC_PINMUX_FUNCTIONS=yCONFIG_PINCONF=yCONFIG_GENERIC_PINCONF=yCONFIG_DEBUG_PINCTRL=yCONFIG_PINCTRL_AMD=yCONFIG_PINCTRL_AS3722=yCONFIG_PINCTRL_AT91PIO4=yCONFIG_PINCTRL_AXP209=yCONFIG_PINCTRL_BM1880=yCONFIG_PINCTRL_CY8C95X0=yCONFIG_PINCTRL_DA850_PUPD=yCONFIG_PINCTRL_DA9062=yCONFIG_PINCTRL_EQUILIBRIUM=yCONFIG_PINCTRL_INGENIC=yCONFIG_PINCTRL_LPC18XX=yCONFIG_PINCTRL_MAX77620=yCONFIG_PINCTRL_MCP23S08_I2C=yCONFIG_PINCTRL_MCP23S08_SPI=yCONFIG_PINCTRL_MCP23S08=yCONFIG_PINCTRL_MICROCHIP_SGPIO=yCONFIG_PINCTRL_OCELOT=yCONFIG_PINCTRL_PALMAS=yCONFIG_PINCTRL_PISTACHIO=yCONFIG_PINCTRL_RK805=yCONFIG_PINCTRL_ROCKCHIP=yCONFIG_PINCTRL_SINGLE=yCONFIG_PINCTRL_STMFX=yCONFIG_PINCTRL_SX150X=yCONFIG_PINCTRL_OWL=yCONFIG_PINCTRL_S500=yCONFIG_PINCTRL_S700=yCONFIG_PINCTRL_S900=yCONFIG_PINCTRL_ASPEED=yCONFIG_PINCTRL_ASPEED_G4=yCONFIG_PINCTRL_ASPEED_G5=yCONFIG_PINCTRL_ASPEED_G6=yCONFIG_PINCTRL_BCM281XX=yCONFIG_PINCTRL_BCM2835=yCONFIG_PINCTRL_BCM4908=yCONFIG_PINCTRL_BCM63XX=yCONFIG_PINCTRL_BCM6318=yCONFIG_PINCTRL_BCM6328=yCONFIG_PINCTRL_BCM6358=yCONFIG_PINCTRL_BCM6362=yCONFIG_PINCTRL_BCM6368=yCONFIG_PINCTRL_BCM63268=yCONFIG_PINCTRL_IPROC_GPIO=yCONFIG_PINCTRL_CYGNUS_MUX=yCONFIG_PINCTRL_NS=yCONFIG_PINCTRL_NSP_GPIO=yCONFIG_PINCTRL_NS2_MUX=yCONFIG_PINCTRL_NSP_MUX=yCONFIG_PINCTRL_BERLIN=yCONFIG_PINCTRL_AS370=yCONFIG_PINCTRL_BERLIN_BG4CT=yCONFIG_PINCTRL_LOCHNAGAR=yCONFIG_PINCTRL_MADERA=yCONFIG_PINCTRL_CS47L15=yCONFIG_PINCTRL_CS47L35=yCONFIG_PINCTRL_CS47L85=yCONFIG_PINCTRL_CS47L90=yCONFIG_PINCTRL_CS47L92=yCONFIG_PINCTRL_IMX=yCONFIG_PINCTRL_IMX8MM=yCONFIG_PINCTRL_IMX8MN=yCONFIG_PINCTRL_IMX8MP=yCONFIG_PINCTRL_IMX8MQ=y
#
# Intel pinctrl drivers
#
# end of Intel pinctrl drivers
#
# MediaTek pinctrl drivers
#CONFIG_EINT_MTK=yCONFIG_PINCTRL_MTK=yCONFIG_PINCTRL_MTK_V2=yCONFIG_PINCTRL_MTK_MOORE=yCONFIG_PINCTRL_MTK_PARIS=yCONFIG_PINCTRL_MT2701=yCONFIG_PINCTRL_MT7623=yCONFIG_PINCTRL_MT7629=yCONFIG_PINCTRL_MT8135=yCONFIG_PINCTRL_MT8127=yCONFIG_PINCTRL_MT2712=yCONFIG_PINCTRL_MT6765=yCONFIG_PINCTRL_MT6779=yCONFIG_PINCTRL_MT6795=yCONFIG_PINCTRL_MT6797=yCONFIG_PINCTRL_MT7622=yCONFIG_PINCTRL_MT7986=yCONFIG_PINCTRL_MT8167=yCONFIG_PINCTRL_MT8173=yCONFIG_PINCTRL_MT8183=yCONFIG_PINCTRL_MT8186=yCONFIG_PINCTRL_MT8188=yCONFIG_PINCTRL_MT8192=yCONFIG_PINCTRL_MT8195=yCONFIG_PINCTRL_MT8365=yCONFIG_PINCTRL_MT8516=yCONFIG_PINCTRL_MT6397=y
# end of MediaTek pinctrl drivers
CONFIG_PINCTRL_MESON=yCONFIG_PINCTRL_WPCM450=yCONFIG_PINCTRL_NPCM7XX=yCONFIG_PINCTRL_PXA=yCONFIG_PINCTRL_PXA25X=yCONFIG_PINCTRL_PXA27X=yCONFIG_PINCTRL_MSM=yCONFIG_PINCTRL_APQ8064=yCONFIG_PINCTRL_APQ8084=yCONFIG_PINCTRL_IPQ4019=yCONFIG_PINCTRL_IPQ8064=yCONFIG_PINCTRL_IPQ8074=yCONFIG_PINCTRL_IPQ6018=yCONFIG_PINCTRL_MSM8226=yCONFIG_PINCTRL_MSM8660=yCONFIG_PINCTRL_MSM8960=yCONFIG_PINCTRL_MDM9607=yCONFIG_PINCTRL_MDM9615=yCONFIG_PINCTRL_MSM8X74=yCONFIG_PINCTRL_MSM8909=yCONFIG_PINCTRL_MSM8916=yCONFIG_PINCTRL_MSM8953=yCONFIG_PINCTRL_MSM8976=yCONFIG_PINCTRL_MSM8994=yCONFIG_PINCTRL_MSM8996=yCONFIG_PINCTRL_MSM8998=yCONFIG_PINCTRL_QCM2290=yCONFIG_PINCTRL_QCS404=yCONFIG_PINCTRL_QCOM_SPMI_PMIC=yCONFIG_PINCTRL_QCOM_SSBI_PMIC=yCONFIG_PINCTRL_SC7180=yCONFIG_PINCTRL_SC7280=yCONFIG_PINCTRL_SC7280_LPASS_LPI=yCONFIG_PINCTRL_SC8180X=yCONFIG_PINCTRL_SC8280XP=yCONFIG_PINCTRL_SDM660=yCONFIG_PINCTRL_SDM845=yCONFIG_PINCTRL_SDX55=yCONFIG_PINCTRL_SM6115=yCONFIG_PINCTRL_SM6125=yCONFIG_PINCTRL_SM6350=yCONFIG_PINCTRL_SM6375=yCONFIG_PINCTRL_SDX65=yCONFIG_PINCTRL_SM8150=yCONFIG_PINCTRL_SM8250=yCONFIG_PINCTRL_SM8250_LPASS_LPI=yCONFIG_PINCTRL_SM8350=yCONFIG_PINCTRL_SM8450=yCONFIG_PINCTRL_SM8450_LPASS_LPI=yCONFIG_PINCTRL_SC8280XP_LPASS_LPI=yCONFIG_PINCTRL_LPASS_LPI=y
#
# Renesas pinctrl drivers
#CONFIG_PINCTRL_RENESAS=yCONFIG_PINCTRL_SH_PFC=yCONFIG_PINCTRL_SH_PFC_GPIO=yCONFIG_PINCTRL_SH_FUNC_GPIO=yCONFIG_PINCTRL_PFC_EMEV2=yCONFIG_PINCTRL_PFC_R8A77995=yCONFIG_PINCTRL_PFC_R8A7794=yCONFIG_PINCTRL_PFC_R8A77990=yCONFIG_PINCTRL_PFC_R8A7779=yCONFIG_PINCTRL_PFC_R8A7790=yCONFIG_PINCTRL_PFC_R8A77950=yCONFIG_PINCTRL_PFC_R8A77951=yCONFIG_PINCTRL_PFC_R8A7778=yCONFIG_PINCTRL_PFC_R8A7793=yCONFIG_PINCTRL_PFC_R8A7791=yCONFIG_PINCTRL_PFC_R8A77965=yCONFIG_PINCTRL_PFC_R8A77960=yCONFIG_PINCTRL_PFC_R8A77961=yCONFIG_PINCTRL_PFC_R8A779F0=yCONFIG_PINCTRL_PFC_R8A7792=yCONFIG_PINCTRL_PFC_R8A77980=yCONFIG_PINCTRL_PFC_R8A77970=yCONFIG_PINCTRL_PFC_R8A779A0=yCONFIG_PINCTRL_PFC_R8A779G0=yCONFIG_PINCTRL_PFC_R8A7740=yCONFIG_PINCTRL_PFC_R8A73A4=yCONFIG_PINCTRL_RZA1=yCONFIG_PINCTRL_RZA2=yCONFIG_PINCTRL_RZG2L=yCONFIG_PINCTRL_PFC_R8A77470=yCONFIG_PINCTRL_PFC_R8A7745=yCONFIG_PINCTRL_PFC_R8A7742=yCONFIG_PINCTRL_PFC_R8A7743=yCONFIG_PINCTRL_PFC_R8A7744=yCONFIG_PINCTRL_PFC_R8A774C0=yCONFIG_PINCTRL_PFC_R8A774E1=yCONFIG_PINCTRL_PFC_R8A774A1=yCONFIG_PINCTRL_PFC_R8A774B1=yCONFIG_PINCTRL_RZN1=yCONFIG_PINCTRL_RZV2M=yCONFIG_PINCTRL_PFC_SH7203=yCONFIG_PINCTRL_PFC_SH7264=yCONFIG_PINCTRL_PFC_SH7269=yCONFIG_PINCTRL_PFC_SH7720=yCONFIG_PINCTRL_PFC_SH7722=yCONFIG_PINCTRL_PFC_SH7734=yCONFIG_PINCTRL_PFC_SH7757=yCONFIG_PINCTRL_PFC_SH7785=yCONFIG_PINCTRL_PFC_SH7786=yCONFIG_PINCTRL_PFC_SH73A0=yCONFIG_PINCTRL_PFC_SH7723=yCONFIG_PINCTRL_PFC_SH7724=yCONFIG_PINCTRL_PFC_SHX3=y
# end of Renesas pinctrl drivers
CONFIG_PINCTRL_SAMSUNG=yCONFIG_PINCTRL_EXYNOS=yCONFIG_PINCTRL_EXYNOS_ARM=yCONFIG_PINCTRL_EXYNOS_ARM64=yCONFIG_PINCTRL_S3C24XX=yCONFIG_PINCTRL_S3C64XX=yCONFIG_PINCTRL_SPRD=yCONFIG_PINCTRL_SPRD_SC9860=yCONFIG_PINCTRL_STARFIVE_JH7100=yCONFIG_PINCTRL_STM32=yCONFIG_PINCTRL_STM32F429=yCONFIG_PINCTRL_STM32F469=yCONFIG_PINCTRL_STM32F746=yCONFIG_PINCTRL_STM32F769=yCONFIG_PINCTRL_STM32H743=yCONFIG_PINCTRL_STM32MP135=yCONFIG_PINCTRL_STM32MP157=yCONFIG_PINCTRL_TI_IODELAY=yCONFIG_PINCTRL_UNIPHIER=yCONFIG_PINCTRL_UNIPHIER_LD4=yCONFIG_PINCTRL_UNIPHIER_PRO4=yCONFIG_PINCTRL_UNIPHIER_SLD8=yCONFIG_PINCTRL_UNIPHIER_PRO5=yCONFIG_PINCTRL_UNIPHIER_PXS2=yCONFIG_PINCTRL_UNIPHIER_LD6B=yCONFIG_PINCTRL_UNIPHIER_LD11=yCONFIG_PINCTRL_UNIPHIER_LD20=yCONFIG_PINCTRL_UNIPHIER_PXS3=yCONFIG_PINCTRL_UNIPHIER_NX1=yCONFIG_PINCTRL_VISCONTI=yCONFIG_PINCTRL_TMPV7700=yCONFIG_GPIOLIB=yCONFIG_GPIOLIB_FASTPATH_LIMIT=512CONFIG_OF_GPIO=yCONFIG_GPIOLIB_IRQCHIP=yCONFIG_DEBUG_GPIO=yCONFIG_GPIO_SYSFS=yCONFIG_GPIO_CDEV=yCONFIG_GPIO_CDEV_V1=yCONFIG_GPIO_GENERIC=yCONFIG_GPIO_REGMAP=yCONFIG_GPIO_MAX730X=y
#
# Memory mapped GPIO drivers
#CONFIG_GPIO_74XX_MMIO=yCONFIG_GPIO_ALTERA=yCONFIG_GPIO_ASPEED=yCONFIG_GPIO_ASPEED_SGPIO=yCONFIG_GPIO_ATH79=yCONFIG_GPIO_RASPBERRYPI_EXP=yCONFIG_GPIO_BCM_KONA=yCONFIG_GPIO_BCM_XGS_IPROC=yCONFIG_GPIO_BRCMSTB=yCONFIG_GPIO_CADENCE=yCONFIG_GPIO_CLPS711X=yCONFIG_GPIO_DWAPB=yCONFIG_GPIO_EIC_SPRD=yCONFIG_GPIO_EM=yCONFIG_GPIO_EXAR=yCONFIG_GPIO_FTGPIO010=yCONFIG_GPIO_GENERIC_PLATFORM=yCONFIG_GPIO_GRGPIO=yCONFIG_GPIO_HISI=yCONFIG_GPIO_HLWD=yCONFIG_GPIO_IMX_SCU=yCONFIG_GPIO_IOP=yCONFIG_GPIO_LOGICVC=yCONFIG_GPIO_LPC18XX=yCONFIG_GPIO_LPC32XX=yCONFIG_GPIO_MB86S7X=yCONFIG_GPIO_MENZ127=yCONFIG_GPIO_MPC8XXX=yCONFIG_GPIO_MT7621=yCONFIG_GPIO_MXC=yCONFIG_GPIO_MXS=yCONFIG_GPIO_PMIC_EIC_SPRD=yCONFIG_GPIO_PXA=yCONFIG_GPIO_RCAR=yCONFIG_GPIO_RDA=yCONFIG_GPIO_ROCKCHIP=yCONFIG_GPIO_SAMA5D2_PIOBU=yCONFIG_GPIO_SIFIVE=yCONFIG_GPIO_SIOX=yCONFIG_GPIO_SNPS_CREG=yCONFIG_GPIO_SPRD=yCONFIG_GPIO_STP_XWAY=yCONFIG_GPIO_SYSCON=yCONFIG_GPIO_TEGRA=yCONFIG_GPIO_TEGRA186=yCONFIG_GPIO_TS4800=yCONFIG_GPIO_THUNDERX=yCONFIG_GPIO_UNIPHIER=yCONFIG_GPIO_VISCONTI=yCONFIG_GPIO_VX855=yCONFIG_GPIO_WCD934X=yCONFIG_GPIO_XGENE_SB=yCONFIG_GPIO_XILINX=yCONFIG_GPIO_XLP=yCONFIG_GPIO_AMD_FCH=yCONFIG_GPIO_IDT3243X=y
# end of Memory mapped GPIO drivers
#
# I2C GPIO expanders
#CONFIG_GPIO_ADNP=yCONFIG_GPIO_GW_PLD=yCONFIG_GPIO_MAX7300=yCONFIG_GPIO_MAX732X=yCONFIG_GPIO_MAX732X_IRQ=yCONFIG_GPIO_PCA953X=yCONFIG_GPIO_PCA953X_IRQ=yCONFIG_GPIO_PCA9570=yCONFIG_GPIO_PCF857X=yCONFIG_GPIO_TPIC2810=yCONFIG_GPIO_TS4900=y
# end of I2C GPIO expanders
8,438 lines not shown · raw message
Part of this message is not shown here. View the raw message.
Hi Xiaoyong Lu,
Sorry about chiming in only at v6. Please see inline below.
Andrzej
W dniu 17.11.2022 o 07:17, Xiaoyong Lu pisze:
Quoted 909 lines
Add mediatek av1 decoder linux driver which use the stateless API in MT8195.
Signed-off-by Xiaoyong Lu<[email protected]>---
Changes from v5:- change av1 PROFILE and LEVEL cfg
- test by av1 fluster, result is 173/239Changes from v4:
- convert
vb2_find_timestamptovb2_find_buffer
- test by av1 fluster, result is 173/239Changes from v3:
- modify comment for struct
vdec_av1_slice_slot
- add defineSEG_LVL_ALT_Q
- change use_lr/use_chroma_lr parse from av1 spec
- useARRAY_SIZEto replace size forloop_filter_levelandloop_filter_mode_deltas
- change array size ofloop_filter_mode_deltasfrom 4 to 2
- add defineSECONDARY_FILTER_STRENGTH_NUM_BITS
- change some hex values from upper case to lower case
- change*dpb_szequal toV4L2_AV1_TOTAL_REFS_PER_FRAME+ 1
- test by av1 fluster, result is 173/239Changes from v2:
- Match with av1 uapi v3 modify
- test by av1 fluster, result is 173/239---
Reference series:
[1]: v3 of this series is presend by Daniel Almeida.message-id: [email protected].../media/platform/mediatek/vcodec/Makefile | 1 + .../vcodec/mtk_vcodec_dec_stateless.c | 47 +- .../platform/mediatek/vcodec/mtk_vcodec_drv.h | 1 + .../vcodec/vdec/vdec_av1_req_lat_if.c | 2234 +++++++++++++++++ .../platform/mediatek/vcodec/vdec_drv_if.c | 4 + .../platform/mediatek/vcodec/vdec_drv_if.h | 1 + .../platform/mediatek/vcodec/vdec_msg_queue.c | 27 + .../platform/mediatek/vcodec/vdec_msg_queue.h | 4 + 8 files changed, 2318 insertions(+), 1 deletion(-)create mode 100644
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.cdrivers/media/platform/mediatek/vcodec/Makefile +1
-0@@ -10,6 +10,7 @@ mtk-vcodec-dec-y := vdec/vdec_h264_if.o \ vdec/vdec_vp8_req_if.o \ vdec/vdec_vp9_if.o \ vdec/vdec_vp9_req_lat_if.o \ + vdec/vdec_av1_req_lat_if.o \ vdec/vdec_h264_req_if.o \ vdec/vdec_h264_req_common.o \ vdec/vdec_h264_req_multi_if.o \drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.c +46
-1@@ -107,11 +107,51 @@ static const struct mtk_stateless_control mtk_stateless_controls[] = { }, .codec_type = V4L2_PIX_FMT_VP9_FRAME, }, + { + .cfg = { + .id =V4L2_CID_STATELESS_AV1_SEQUENCE , + + }, + .codec_type = V4L2_PIX_FMT_AV1_FRAME, + }, + { + .cfg = { + .id =V4L2_CID_STATELESS_AV1_FRAME , + + }, + .codec_type = V4L2_PIX_FMT_AV1_FRAME, + }, + { + .cfg = { + .id =V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY , + .dims = { V4L2_AV1_MAX_TILE_COUNT }, + + }, + .codec_type = V4L2_PIX_FMT_AV1_FRAME, + }, + { + .cfg = { + .id =V4L2_CID_STATELESS_AV1_PROFILE , + .min = V4L2_STATELESS_AV1_PROFILE_MAIN, + .def = V4L2_STATELESS_AV1_PROFILE_MAIN, + .max = V4L2_STATELESS_AV1_PROFILE_MAIN, + }, + .codec_type = V4L2_PIX_FMT_AV1_FRAME, + }, + { + .cfg = { + .id =V4L2_CID_STATELESS_AV1_LEVEL , + .min = V4L2_STATELESS_AV1_LEVEL_2_0, + .def = V4L2_STATELESS_AV1_LEVEL_4_0, + .max = V4L2_STATELESS_AV1_LEVEL_5_1, + }, + .codec_type = V4L2_PIX_FMT_AV1_FRAME, + }, };#define NUM_CTRLS ARRAY_SIZE(mtk_stateless_controls) -static struct mtk_video_fmt mtk_video_formats[5 ]; +static struct mtk_video_fmt mtk_video_formats[6 ];static struct mtk_video_fmt default_out_format;static struct mtk_video_fmt default_cap_format;@@ -351,6 +391,7 @@ static void mtk_vcodec_add_formats(unsigned int fourcc,case V4L2_PIX_FMT_H264_SLICE :case V4L2_PIX_FMT_VP8_FRAME :case V4L2_PIX_FMT_VP9_FRAME : +case V4L2_PIX_FMT_AV1_FRAME : mtk_video_formats[count_formats].fourcc = fourcc; mtk_video_formats[count_formats].type =MTK_FMT_DEC ; mtk_video_formats[count_formats].num_planes =1 ;@@ -407,6 +448,10 @@ static void mtk_vcodec_get_supported_formats(struct mtk_vcodec_ctx *ctx)mtk_vcodec_add_formats (V4L2_PIX_FMT_VP9_FRAME , ctx); out_format_count++; } +if (ctx->dev->dec_capability &MTK_VDEC_FORMAT_AV1_FRAME ) { +mtk_vcodec_add_formats (V4L2_PIX_FMT_AV1_FRAME , ctx); + out_format_count++; + }if (cap_format_count) default_cap_format = mtk_video_formats[cap_format_count -1 ];drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0@@ -344,6 +344,7 @@ enum mtk_vdec_format_types {MTK_VDEC_FORMAT_H264_SLICE =0x100 ,MTK_VDEC_FORMAT_VP8_FRAME =0x200 ,MTK_VDEC_FORMAT_VP9_FRAME =0x400 , +MTK_VDEC_FORMAT_AV1_FRAME =0x800 , MTK_VCODEC_INNER_RACING = 0x20000, };drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +755
-0@@ -0,0 +1,2234 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (c) 2022 MediaTek Inc. +* Author: Xiaoyong Lu <[email protected]> +*/ + +#include <linux/module.h> +#include <linux/slab.h> +#include <media/videobuf2-dma-contig.h> + +#include "../mtk_vcodec_util.h" +#include "../mtk_vcodec_dec.h" +#include "../mtk_vcodec_intr.h" +#include "../vdec_drv_base.h" +#include "../vdec_drv_if.h" +#include "../vdec_vpu_if.h" + +#define AV1_MAX_FRAME_BUF_COUNT (V4L2_AV1_TOTAL_REFS_PER_FRAME + 1) +#define AV1_TILE_BUF_SIZE 64 +#define AV1_SCALE_SUBPEL_BITS 10 +#define AV1_REF_SCALE_SHIFT 14 +#define AV1_REF_NO_SCALE BIT(AV1_REF_SCALE_SHIFT) +#define AV1_REF_INVALID_SCALE -1 + +#define AV1_INVALID_IDX -1 + +#define AV1_DIV_ROUND_UP_POW2 (value, n) \ +({ \ + typeof(n) _n = n; \ + typeof(value) _value = value; \ + (_value + (BIT(_n) >> 1)) >> _n; \ +}) + +#define AV1_DIV_ROUND_UP_POW2_SIGNED (value, n) \ +({ \ + typeof(n) _n_ = n; \ + typeof(value) _value_ = value; \ + (((_value_) < 0) ? -AV1_DIV_ROUND_UP_POW2(-(_value_), (_n_)) \ + : AV1_DIV_ROUND_UP_POW2((_value_), (_n_))); \ +}) + +#define BIT_FLAG (x, bit) (!!((x)->flags & (bit))) +#define SEGMENTATION_FLAG (x, name) (!!((x)->flags & V4L2_AV1_SEGMENTATION_FLAG_##name)) +#define QUANT_FLAG (x, name) (!!((x)->flags & V4L2_AV1_QUANTIZATION_FLAG_##name)) +#define SEQUENCE_FLAG (x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name)) +#define FH_FLAG (x, name) (!!((x)->flags & V4L2_AV1_FRAME_FLAG_##name)) + +#define MINQ 0 +#define MAXQ 255 + +#define DIV_LUT_PREC_BITS 14 +#define DIV_LUT_BITS 8 +#define DIV_LUT_NUM BIT(DIV_LUT_BITS) +#define WARP_PARAM_REDUCE_BITS 6 +#define WARPEDMODEL_PREC_BITS 16 + +#define SEG_LVL_ALT_Q 0 +#define SECONDARY_FILTER_STRENGTH_NUM_BITS 2 + +static const short div_lut[DIV_LUT_NUM +1 ] = { +16384 ,16320 ,16257 ,16194 ,16132 ,16070 ,16009 ,15948 ,15888 ,15828 ,15768 , +15709 ,15650 ,15592 ,15534 ,15477 ,15420 ,15364 ,15308 ,15252 ,15197 ,15142 , +15087 ,15033 ,14980 ,14926 ,14873 ,14821 ,14769 ,14717 ,14665 ,14614 ,14564 , +14513 ,14463 ,14413 ,14364 ,14315 ,14266 ,14218 ,14170 ,14122 ,14075 ,14028 , +13981 ,13935 ,13888 ,13843 ,13797 ,13752 ,13707 ,13662 ,13618 ,13574 ,13530 , +13487 ,13443 ,13400 ,13358 ,13315 ,13273 ,13231 ,13190 ,13148 ,13107 ,13066 , +13026 ,12985 ,12945 ,12906 ,12866 ,12827 ,12788 ,12749 ,12710 ,12672 ,12633 , +12596 ,12558 ,12520 ,12483 ,12446 ,12409 ,12373 ,12336 ,12300 ,12264 ,12228 , +12193 ,12157 ,12122 ,12087 ,12053 ,12018 ,11984 ,11950 ,11916 ,11882 ,11848 , +11815 ,11782 ,11749 ,11716 ,11683 ,11651 ,11619 ,11586 ,11555 ,11523 ,11491 , +11460 ,11429 ,11398 ,11367 ,11336 ,11305 ,11275 ,11245 ,11215 ,11185 ,11155 , +11125 ,11096 ,11067 ,11038 ,11009 ,10980 ,10951 ,10923 ,10894 ,10866 ,10838 , +10810 ,10782 ,10755 ,10727 ,10700 ,10673 ,10645 ,10618 ,10592 ,10565 ,10538 , +10512 ,10486 ,10460 ,10434 ,10408 ,10382 ,10356 ,10331 ,10305 ,10280 ,10255 , +10230 ,10205 ,10180 ,10156 ,10131 ,10107 ,10082 ,10058 ,10034 ,10010 ,9986 , +9963 ,9939 ,9916 ,9892 ,9869 ,9846 ,9823 ,9800 ,9777 ,9754 ,9732 , +9709 ,9687 ,9664 ,9642 ,9620 ,9598 ,9576 ,9554 ,9533 ,9511 ,9489 , +9468 ,9447 ,9425 ,9404 ,9383 ,9362 ,9341 ,9321 ,9300 ,9279 ,9259 , +9239 ,9218 ,9198 ,9178 ,9158 ,9138 ,9118 ,9098 ,9079 ,9059 ,9039 , +9020 ,9001 ,8981 ,8962 ,8943 ,8924 ,8905 ,8886 ,8867 ,8849 ,8830 , +8812 ,8793 ,8775 ,8756 ,8738 ,8720 ,8702 ,8684 ,8666 ,8648 ,8630 , +8613 ,8595 ,8577 ,8560 ,8542 ,8525 ,8508 ,8490 ,8473 ,8456 ,8439 , +8422 ,8405 ,8389 ,8372 ,8355 ,8339 ,8322 ,8306 ,8289 ,8273 ,8257 , +8240 ,8224 ,8208 ,8192 , +}; + +/** +* struct vdec_av1_slice_init_vsi - VSI used to initialize instance +* @architecture: architecture type +* @reserved: reserved +* @core_vsi: for core vsi +* @cdf_table_addr: cdf table addr +* @cdf_table_size: cdf table size +* @iq_table_addr: iq table addr +* @iq_table_size: iq table size +* @vsi_size: share vsi structure size +*/ +struct vdec_av1_slice_init_vsi { +u32 architecture; +u32 reserved; +u64 core_vsi; +u64 cdf_table_addr; +u32 cdf_table_size; +u64 iq_table_addr; +u32 iq_table_size; +u32 vsi_size; +}; + +/** +* struct vdec_av1_slice_mem - memory address and size +* @buf: dma_addr padding +* @dma_addr: buffer address +* @size: buffer size +* @dma_addr_end: buffer end address +* @padding: for padding +*/ +struct vdec_av1_slice_mem { +union { +u64 buf; +dma_addr_t dma_addr; + }; +union { +size_t size; +dma_addr_t dma_addr_end; +u64 padding; + }; +}; + +/** +* struct vdec_av1_slice_state - decoding state +* @err : err type for decode +* @full : transcoded buffer is full or not +* @timeout : decode timeout or not +* @perf : performance enable +* @crc : hw checksum +* @out_size : hw output size +*/ +struct vdec_av1_slice_state { +int err; +u32 full; +u32 timeout; +u32 perf; +u32 crc[16 ]; +u32 out_size; +}; + +/* +* enum vdec_av1_slice_resolution_level - resolution level +*/ +enum vdec_av1_slice_resolution_level { +AV1_RES_NONE , +AV1_RES_FHD , +AV1_RES_4K , +AV1_RES_8K , +}; + +/* +* enum vdec_av1_slice_frame_type - av1 frame type +*/ +enum vdec_av1_slice_frame_type { +AV1_KEY_FRAME =0 , +AV1_INTER_FRAME , +AV1_INTRA_ONLY_FRAME , +AV1_SWITCH_FRAME , +AV1_FRAME_TYPES , +}; + +/* +* enum vdec_av1_slice_reference_mode - reference mode type +*/ +enum vdec_av1_slice_reference_mode { +AV1_SINGLE_REFERENCE =0 , +AV1_COMPOUND_REFERENCE , +AV1_REFERENCE_MODE_SELECT , +AV1_REFERENCE_MODES , +}; + +/** +* struct vdec_av1_slice_tile_group - info for each tile +* @num_tiles: tile number +* @tile_size: input size for each tile +* @tile_start_offset: tile offset to input buffer +*/ +struct vdec_av1_slice_tile_group { +u32 num_tiles; +u32 tile_size[V4L2_AV1_MAX_TILE_COUNT ]; +u32 tile_start_offset[V4L2_AV1_MAX_TILE_COUNT ]; +}; + +/** +* struct vdec_av1_slice_scale_factors - scale info for each ref frame +* @is_scaled: frame is scaled or not +* @x_scale: frame width scale coefficient +* @y_scale: frame height scale coefficient +* @x_step: width step for x_scale +* @y_step: height step for y_scale +*/ +struct vdec_av1_slice_scale_factors { +u8 is_scaled; +int x_scale; +int y_scale; +int x_step; +int y_step; +}; + +/** +* struct vdec_av1_slice_frame_refs - ref frame info +* @ref_fb_idx: ref slot index +* @ref_map_idx: ref frame index +* @scale_factors: scale factors for each ref frame +*/ +struct vdec_av1_slice_frame_refs { +int ref_fb_idx; +int ref_map_idx; +struct vdec_av1_slice_scale_factors scale_factors; +}; + +/** +* struct vdec_av1_slice_gm - AV1 Global Motion parameters +* @wmtype: The type of global motion transform used +* @wmmat: gm_params +* @alpha: alpha info +* @beta: beta info +* @gamma: gamma info +* @delta: delta info +* @invalid: is invalid or not +*/ +struct vdec_av1_slice_gm { +int wmtype; +int wmmat[8 ]; +short alpha; +short beta; +short gamma; +short delta; +char invalid; +}; + +/** +* struct vdec_av1_slice_sm - AV1 Skip Mode parameters +* @skip_mode_allowed: Skip Mode is allowed or not +* @skip_mode_present: specified that the skip_mode will be present or not +* @skip_mode_frame: specifies the frames to use for compound prediction +*/ +struct vdec_av1_slice_sm { +u8 skip_mode_allowed; +u8 skip_mode_present; +int skip_mode_frame[2 ]; +}; + +/** +* struct vdec_av1_slice_seg - AV1 Segmentation params +* @segmentation_enabled: this frame makes use of the segmentation tool or not +* @segmentation_update_map: segmentation map are updated during the decoding frame +* @segmentation_temporal_update:segmentation map are coded relative the existing segmentaion map +* @segmentation_update_data: new parameters are about to be specified for each segment +* @feature_data: specifies the feature data for a segment feature +* @feature_enabled_mask: the corresponding feature value is coded or not. +* @segid_preskip: segment id will be read before the skip syntax element. +* @last_active_segid: the highest numbered segment id that has some enabled feature +*/ +struct vdec_av1_slice_seg { +u8 segmentation_enabled; +u8 segmentation_update_map; +u8 segmentation_temporal_update; +u8 segmentation_update_data; +int feature_data[V4L2_AV1_MAX_SEGMENTS ][V4L2_AV1_SEG_LVL_MAX ]; +u16 feature_enabled_mask[V4L2_AV1_MAX_SEGMENTS ]; +int segid_preskip; +int last_active_segid; +}; + +/** +* struct vdec_av1_slice_delta_q_lf - AV1 Loop Filter delta parameters +* @delta_q_present: specified whether quantizer index delta values are present +* @delta_q_res: specifies the left shift which should be applied to decoded quantizer index +* @delta_lf_present: specifies whether loop filter delta values are present +* @delta_lf_res: specifies the left shift which should be applied to decoded +* loop filter delta values +* @delta_lf_multi: specifies that separate loop filter deltas are sent for horizontal +* luma edges,vertical luma edges,the u edges, and the v edges. +*/ +struct vdec_av1_slice_delta_q_lf { +u8 delta_q_present; +u8 delta_q_res; +u8 delta_lf_present; +u8 delta_lf_res; +u8 delta_lf_multi; +}; + +/** +* struct vdec_av1_slice_quantization - AV1 Quantization params +* @base_q_idx: indicates the base frame qindex. This is used for Y AC +* coefficients and as the base value for the other quantizers. +* @qindex: qindex +* @delta_qydc: indicates the Y DC quantizer relative to base_q_idx +* @delta_qudc: indicates the U DC quantizer relative to base_q_idx. +* @delta_quac: indicates the U AC quantizer relative to base_q_idx +* @delta_qvdc: indicates the V DC quantizer relative to base_q_idx +* @delta_qvac: indicates the V AC quantizer relative to base_q_idx +* @using_qmatrix: specifies that the quantizer matrix will be used to +* compute quantizers +* @qm_y: specifies the level in the quantizer matrix that should +* be used for luma plane decoding +* @qm_u: specifies the level in the quantizer matrix that should +* be used for chroma U plane decoding. +* @qm_v: specifies the level in the quantizer matrix that should be +* used for chroma V plane decoding +*/ +struct vdec_av1_slice_quantization { +int base_q_idx; +int qindex[V4L2_AV1_MAX_SEGMENTS ]; +int delta_qydc; +int delta_qudc; +int delta_quac; +int delta_qvdc; +int delta_qvac; +u8 using_qmatrix; +u8 qm_y; +u8 qm_u; +u8 qm_v; +}; + +/** +* struct vdec_av1_slice_lr - AV1 Loop Restauration parameters +* @use_lr: whether to use loop restoration +* @use_chroma_lr: whether to use chroma loop restoration +* @frame_restoration_type: specifies the type of restoration used for each plane +* @loop_restoration_size: pecifies the size of loop restoration units in units +* of samples in the current plane +*/ +struct vdec_av1_slice_lr { +u8 use_lr; +u8 use_chroma_lr; +u8 frame_restoration_type[V4L2_AV1_NUM_PLANES_MAX ]; +u32 loop_restoration_size[V4L2_AV1_NUM_PLANES_MAX ]; +}; + +/** +* struct vdec_av1_slice_loop_filter - AV1 Loop filter parameters +* @loop_filter_level: an array containing loop filter strength values. +* @loop_filter_ref_deltas: contains the adjustment needed for the filter +* level based on the chosen reference frame +* @loop_filter_mode_deltas: contains the adjustment needed for the filter +* level based on the chosen mode +* @loop_filter_sharpness: indicates the sharpness level. The loop_filter_level +* and loop_filter_sharpness together determine when +* a block edge is filtered, and by how much the +* filtering can change the sample values +* @loop_filter_delta_enabled: filetr level depends on the mode and reference +* frame used to predict a block +*/ +struct vdec_av1_slice_loop_filter { +u8 loop_filter_level[4 ]; +int loop_filter_ref_deltas[V4L2_AV1_TOTAL_REFS_PER_FRAME ]; +int loop_filter_mode_deltas[2 ]; +u8 loop_filter_sharpness; +u8 loop_filter_delta_enabled; +}; + +/** +* struct vdec_av1_slice_cdef - AV1 CDEF parameters +* @cdef_damping: controls the amount of damping in the deringing filter +* @cdef_y_strength: specifies the strength of the primary filter and secondary filter +* @cdef_uv_strength: specifies the strength of the primary filter and secondary filter +* @cdef_bits: specifies the number of bits needed to specify which +* CDEF filter to apply +*/ +struct vdec_av1_slice_cdef { +u8 cdef_damping; +u8 cdef_y_strength[8 ]; +u8 cdef_uv_strength[8 ]; +u8 cdef_bits; +}; + +/** +* struct vdec_av1_slice_mfmv - AV1 mfmv parameters +* @mfmv_valid_ref: mfmv_valid_ref +* @mfmv_dir: mfmv_dir +* @mfmv_ref_to_cur: mfmv_ref_to_cur +* @mfmv_ref_frame_idx: mfmv_ref_frame_idx +* @mfmv_count: mfmv_count +*/ +struct vdec_av1_slice_mfmv { +u32 mfmv_valid_ref[3 ]; +u32 mfmv_dir[3 ]; +int mfmv_ref_to_cur[3 ]; +int mfmv_ref_frame_idx[3 ]; +int mfmv_count; +}; + +/** +* struct vdec_av1_slice_tile - AV1 Tile info +* @tile_cols: specifies the number of tiles across the frame +* @tile_rows: pecifies the number of tiles down the frame +* @mi_col_starts: an array specifying the start column +* @mi_row_starts: an array specifying the start row +* @context_update_tile_id: specifies which tile to use for the CDF update +* @uniform_tile_spacing_flag: tiles are uniformly spaced across the frame +* or the tile sizes are coded +*/ +struct vdec_av1_slice_tile { +u8 tile_cols; +u8 tile_rows; +int mi_col_starts[V4L2_AV1_MAX_TILE_COLS +1 ]; +int mi_row_starts[V4L2_AV1_MAX_TILE_ROWS +1 ]; +u8 context_update_tile_id; +u8 uniform_tile_spacing_flag; +}; + +/** +* struct vdec_av1_slice_uncompressed_header - Represents an AV1 Frame Header OBU +* @use_ref_frame_mvs: use_ref_frame_mvs flag +* @order_hint: specifies OrderHintBits least significant bits of the expected +* @gm: global motion param +* @upscaled_width: the upscaled width +* @frame_width: frame's width +* @frame_height: frame's height +* @reduced_tx_set: frame is restricted to a reduced subset of the full +* set of transform types +* @tx_mode: specifies how the transform size is determined +* @uniform_tile_spacing_flag: tiles are uniformly spaced across the frame +* or the tile sizes are coded +* @interpolation_filter: specifies the filter selection used for performing inter prediction +* @allow_warped_motion: motion_mode may be present or not +* @is_motion_mode_switchable : euqlt to 0 specifies that only the SIMPLE motion mode will be used +* @reference_mode : frame reference mode selected +* @allow_high_precision_mv: specifies that motion vectors are specified to +* quarter pel precision or to eighth pel precision +* @allow_intra_bc: ubducates that intra block copy may be used in this frame +* @force_integer_mv: specifies motion vectors will always be integers or +* can contain fractional bits +* @allow_screen_content_tools: intra blocks may use palette encoding +* @error_resilient_mode: error resislent mode is enable/disable +* @frame_type: specifies the AV1 frame type +* @primary_ref_frame: specifies which reference frame contains the CDF values +* and other state that should be loaded at the start of the frame +* slots will be updated with the current frame after it is decoded +* @disable_frame_end_update_cdf:indicates the end of frame CDF update is disable or enable +* @disable_cdf_update: specified whether the CDF update in the symbol +* decoding process should be disables +* @skip_mode: av1 skip mode parameters +* @seg: av1 segmentaon parameters +* @delta_q_lf: av1 delta loop fileter +* @quant: av1 Quantization params +* @lr: av1 Loop Restauration parameters +* @superres_denom: the denominator for the upscaling ratio +* @loop_filter: av1 Loop filter parameters +* @cdef: av1 CDEF parameters +* @mfmv: av1 mfmv parameters +* @tile: av1 Tile info +* @frame_is_intra: intra frame +* @loss_less_array: loss less array +* @coded_loss_less: coded lsss less +* @mi_rows: size of mi unit in rows +* @mi_cols: size of mi unit in cols +*/ +struct vdec_av1_slice_uncompressed_header { +u8 use_ref_frame_mvs; +int order_hint; +struct vdec_av1_slice_gm gm[V4L2_AV1_TOTAL_REFS_PER_FRAME ]; +u32 upscaled_width; +u32 frame_width; +u32 frame_height; +u8 reduced_tx_set; +u8 tx_mode; +u8 uniform_tile_spacing_flag; +u8 interpolation_filter; +u8 allow_warped_motion; +u8 is_motion_mode_switchable; +u8 reference_mode; +u8 allow_high_precision_mv; +u8 allow_intra_bc; +u8 force_integer_mv; +u8 allow_screen_content_tools; +u8 error_resilient_mode; +u8 frame_type; +u8 primary_ref_frame; +u8 disable_frame_end_update_cdf; +u32 disable_cdf_update; +struct vdec_av1_slice_sm skip_mode; +struct vdec_av1_slice_seg seg; +struct vdec_av1_slice_delta_q_lf delta_q_lf; +struct vdec_av1_slice_quantization quant; +struct vdec_av1_slice_lr lr; +u32 superres_denom; +struct vdec_av1_slice_loop_filter loop_filter; +struct vdec_av1_slice_cdef cdef; +struct vdec_av1_slice_mfmv mfmv; +struct vdec_av1_slice_tile tile; +u8 frame_is_intra; +u8 loss_less_array[V4L2_AV1_MAX_SEGMENTS ]; +u8 coded_loss_less; +u32 mi_rows; +u32 mi_cols; +}; + +/** +* struct vdec_av1_slice_seq_header - Represents an AV1 Sequence OBU +* @bitdepth: the bitdepth to use for the sequence +* @enable_superres: specifies whether the use_superres syntax element may be present +* @enable_filter_intra: specifies the use_filter_intra syntax element may be present +* @enable_intra_edge_filter: whether the intra edge filtering process should be enabled +* @enable_interintra_compound: specifies the mode info fo rinter blocks may +* contain the syntax element interintra +* @enable_masked_compound: specifies the mode info fo rinter blocks may +* contain the syntax element compound_type +* @enable_dual_filter: the inter prediction filter type may be specified independently +* @enable_jnt_comp: distance weights process may be used for inter prediction +* @mono_chrome: indicates the video does not contain U and V color planes +* @enable_order_hint: tools based on the values of order hints may be used +* @order_hint_bits: the number of bits used for the order_hint field at each frame +* @use_128x128_superblock: indicates superblocks contain 128*128 luma samples +* @subsampling_x: the chroma subsamling format +* @subsampling_y: the chroma subsamling format +* @max_frame_width: the maximum frame width for the frames represented by sequence +* @max_frame_height: the maximum frame height for the frames represented by sequence +*/ +struct vdec_av1_slice_seq_header { +u8 bitdepth; +u8 enable_superres; +u8 enable_filter_intra; +u8 enable_intra_edge_filter; +u8 enable_interintra_compound; +u8 enable_masked_compound; +u8 enable_dual_filter; +u8 enable_jnt_comp; +u8 mono_chrome; +u8 enable_order_hint; +u8 order_hint_bits; +u8 use_128x128_superblock; +u8 subsampling_x; +u8 subsampling_y; +u32 max_frame_width; +u32 max_frame_height; +}; + +/** +* struct vdec_av1_slice_frame - Represents current Frame info +* @uh: uncompressed header info +* @seq: sequence header info +* @large_scale_tile: is large scale mode +* @cur_ts: current frame timestamp +* @prev_fb_idx: prev slot id +* @ref_frame_sign_bias: arrays for ref_frame sign bias +* @order_hints: arrays for ref_frame order hint +* @ref_frame_valid: arrays for valid ref_frame +* @ref_frame_map: map to slot frame info +* @frame_refs: ref_frame info +*/ +struct vdec_av1_slice_frame { +struct vdec_av1_slice_uncompressed_header uh; +struct vdec_av1_slice_seq_header seq; +u8 large_scale_tile; +u64 cur_ts; +int prev_fb_idx; +u8 ref_frame_sign_bias[V4L2_AV1_TOTAL_REFS_PER_FRAME ]; +u32 order_hints[V4L2_AV1_REFS_PER_FRAME ]; +u32 ref_frame_valid[V4L2_AV1_REFS_PER_FRAME ]; +int ref_frame_map[V4L2_AV1_TOTAL_REFS_PER_FRAME ]; +struct vdec_av1_slice_frame_refs frame_refs[V4L2_AV1_REFS_PER_FRAME ]; +}; + +/** +* struct vdec_av1_slice_work_buffer - work buffer for lat +* @mv_addr: mv buffer memory info +* @cdf_addr: cdf buffer memory info +* @segid_addr: segid buffer memory info +*/ +struct vdec_av1_slice_work_buffer { +struct vdec_av1_slice_mem mv_addr; +struct vdec_av1_slice_mem cdf_addr; +struct vdec_av1_slice_mem segid_addr; +}; + +/** +* struct vdec_av1_slice_frame_info - frame info for each slot +* @frame_type: frame type +* @frame_is_intra: is intra frame +* @order_hint: order hint +* @order_hints: referece frame order hint +* @upscaled_width: upscale width +* @pic_pitch: buffer pitch +* @frame_width: frane width +* @frame_height: frame height +* @mi_rows: rows in mode info +* @mi_cols: cols in mode info +* @ref_count: mark to reference frame counts +*/ +struct vdec_av1_slice_frame_info { +u8 frame_type; +u8 frame_is_intra; +int order_hint; +u32 order_hints[V4L2_AV1_REFS_PER_FRAME ]; +u32 upscaled_width; +u32 pic_pitch; +u32 frame_width; +u32 frame_height; +u32 mi_rows; +u32 mi_cols; +int ref_count; +}; + +/** +* struct vdec_av1_slice_slot - slot info that needs to be saved in the global instance +* @frame_info: frame info for each slot +* @timestamp: time stamp info +*/ +struct vdec_av1_slice_slot { +struct vdec_av1_slice_frame_info frame_info[AV1_MAX_FRAME_BUF_COUNT ]; +u64 timestamp[AV1_MAX_FRAME_BUF_COUNT ]; +}; + +/** +* struct vdec_av1_slice_fb - frame buffer for decoding +* @y: current y buffer address info +* @c: current c buffer address info +*/ +struct vdec_av1_slice_fb { +struct vdec_av1_slice_mem y; +struct vdec_av1_slice_mem c; +}; + +/** +* struct vdec_av1_slice_vsi - exchange frame information between Main CPU and MicroP +* @bs: input buffer info +* @work_buffer: working buffe for hw +* @cdf_table: cdf_table buffer +* @cdf_tmp: cdf temp buffer +* @rd_mv: mv buffer for lat output , core input +* @ube: ube buffer +* @trans: transcoded buffer +* @err_map: err map buffer +* @row_info: row info buffer +* @fb: current y/c buffer +* @ref: ref y/c buffer +* @iq_table: iq table buffer +* @tile: tile buffer +* @slots: slots info for each frame +* @slot_id: current frame slot id +* @frame: current frame info +* @state: status after decode done +* @cur_lst_tile_id: tile id for large scale +*/ +struct vdec_av1_slice_vsi { +/* lat */ +struct vdec_av1_slice_mem bs; +struct vdec_av1_slice_work_buffer work_buffer[AV1_MAX_FRAME_BUF_COUNT ]; +struct vdec_av1_slice_mem cdf_table; +struct vdec_av1_slice_mem cdf_tmp; +/* LAT stage's output, Core stage's input */ +struct vdec_av1_slice_mem rd_mv; +struct vdec_av1_slice_mem ube; +struct vdec_av1_slice_mem trans; +struct vdec_av1_slice_mem err_map; +struct vdec_av1_slice_mem row_info; +/* core */ +struct vdec_av1_slice_fb fb; +struct vdec_av1_slice_fb ref[V4L2_AV1_REFS_PER_FRAME ]; +struct vdec_av1_slice_mem iq_table; +/* lat and core share*/ +struct vdec_av1_slice_mem tile; +struct vdec_av1_slice_slot slots; +u8 slot_id; +struct vdec_av1_slice_frame frame; +struct vdec_av1_slice_state state; +u32 cur_lst_tile_id; +}; + +/** +* struct vdec_av1_slice_pfc - per-frame context that contains a local vsi. +* pass it from lat to core +* @vsi: local vsi. copy to/from remote vsi before/after decoding +* @ref_idx: reference buffer timestamp +* @seq: picture sequence +*/ +struct vdec_av1_slice_pfc { +struct vdec_av1_slice_vsi vsi; +u64 ref_idx[V4L2_AV1_REFS_PER_FRAME ]; +int seq; +}; + +/** +* struct vdec_av1_slice_instance - represent one av1 instance +* @ctx: pointer to codec's context +* @vpu: VPU instance +* @iq_table: iq table buffer +* @cdf_table: cdf table buffer +* @mv: mv working buffer +* @cdf: cdf working buffer +* @seg: segmentation working buffer +* @cdf_temp: cdf temp buffer +* @tile: tile buffer +* @slots: slots info +* @tile_group: tile_group entry +* @level: level of current resolution +* @width: width of last picture +* @height: height of last picture +* @frame_type: frame_type of last picture +* @irq: irq to Main CPU or MicroP +* @inneracing_mode: is inneracing mode +* @init_vsi: vsi used for initialized AV1 instance +* @vsi: vsi used for decoding/flush ... +* @core_vsi: vsi used for Core stage +* @seq: global picture sequence +*/ +struct vdec_av1_slice_instance { +struct mtk_vcodec_ctx *ctx; +struct vdec_vpu_inst vpu; + +struct mtk_vcodec_mem iq_table; +struct mtk_vcodec_mem cdf_table; + +struct mtk_vcodec_mem mv[AV1_MAX_FRAME_BUF_COUNT ]; +struct mtk_vcodec_mem cdf[AV1_MAX_FRAME_BUF_COUNT ]; +struct mtk_vcodec_mem seg[AV1_MAX_FRAME_BUF_COUNT ]; +struct mtk_vcodec_mem cdf_temp; +struct mtk_vcodec_mem tile; +struct vdec_av1_slice_slot slots; +struct vdec_av1_slice_tile_group tile_group; + +/* for resolution change and get_pic_info */ +enum vdec_av1_slice_resolution_level level; +u32 width; +u32 height; + +u32 frame_type; +u32 irq; +u32 inneracing_mode; + +/* MicroP vsi */ +union { +struct vdec_av1_slice_init_vsi *init_vsi; +struct vdec_av1_slice_vsi *vsi; + }; +struct vdec_av1_slice_vsi *core_vsi; +int seq; +}; + +static int vdec_av1_slice_core_decode (struct vdec_lat_buf *lat_buf); + +static inline int vdec_av1_slice_get_msb (u32 n) +{ +if (n ==0 ) +return 0 ; +return 31 ^__builtin_clz (n); +} + +static inline bool vdec_av1_slice_need_scale (u32 ref_width,u32 ref_height, +u32 this_width,u32 this_height) +{ +return ((this_width <<1 ) >= ref_width) && + ((this_height <<1 ) >= ref_height) && + (this_width <= (ref_width <<4 )) && + (this_height <= (ref_height <<4 )); +}
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 765
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+ +static void *vdec_av1_get_ctrl_ptr (struct mtk_vcodec_ctx *ctx,int id) +{ +struct v4l2_ctrl *ctrl =v4l2_ctrl_find (&ctx->ctrl_hdl, id); + +if (!ctrl) +return ERR_PTR (-EINVAL ); + +return ctrl->p_cur.p; +}
I see we keep repeating this kind of a v4l2_ctrl_find() wrapper in drivers. The only reason this code cannot be factored out is the "context" struct pointer pointing at structs of different types. Maybe we could
#define v4l2_get_ctrl_ptr(ctx, member, id) \ __v4l2_get_ctrl_ptr((ctx), offsetof(typeof(*ctx), (member)), (id))
void *__v4l2_get_ctrl_ptr(void *ctx, size_t offset, u32 id)
{
struct v4l2_ctrl_handler *hdl = (struct v4l2_ctrl_handler *)(ctx + offset);
struct v4l2_ctrl *ctrl = v4l2_ctrl_find(hdl, id);
if (!ctrl)
return ERR_PTR(-EINVAL);
return ctrl->p_cur.p;
}and reuse v4l2_get_ctrl_ptr() in drivers?
A similar kind of void* arithmetic happens in container_of, only with '-'.
Quoted 5 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +5
-0+ +static int vdec_av1_slice_init_cdf_table (struct vdec_av1_slice_instance *instance) +{ +u8 *remote_cdf_table; +struct mtk_vcodec_ctx *ctx;
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 780
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+struct vdec_av1_slice_init_vsi *vsi; +int ret; + + ctx = instance->ctx; + vsi = instance->vpu.vsi; +if (!ctx || !vsi) { +mtk_vcodec_err (instance,"invalid ctx or vsi 0x%p 0x%p\n" , + ctx, vsi); +return -EINVAL ; + }
The above if block is redundant, because - given the current shape of ths driver code - the condition is never true.
This function is only called from vdec_av1_slice_init(), where both instance->ctx and instance->vpu.vsi are set to some values. The latter is even checked for being null before this function is called.
In the caller, instance->ctx is set to whatever the caller receives from its caller. This perhaps might be checked, but vdec_av1_slice_init() dereferences ctx without checking anyway (instance->vpu.codec_type = ctx->current_codec;). So maybe add a check in vdec_av1_slice_init(), or ensure that vdec_av1_slice_init() is never passed a NULL ctx.
Quoted 28 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +28
-0+ + remote_cdf_table =mtk_vcodec_fw_map_dm_addr (ctx->dev->fw_handler, + (u32 )vsi->cdf_table_addr); +if (IS_ERR (remote_cdf_table)) { +mtk_vcodec_err (instance,"failed to map cdf table\n" ); +return PTR_ERR (remote_cdf_table); + } + +mtk_vcodec_debug (instance,"map cdf table to 0x%p\n" , + remote_cdf_table); + +if (instance->cdf_table.va) +mtk_vcodec_mem_free (ctx, &instance->cdf_table); + instance->cdf_table.size = vsi->cdf_table_size; + + ret =mtk_vcodec_mem_alloc (ctx, &instance->cdf_table); +if (ret) +return ret; + +memcpy (instance->cdf_table.va, remote_cdf_table, vsi->cdf_table_size); + +return 0 ; +} + +static int vdec_av1_slice_init_iq_table (struct vdec_av1_slice_instance *instance) +{ +u8 *remote_iq_table; +struct mtk_vcodec_ctx *ctx;
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 818
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+struct vdec_av1_slice_init_vsi *vsi; +int ret; + + ctx = instance->ctx; + vsi = instance->vpu.vsi; +if (!ctx || !vsi) { +mtk_vcodec_err (instance,"invalid ctx or vsi 0x%p 0x%p\n" , + ctx, vsi); +return -EINVAL ; + }
ditto
Quoted 35 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +35
-0+ + remote_iq_table =mtk_vcodec_fw_map_dm_addr (ctx->dev->fw_handler, + (u32 )vsi->iq_table_addr); +if (IS_ERR (remote_iq_table)) { +mtk_vcodec_err (instance,"failed to map iq table\n" ); +return PTR_ERR (remote_iq_table); + } + +mtk_vcodec_debug (instance,"map iq table to 0x%p\n" , remote_iq_table); + +if (instance->iq_table.va) +mtk_vcodec_mem_free (ctx, &instance->iq_table); + instance->iq_table.size = vsi->iq_table_size; + + ret =mtk_vcodec_mem_alloc (ctx, &instance->iq_table); +if (ret) +return ret; + +memcpy (instance->iq_table.va, remote_iq_table, vsi->iq_table_size); + +return 0 ; +} + +static int vdec_av1_slice_get_new_slot (struct vdec_av1_slice_vsi *vsi) +{ +struct vdec_av1_slice_slot *slots = &vsi->slots; +int new_slot_idx =AV1_INVALID_IDX ; +int i; + +for (i =0 ; i <AV1_MAX_FRAME_BUF_COUNT ; i++) { +if (slots->frame_info[i].ref_count ==0 ) { + new_slot_idx = i; +break ; + } + }
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 863
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+ +if (new_slot_idx !=AV1_INVALID_IDX ) { + slots->frame_info[new_slot_idx].ref_count++; + slots->timestamp[new_slot_idx] = vsi->frame.cur_ts; + } + +return new_slot_idx; +} + +static void vdec_av1_slice_clear_fb (struct vdec_av1_slice_frame_info *frame_info)
static inline void?
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 875
Quoted 12 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +12
-0+{ +memset ((void *)frame_info,0 ,sizeof (struct vdec_av1_slice_frame_info )); +} + +static void vdec_av1_slice_decrease_ref_count (struct vdec_av1_slice_slot *slots,int fb_idx) +{ +struct vdec_av1_slice_frame_info *frame_info = slots->frame_info; + +if (fb_idx <0 || fb_idx >=AV1_MAX_FRAME_BUF_COUNT ) { +mtk_v4l2_err ("av1_error: %s() invalid fb_idx %d\n" , __func__, fb_idx); +return ; + }
The above if block is redundant, because - given the current shape of this driver code - the condition is never true.
This function is only called from the below vdec_av1_slice_cleanup_slots(). The fb_idx formal param comes from the caller's slot_id local variable, whose value is only assigned in the for loop, iterating from 0 to AV1_MAX_FRAME_BUF_COUNT - 1, inclusive. Hence slot_id is never < 0 nor >= AV1_MAX_FRAME_BUF_COUNT.
Quoted 111 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +111
-0+ + frame_info[fb_idx].ref_count--; +if (frame_info[fb_idx].ref_count <0 ) { + frame_info[fb_idx].ref_count =0 ; +mtk_v4l2_err ("av1_error: %s() fb_idx %d decrease ref_count error\n" , + __func__, fb_idx); + } +vdec_av1_slice_clear_fb (&frame_info[fb_idx]); +} + +static void vdec_av1_slice_cleanup_slots (struct vdec_av1_slice_slot *slots, +struct vdec_av1_slice_frame *frame, +struct v4l2_ctrl_av1_frame *ctrl_fh) +{ +int slot_id, ref_id; + +for (ref_id =0 ; ref_id <V4L2_AV1_TOTAL_REFS_PER_FRAME ; ref_id++) + frame->ref_frame_map[ref_id] =AV1_INVALID_IDX ; + +for (slot_id =0 ; slot_id <AV1_MAX_FRAME_BUF_COUNT ; slot_id++) { +u64 timestamp = slots->timestamp[slot_id]; +bool ref_used = false; + +/* ignored unused slots */ +if (slots->frame_info[slot_id].ref_count ==0 ) +continue ; + +for (ref_id =0 ; ref_id <V4L2_AV1_TOTAL_REFS_PER_FRAME ; ref_id++) { +if (ctrl_fh->reference_frame_ts[ref_id] == timestamp) { + frame->ref_frame_map[ref_id] = slot_id; + ref_used = true; + } + } + +if (!ref_used) +vdec_av1_slice_decrease_ref_count (slots, slot_id); + } +} + +static void vdec_av1_slice_setup_slot (struct vdec_av1_slice_instance *instance, +struct vdec_av1_slice_vsi *vsi, +struct v4l2_ctrl_av1_frame *ctrl_fh) +{ +struct vdec_av1_slice_frame_info *cur_frame_info; +struct vdec_av1_slice_uncompressed_header *uh = &vsi->frame.uh; +int ref_id; + +memcpy (&vsi->slots, &instance->slots,sizeof (instance->slots)); +vdec_av1_slice_cleanup_slots (&vsi->slots, &vsi->frame, ctrl_fh); + vsi->slot_id =vdec_av1_slice_get_new_slot (vsi); + +if (vsi->slot_id ==AV1_INVALID_IDX ) { +mtk_v4l2_err ("warning:av1 get invalid index slot\n" ); + vsi->slot_id =0 ; + } + cur_frame_info = &vsi->slots.frame_info[vsi->slot_id]; + cur_frame_info->frame_type = uh->frame_type; + cur_frame_info->frame_is_intra = ((uh->frame_type ==AV1_INTRA_ONLY_FRAME ) || + (uh->frame_type ==AV1_KEY_FRAME )); + cur_frame_info->order_hint = uh->order_hint; + cur_frame_info->upscaled_width = uh->upscaled_width; + cur_frame_info->pic_pitch =0 ; + cur_frame_info->frame_width = uh->frame_width; + cur_frame_info->frame_height = uh->frame_height; + cur_frame_info->mi_cols = ((uh->frame_width +7 ) >>3 ) <<1 ; + cur_frame_info->mi_rows = ((uh->frame_height +7 ) >>3 ) <<1 ; + +/* ensure current frame is properly mapped if referenced */ +for (ref_id =0 ; ref_id <V4L2_AV1_TOTAL_REFS_PER_FRAME ; ref_id++) { +u64 timestamp = vsi->slots.timestamp[vsi->slot_id]; + +if (ctrl_fh->reference_frame_ts[ref_id] == timestamp) + vsi->frame.ref_frame_map[ref_id] = vsi->slot_id; + } +} + +static int vdec_av1_slice_alloc_working_buffer (struct vdec_av1_slice_instance *instance, +struct vdec_av1_slice_vsi *vsi) +{ +struct mtk_vcodec_ctx *ctx = instance->ctx; +struct vdec_av1_slice_work_buffer *work_buffer = vsi->work_buffer; +enum vdec_av1_slice_resolution_level level; +u32 max_sb_w, max_sb_h, max_w, max_h, w, h; +size_t size; +int i, ret; + + w = vsi->frame.uh.frame_width; + h = vsi->frame.uh.frame_height; + +if (w >VCODEC_DEC_4K_CODED_WIDTH || h >VCODEC_DEC_4K_CODED_HEIGHT ) +/* 8K */ +return -EINVAL ; + +if (w >MTK_VDEC_MAX_W || h >MTK_VDEC_MAX_H ) { +/* 4K */ + level =AV1_RES_4K ; + max_w =VCODEC_DEC_4K_CODED_WIDTH ; + max_h =VCODEC_DEC_4K_CODED_HEIGHT ; + }else { +/* FHD */ + level =AV1_RES_FHD ; + max_w =MTK_VDEC_MAX_W ; + max_h =MTK_VDEC_MAX_H ; + } + +if (level == instance->level) +return 0 ; + +mtk_vcodec_debug (instance,"resolution level changed from %u to %u, %ux%u" , + instance->level, level, w, h); +
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 996
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+ max_sb_w =DIV_ROUND_UP (max_w,128 ); + max_sb_h =DIV_ROUND_UP (max_h,128 ); + size = max_sb_w * max_sb_h *SZ_1K ; +for (i =0 ; i <AV1_MAX_FRAME_BUF_COUNT ; i++) { +if (instance->mv[i].va) +mtk_vcodec_mem_free (ctx, &instance->mv[i]); + instance->mv[i].size = size; + ret =mtk_vcodec_mem_alloc (ctx, &instance->mv[i]); +if (ret) + goto err;
Please ignore this comment if this has been discussed and settled. Maybe it's just me, but I feel it is idiomatic in the kernel to undo all previous allocations if at some iteration we fail. Here a different approach is taken: we stop iterating and return an error, and free next time we are called. Why?
Quoted 6 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +6
-0+ work_buffer[i].mv_addr.buf = instance->mv[i].dma_addr; + work_buffer[i].mv_addr.size = size; > + } + + size = max_sb_w * max_sb_h *512 ; +for (i =0 ; i <AV1_MAX_FRAME_BUF_COUNT ; i++) { +if (instance->seg[i].va)
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1013
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+mtk_vcodec_mem_free (ctx, &instance->seg[i]); + instance->seg[i].size = size; + ret =mtk_vcodec_mem_alloc (ctx, &instance->seg[i]); +if (ret) + goto err; + work_buffer[i].segid_addr.buf = instance->seg[i].dma_addr; + work_buffer[i].segid_addr.size = size; + } + + size =16384 ;
#define a named constant for this magic number?
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1023
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+for (i =0 ; i <AV1_MAX_FRAME_BUF_COUNT ; i++) { +if (instance->cdf[i].va) +mtk_vcodec_mem_free (ctx, &instance->cdf[i]); + instance->cdf[i].size = size; + ret =mtk_vcodec_mem_alloc (ctx, &instance->cdf[i]); +if (ret) + goto err; + work_buffer[i].cdf_addr.buf = instance->cdf[i].dma_addr; + work_buffer[i].cdf_addr.size = size; + }
The 3 for loops are supposed to iterate from 0 to AV1_MAX_FRAME_BUF_COUNT - 1, inclusive. Is it possible to merge them?
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1032
Quoted 9 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +9
-0+if (!instance->cdf_temp.va) { + instance->cdf_temp.size = (SZ_1K *16 *100 ); + ret =mtk_vcodec_mem_alloc (ctx, &instance->cdf_temp); +if (ret) + goto err; + vsi->cdf_tmp.buf = instance->cdf_temp.dma_addr; + vsi->cdf_tmp.size = instance->cdf_temp.size; + } + size =AV1_TILE_BUF_SIZE *V4L2_AV1_MAX_TILE_COUNT ;
This "size" is never changed until the end of this function. It is a compile-time constant, so there's no need to assign its value to an intermediate variable.
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1036
Quoted 4 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +4
-0+ +if (instance->tile.va) +mtk_vcodec_mem_free (ctx, &instance->tile); + instance->tile.size = size;
instance->tile.size = AV1_TILE_BUF_SIZE * V4L2_AV1_MAX_TILE_COUNT;
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1043
Quoted 7 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +7
-0+ + ret =mtk_vcodec_mem_alloc (ctx, &instance->tile); +if (ret) + goto err; + + vsi->tile.buf = instance->tile.dma_addr; + vsi->tile.size = size;
vsi->tile.size = instance->tile.size;
and now it is clear the size in vsi is the same as the one in instance. BTW, is vsi->tile.size supposed to always be equal to the one in instance? If yes:
- Is instance available whenever we need to access vsi->tile.size?
- What's the point of duplicating this value? Can it be stored in one place?
Quoted 7 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +7
-0+ + instance->level = level; +return 0 ; + +err: + instance->level =AV1_RES_NONE ; +return ret;
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1060
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+} + +static void vdec_av1_slice_free_working_buffer (struct vdec_av1_slice_instance *instance) +{ +struct mtk_vcodec_ctx *ctx = instance->ctx; +int i; + +for (i =0 ; i <ARRAY_SIZE (instance->mv); i++) +if (instance->mv[i].va) +mtk_vcodec_mem_free (ctx, &instance->mv[i]);
Perhaps mtk_vcodec_mem_free() can properly handle the case
(!instance->mv[i].va) ? This would eliminate 7 of 20 lines of code in this function.
Quoted 13 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +13
-0+ +for (i =0 ; i <ARRAY_SIZE (instance->seg); i++) +if (instance->seg[i].va) +mtk_vcodec_mem_free (ctx, &instance->seg[i]); + +for (i =0 ; i <ARRAY_SIZE (instance->cdf); i++) +if (instance->cdf[i].va) +mtk_vcodec_mem_free (ctx, &instance->cdf[i]); + +if (instance->tile.va) +mtk_vcodec_mem_free (ctx, &instance->tile); +if (instance->cdf_temp.va) +mtk_vcodec_mem_free (ctx, &instance->cdf_temp);
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1083
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+if (instance->cdf_table.va) +mtk_vcodec_mem_free (ctx, &instance->cdf_table); +if (instance->iq_table.va) +mtk_vcodec_mem_free (ctx, &instance->iq_table); + + instance->level =AV1_RES_NONE ; +} + +static void vdec_av1_slice_vsi_from_remote (struct vdec_av1_slice_vsi *vsi, +struct vdec_av1_slice_vsi *remote_vsi)
static inline void?
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1090
Quoted 7 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +7
-0+{ +memcpy (&vsi->trans, &remote_vsi->trans,sizeof (vsi->trans)); +memcpy (&vsi->state, &remote_vsi->state,sizeof (vsi->state)); +} + +static void vdec_av1_slice_vsi_to_remote (struct vdec_av1_slice_vsi *vsi, +struct vdec_av1_slice_vsi *remote_vsi)
static inline void?
Quoted 7 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +7
-0+{ +memcpy (remote_vsi, vsi,sizeof (*vsi)); +} + +static int vdec_av1_slice_setup_lat_from_src_buf (struct vdec_av1_slice_instance *instance, +struct vdec_av1_slice_vsi *vsi, +struct vdec_lat_buf *lat_buf)
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1107
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+{ +struct vb2_v4l2_buffer *src; +struct vb2_v4l2_buffer *dst; + + src =v4l2_m2m_next_src_buf (instance->ctx->m2m_ctx); +if (!src) +return -EINVAL ; + + lat_buf->src_buf_req = src->vb2_buf.req_obj.req; + dst = &lat_buf->ts_info;
the "ts_info" actually contains a struct vb2_v4l2_buffer. Why such a name?
Quoted 57 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +57
-0+v4l2_m2m_buf_copy_metadata (src, dst, true); + vsi->frame.cur_ts = dst->vb2_buf.timestamp; + +return 0 ; +} + +static short vdec_av1_slice_resolve_divisor_32 (u32 D ,short *shift) +{ +int f; +int e; + + *shift =vdec_av1_slice_get_msb (D ); +/* e is obtained from D after resetting the most significant 1 bit. */ + e =D - ((u32 )1 << *shift); +/* Get the most significant DIV_LUT_BITS (8) bits of e into f */ +if (*shift >DIV_LUT_BITS ) + f =AV1_DIV_ROUND_UP_POW2 (e, *shift -DIV_LUT_BITS ); +else + f = e << (DIV_LUT_BITS - *shift); +if (f >DIV_LUT_NUM ) +return -1 ; + *shift +=DIV_LUT_PREC_BITS ; +/* Use f as lookup into the precomputed table of multipliers */ +return div_lut[f]; +} + +static void vdec_av1_slice_get_shear_params (struct vdec_av1_slice_gm *gm_params) +{ +const int *mat = gm_params->wmmat; +short shift; +short y; +long long gv, dv; + +if (gm_params->wmmat[2 ] <=0 ) +return ; + + gm_params->alpha =clamp_val (mat[2 ] - (1 <<WARPEDMODEL_PREC_BITS ),S16_MIN ,S16_MAX ); + gm_params->beta =clamp_val (mat[3 ],S16_MIN ,S16_MAX ); + + y =vdec_av1_slice_resolve_divisor_32 (abs (mat[2 ]), &shift) * (mat[2 ] <0 ?-1 :1 ); + + gv = ((long long )mat[4 ] * (1 <<WARPEDMODEL_PREC_BITS )) * y; + gm_params->gamma =clamp_val ((int )AV1_DIV_ROUND_UP_POW2_SIGNED (gv, shift), +S16_MIN ,S16_MAX ); + + dv = ((long long )mat[3 ] * mat[4 ]) * y; + gm_params->delta =clamp_val (mat[5 ] - (int )AV1_DIV_ROUND_UP_POW2_SIGNED (dv, shift) - + (1 <<WARPEDMODEL_PREC_BITS ),S16_MIN ,S16_MAX ); + + gm_params->alpha =AV1_DIV_ROUND_UP_POW2_SIGNED (gm_params->alpha,WARP_PARAM_REDUCE_BITS ) * + (1 <<WARP_PARAM_REDUCE_BITS ); + gm_params->beta =AV1_DIV_ROUND_UP_POW2_SIGNED (gm_params->beta,WARP_PARAM_REDUCE_BITS ) * + (1 <<WARP_PARAM_REDUCE_BITS ); + gm_params->gamma =AV1_DIV_ROUND_UP_POW2_SIGNED (gm_params->gamma,WARP_PARAM_REDUCE_BITS ) * + (1 <<WARP_PARAM_REDUCE_BITS ); + gm_params->delta =AV1_DIV_ROUND_UP_POW2_SIGNED (gm_params->delta,WARP_PARAM_REDUCE_BITS ) * + (1 <<WARP_PARAM_REDUCE_BITS );
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1174
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+} + +static void vdec_av1_slice_setup_gm (struct vdec_av1_slice_gm *gm, +struct v4l2_av1_global_motion *ctrl_gm) +{ +u32 i, j; + +for (i =0 ; i <V4L2_AV1_TOTAL_REFS_PER_FRAME ; i++) { + gm[i].wmtype = ctrl_gm->type[i]; +for (j =0 ; j <6 ; j++)
Maybe #define this magic 6?
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1182
Quoted 8 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +8
-0+ gm[i].wmmat[j] = ctrl_gm->params[i][j]; + + gm[i].invalid = !!(ctrl_gm->invalid &BIT (i)); + gm[i].alpha =0 ; + gm[i].beta =0 ; + gm[i].gamma =0 ; + gm[i].delta =0 ; +if (gm[i].wmtype <=3 )
And this 3?
Quoted 25 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +25
-0+vdec_av1_slice_get_shear_params (&gm[i]); + } +} + +static void vdec_av1_slice_setup_seg (struct vdec_av1_slice_seg *seg, +struct v4l2_av1_segmentation *ctrl_seg) +{ +u32 i, j; + + seg->segmentation_enabled =SEGMENTATION_FLAG (ctrl_seg,ENABLED ); + seg->segmentation_update_map =SEGMENTATION_FLAG (ctrl_seg,UPDATE_MAP ); + seg->segmentation_temporal_update =SEGMENTATION_FLAG (ctrl_seg,TEMPORAL_UPDATE ); + seg->segmentation_update_data =SEGMENTATION_FLAG (ctrl_seg,UPDATE_DATA ); + seg->segid_preskip =SEGMENTATION_FLAG (ctrl_seg,SEG_ID_PRE_SKIP ); + seg->last_active_segid = ctrl_seg->last_active_seg_id; + +for (i =0 ; i <V4L2_AV1_MAX_SEGMENTS ; i++) { + seg->feature_enabled_mask[i] = ctrl_seg->feature_enabled[i]; +for (j =0 ; j <V4L2_AV1_SEG_LVL_MAX ; j++) + seg->feature_data[i][j] = ctrl_seg->feature_data[i][j]; + } +} + +static void vdec_av1_slice_setup_quant (struct vdec_av1_slice_quantization *quant, +struct v4l2_av1_quantization *ctrl_quant)
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1217
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+{ + quant->base_q_idx = ctrl_quant->base_q_idx; + quant->delta_qydc = ctrl_quant->delta_q_y_dc; + quant->delta_qudc = ctrl_quant->delta_q_u_dc; + quant->delta_quac = ctrl_quant->delta_q_u_ac; + quant->delta_qvdc = ctrl_quant->delta_q_v_dc; + quant->delta_qvac = ctrl_quant->delta_q_v_ac; + quant->qm_y = ctrl_quant->qm_y; + quant->qm_u = ctrl_quant->qm_u; + quant->qm_v = ctrl_quant->qm_v;
Can a common struct be introduced to hold these parameters? And then copied in one go?
Maybe there's a good reason the code is the way it is now. However, a series of "dumb" assignments (no value modifications) makes me wonder.
Quoted 70 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +70
-0+ quant->using_qmatrix =QUANT_FLAG (ctrl_quant,USING_QMATRIX ); +} + +static int vdec_av1_slice_get_qindex (struct vdec_av1_slice_uncompressed_header *uh, +int segmentation_id) +{ +struct vdec_av1_slice_seg *seg = &uh->seg; +struct vdec_av1_slice_quantization *quant = &uh->quant; +int data =0 , qindex =0 ; + +if (seg->segmentation_enabled && + (seg->feature_enabled_mask[segmentation_id] &BIT (SEG_LVL_ALT_Q ))) { + data = seg->feature_data[segmentation_id][SEG_LVL_ALT_Q ]; + qindex = quant->base_q_idx + data; +return clamp_val (qindex,0 ,MAXQ ); + } + +return quant->base_q_idx; +} + +static void vdec_av1_slice_setup_lr (struct vdec_av1_slice_lr *lr, +struct v4l2_av1_loop_restoration *ctrl_lr) +{ +int i; + + lr->use_lr =0 ; + lr->use_chroma_lr =0 ; +for (i =0 ; i <V4L2_AV1_NUM_PLANES_MAX ; i++) { + lr->frame_restoration_type[i] = ctrl_lr->frame_restoration_type[i]; + lr->loop_restoration_size[i] = ctrl_lr->loop_restoration_size[i]; +if (lr->frame_restoration_type[i]) { + lr->use_lr =1 ; +if (i >0 ) + lr->use_chroma_lr =1 ; + } + } +} + +static void vdec_av1_slice_setup_lf (struct vdec_av1_slice_loop_filter *lf, +struct v4l2_av1_loop_filter *ctrl_lf) +{ +int i; + +for (i =0 ; i <ARRAY_SIZE (lf->loop_filter_level); i++) + lf->loop_filter_level[i] = ctrl_lf->level[i]; + +for (i =0 ; i <V4L2_AV1_TOTAL_REFS_PER_FRAME ; i++) + lf->loop_filter_ref_deltas[i] = ctrl_lf->ref_deltas[i]; + +for (i =0 ; i <ARRAY_SIZE (lf->loop_filter_mode_deltas); i++) + lf->loop_filter_mode_deltas[i] = ctrl_lf->mode_deltas[i]; + + lf->loop_filter_sharpness = ctrl_lf->sharpness; + lf->loop_filter_delta_enabled = +BIT_FLAG (ctrl_lf,V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED ); +} + +static void vdec_av1_slice_setup_cdef (struct vdec_av1_slice_cdef *cdef, +struct v4l2_av1_cdef *ctrl_cdef) +{ +int i; + + cdef->cdef_damping = ctrl_cdef->damping_minus_3 +3 ; + cdef->cdef_bits = ctrl_cdef->bits; + +for (i =0 ; i <V4L2_AV1_CDEF_MAX ; i++) { +if (ctrl_cdef->y_sec_strength[i] ==4 ) + ctrl_cdef->y_sec_strength[i] -=1 ; + +if (ctrl_cdef->uv_sec_strength[i] ==4 )
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1297
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+ ctrl_cdef->uv_sec_strength[i] -=1 ; + + cdef->cdef_y_strength[i] = + ctrl_cdef->y_pri_strength[i] <<SECONDARY_FILTER_STRENGTH_NUM_BITS | + ctrl_cdef->y_sec_strength[i]; + cdef->cdef_uv_strength[i] = + ctrl_cdef->uv_pri_strength[i] <<SECONDARY_FILTER_STRENGTH_NUM_BITS | + ctrl_cdef->uv_sec_strength[i]; + } +}
Both vdec_av1_slice_setup_lf() and vdec_av1_slice_setup_cdef():
I'm wondering if the user of struct vdec_av1_slice_loop_filter and struct vdec_av1_slice_cdef could work with the uAPI variants of these structs? Is there a need for driver-specific mutations? (Maybe there is, the driver's author
should know).
Quoted 153 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +153
-0+ +static void vdec_av1_slice_setup_seq (struct vdec_av1_slice_seq_header *seq, +struct v4l2_ctrl_av1_sequence *ctrl_seq) +{ + seq->bitdepth = ctrl_seq->bit_depth; + seq->max_frame_width = ctrl_seq->max_frame_width_minus_1 +1 ; + seq->max_frame_height = ctrl_seq->max_frame_height_minus_1 +1 ; + seq->enable_superres =SEQUENCE_FLAG (ctrl_seq,ENABLE_SUPERRES ); + seq->enable_filter_intra =SEQUENCE_FLAG (ctrl_seq,ENABLE_FILTER_INTRA ); + seq->enable_intra_edge_filter =SEQUENCE_FLAG (ctrl_seq,ENABLE_INTRA_EDGE_FILTER ); + seq->enable_interintra_compound =SEQUENCE_FLAG (ctrl_seq,ENABLE_INTERINTRA_COMPOUND ); + seq->enable_masked_compound =SEQUENCE_FLAG (ctrl_seq,ENABLE_MASKED_COMPOUND ); + seq->enable_dual_filter =SEQUENCE_FLAG (ctrl_seq,ENABLE_DUAL_FILTER ); + seq->enable_jnt_comp =SEQUENCE_FLAG (ctrl_seq,ENABLE_JNT_COMP ); + seq->mono_chrome =SEQUENCE_FLAG (ctrl_seq,MONO_CHROME ); + seq->enable_order_hint =SEQUENCE_FLAG (ctrl_seq,ENABLE_ORDER_HINT ); + seq->order_hint_bits = ctrl_seq->order_hint_bits; + seq->use_128x128_superblock =SEQUENCE_FLAG (ctrl_seq,USE_128X128_SUPERBLOCK ); + seq->subsampling_x =SEQUENCE_FLAG (ctrl_seq,SUBSAMPLING_X ); + seq->subsampling_y =SEQUENCE_FLAG (ctrl_seq,SUBSAMPLING_Y ); +} + +static void vdec_av1_slice_setup_tile (struct vdec_av1_slice_frame *frame, +struct v4l2_av1_tile_info *ctrl_tile) +{ +struct vdec_av1_slice_seq_header *seq = &frame->seq; +struct vdec_av1_slice_tile *tile = &frame->uh.tile; +u32 mib_size_log2 = seq->use_128x128_superblock ?5 :4 ; +int i; + + tile->tile_cols = ctrl_tile->tile_cols; + tile->tile_rows = ctrl_tile->tile_rows; + tile->context_update_tile_id = ctrl_tile->context_update_tile_id; + tile->uniform_tile_spacing_flag = +BIT_FLAG (ctrl_tile,V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING ); + +for (i =0 ; i < tile->tile_cols +1 ; i++) + tile->mi_col_starts[i] = +ALIGN (ctrl_tile->mi_col_starts[i],BIT (mib_size_log2)) >> mib_size_log2; + +for (i =0 ; i < tile->tile_rows +1 ; i++) + tile->mi_row_starts[i] = +ALIGN (ctrl_tile->mi_row_starts[i],BIT (mib_size_log2)) >> mib_size_log2; +} + +static void vdec_av1_slice_setup_uh (struct vdec_av1_slice_instance *instance, +struct vdec_av1_slice_frame *frame, +struct v4l2_ctrl_av1_frame *ctrl_fh) +{ +struct vdec_av1_slice_uncompressed_header *uh = &frame->uh; +int i; + + uh->use_ref_frame_mvs =FH_FLAG (ctrl_fh,USE_REF_FRAME_MVS ); + uh->order_hint = ctrl_fh->order_hint; +vdec_av1_slice_setup_gm (uh->gm, &ctrl_fh->global_motion); + uh->upscaled_width = ctrl_fh->upscaled_width; + uh->frame_width = ctrl_fh->frame_width_minus_1 +1 ; + uh->frame_height = ctrl_fh->frame_height_minus_1 +1 ; + uh->mi_cols = ((uh->frame_width +7 ) >>3 ) <<1 ; + uh->mi_rows = ((uh->frame_height +7 ) >>3 ) <<1 ; + uh->reduced_tx_set =FH_FLAG (ctrl_fh,REDUCED_TX_SET ); + uh->tx_mode = ctrl_fh->tx_mode; + uh->uniform_tile_spacing_flag =FH_FLAG (ctrl_fh,UNIFORM_TILE_SPACING ); + uh->interpolation_filter = ctrl_fh->interpolation_filter; + uh->allow_warped_motion =FH_FLAG (ctrl_fh,ALLOW_WARPED_MOTION ); + uh->is_motion_mode_switchable =FH_FLAG (ctrl_fh,IS_MOTION_MODE_SWITCHABLE ); + uh->frame_type = ctrl_fh->frame_type; + uh->frame_is_intra = (uh->frame_type ==V4L2_AV1_INTRA_ONLY_FRAME || + uh->frame_type ==V4L2_AV1_KEY_FRAME ); + +if (!uh->frame_is_intra &&FH_FLAG (ctrl_fh,REFERENCE_SELECT )) + uh->reference_mode =AV1_REFERENCE_MODE_SELECT ; +else + uh->reference_mode =AV1_SINGLE_REFERENCE ; + + uh->allow_high_precision_mv =FH_FLAG (ctrl_fh,ALLOW_HIGH_PRECISION_MV ); + uh->allow_intra_bc =FH_FLAG (ctrl_fh,ALLOW_INTRABC ); + uh->force_integer_mv =FH_FLAG (ctrl_fh,FORCE_INTEGER_MV ); + uh->allow_screen_content_tools =FH_FLAG (ctrl_fh,ALLOW_SCREEN_CONTENT_TOOLS ); + uh->error_resilient_mode =FH_FLAG (ctrl_fh,ERROR_RESILIENT_MODE ); + uh->primary_ref_frame = ctrl_fh->primary_ref_frame; + uh->disable_frame_end_update_cdf = +FH_FLAG (ctrl_fh,DISABLE_FRAME_END_UPDATE_CDF ); + uh->disable_cdf_update =FH_FLAG (ctrl_fh,DISABLE_CDF_UPDATE ); + uh->skip_mode.skip_mode_present =FH_FLAG (ctrl_fh,SKIP_MODE_PRESENT ); + uh->skip_mode.skip_mode_frame[0 ] = + ctrl_fh->skip_mode_frame[0 ] -V4L2_AV1_REF_LAST_FRAME ; + uh->skip_mode.skip_mode_frame[1 ] = + ctrl_fh->skip_mode_frame[1 ] -V4L2_AV1_REF_LAST_FRAME ; + uh->skip_mode.skip_mode_allowed = ctrl_fh->skip_mode_frame[0 ] ?1 :0 ; + +vdec_av1_slice_setup_seg (&uh->seg, &ctrl_fh->segmentation); + uh->delta_q_lf.delta_q_present =QUANT_FLAG (&ctrl_fh->quantization,DELTA_Q_PRESENT ); + uh->delta_q_lf.delta_q_res =1 << ctrl_fh->quantization.delta_q_res; + uh->delta_q_lf.delta_lf_present = +BIT_FLAG (&ctrl_fh->loop_filter,V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_PRESENT ); + uh->delta_q_lf.delta_lf_res = ctrl_fh->loop_filter.delta_lf_res; + uh->delta_q_lf.delta_lf_multi = +BIT_FLAG (&ctrl_fh->loop_filter,V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_MULTI ); +vdec_av1_slice_setup_quant (&uh->quant, &ctrl_fh->quantization); + + uh->coded_loss_less =1 ; +for (i =0 ; i <V4L2_AV1_MAX_SEGMENTS ; i++) { + uh->quant.qindex[i] =vdec_av1_slice_get_qindex (uh, i); + uh->loss_less_array[i] = + (uh->quant.qindex[i] ==0 && uh->quant.delta_qydc ==0 && + uh->quant.delta_quac ==0 && uh->quant.delta_qudc ==0 && + uh->quant.delta_qvac ==0 && uh->quant.delta_qvdc ==0 ); + +if (!uh->loss_less_array[i]) + uh->coded_loss_less =0 ; + } + +vdec_av1_slice_setup_lr (&uh->lr, &ctrl_fh->loop_restoration); + uh->superres_denom = ctrl_fh->superres_denom; +vdec_av1_slice_setup_lf (&uh->loop_filter, &ctrl_fh->loop_filter); +vdec_av1_slice_setup_cdef (&uh->cdef, &ctrl_fh->cdef); +vdec_av1_slice_setup_tile (frame, &ctrl_fh->tile_info); +} + +static int vdec_av1_slice_setup_tile_group (struct vdec_av1_slice_instance *instance, +struct vdec_av1_slice_vsi *vsi) +{ +struct v4l2_ctrl_av1_tile_group_entry *ctrl_tge; +struct vdec_av1_slice_tile_group *tile_group = &instance->tile_group; +struct vdec_av1_slice_uncompressed_header *uh = &vsi->frame.uh; +struct vdec_av1_slice_tile *tile = &uh->tile; +struct v4l2_ctrl *ctrl; +u32 tge_size; +int i; + + ctrl =v4l2_ctrl_find (&instance->ctx->ctrl_hdl,V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY ); +if (!ctrl) +return -EINVAL ; + + tge_size = ctrl->elems; + ctrl_tge = (struct v4l2_ctrl_av1_tile_group_entry *)ctrl->p_cur.p; + + tile_group->num_tiles = tile->tile_cols * tile->tile_rows; + +if (tile_group->num_tiles != tge_size || + tile_group->num_tiles >V4L2_AV1_MAX_TILE_COUNT ) { +mtk_vcodec_err (instance,"invalid tge_size %d, tile_num:%d\n" , + tge_size, tile_group->num_tiles); +return -EINVAL ; + } + +for (i =0 ; i < tge_size; i++) { +if (i != ctrl_tge[i].tile_row * vsi->frame.uh.tile.tile_cols + + ctrl_tge[i].tile_col) { +mtk_vcodec_err (instance,"invalid tge info %d, %d %d %d\n" , + i, ctrl_tge[i].tile_row, ctrl_tge[i].tile_col, + vsi->frame.uh.tile.tile_rows);
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1460
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+return -EINVAL ; + } + tile_group->tile_size[i] = ctrl_tge[i].tile_size; + tile_group->tile_start_offset[i] = ctrl_tge[i].tile_offset; + } + +return 0 ; +} + +static void vdec_av1_slice_setup_state (struct vdec_av1_slice_vsi *vsi)
static inline void?
Quoted 43 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +43
-0+{ +memset (&vsi->state,0 ,sizeof (vsi->state)); +} + +static void vdec_av1_slice_setup_scale_factors (struct vdec_av1_slice_frame_refs *frame_ref, +struct vdec_av1_slice_frame_info *ref_frame_info, +struct vdec_av1_slice_uncompressed_header *uh) +{ +struct vdec_av1_slice_scale_factors *scale_factors = &frame_ref->scale_factors; +u32 ref_upscaled_width = ref_frame_info->upscaled_width; +u32 ref_frame_height = ref_frame_info->frame_height; +u32 frame_width = uh->frame_width; +u32 frame_height = uh->frame_height; + +if (!vdec_av1_slice_need_scale (ref_upscaled_width, ref_frame_height, + frame_width, frame_height)) { + scale_factors->x_scale =-1 ; + scale_factors->y_scale =-1 ; + scale_factors->is_scaled =0 ; +return ; + } + + scale_factors->x_scale = + ((ref_upscaled_width <<AV1_REF_SCALE_SHIFT ) + (frame_width >>1 )) / frame_width; + scale_factors->y_scale = + ((ref_frame_height <<AV1_REF_SCALE_SHIFT ) + (frame_height >>1 )) / frame_height; + scale_factors->is_scaled = + (scale_factors->x_scale !=AV1_REF_INVALID_SCALE ) && + (scale_factors->y_scale !=AV1_REF_INVALID_SCALE ) && + (scale_factors->x_scale !=AV1_REF_NO_SCALE || + scale_factors->y_scale !=AV1_REF_NO_SCALE ); + scale_factors->x_step = +AV1_DIV_ROUND_UP_POW2 (scale_factors->x_scale, +AV1_REF_SCALE_SHIFT -AV1_SCALE_SUBPEL_BITS ); + scale_factors->y_step = +AV1_DIV_ROUND_UP_POW2 (scale_factors->y_scale, +AV1_REF_SCALE_SHIFT -AV1_SCALE_SUBPEL_BITS ); +} + +static int vdec_av1_slice_get_relative_dist (int a,int b,u8 enable_order_hint,u8 order_hint_bits) +{ +int diff =0 ; +int m =0 ;
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1513
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+ +if (!enable_order_hint) +return 0 ; + + diff = a - b; + m =1 << (order_hint_bits -1 ); + diff = (diff & (m -1 )) - (diff & m); + +return diff; +}
This function is called in one place only, and its result needs to be interpreted at call site. Can it return the result in a form expected at call site...
Quoted 33 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +33
-0+ +static void vdec_av1_slice_setup_ref (struct vdec_av1_slice_pfc *pfc, +struct v4l2_ctrl_av1_frame *ctrl_fh) +{ +struct vdec_av1_slice_vsi *vsi = &pfc->vsi; +struct vdec_av1_slice_frame *frame = &vsi->frame; +struct vdec_av1_slice_slot *slots = &vsi->slots; +struct vdec_av1_slice_uncompressed_header *uh = &frame->uh; +struct vdec_av1_slice_seq_header *seq = &frame->seq; +struct vdec_av1_slice_frame_info *cur_frame_info = + &slots->frame_info[vsi->slot_id]; +struct vdec_av1_slice_frame_info *frame_info; +int i, slot_id; + +if (uh->frame_is_intra) +return ; + +for (i =0 ; i <V4L2_AV1_REFS_PER_FRAME ; i++) { +int ref_idx = ctrl_fh->ref_frame_idx[i]; + + pfc->ref_idx[i] = ctrl_fh->reference_frame_ts[ref_idx]; + slot_id = frame->ref_frame_map[ref_idx]; + frame_info = &slots->frame_info[slot_id]; +if (slot_id ==AV1_INVALID_IDX ) { +mtk_v4l2_err ("cannot match reference[%d] 0x%llx\n" , i, + ctrl_fh->reference_frame_ts[ref_idx]); + frame->order_hints[i] =0 ; + frame->ref_frame_valid[i] =0 ; +continue ; + } + + frame->frame_refs[i].ref_fb_idx = slot_id; + vdec_av1_slice_setup_scale_factors(&frame->frame_refs[i],
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1556
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+ frame_info, uh); +if (!seq->enable_order_hint) + frame->ref_frame_sign_bias[i +1 ] =0 ; +else + frame->ref_frame_sign_bias[i +1 ] = +vdec_av1_slice_get_relative_dist (frame_info->order_hint, + uh->order_hint, + seq->enable_order_hint, + seq->order_hint_bits) + <=0 ?0 :1 ;
... to get rid of this tri-argument operator altogether?
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1568
Quoted 12 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +12
-0+ + frame->order_hints[i] = ctrl_fh->order_hints[i +1 ]; + cur_frame_info->order_hints[i] = frame->order_hints[i]; + frame->ref_frame_valid[i] =1 ; + } +} + +static void vdec_av1_slice_get_previous (struct vdec_av1_slice_vsi *vsi) +{ +struct vdec_av1_slice_frame *frame = &vsi->frame; + +if (frame->uh.primary_ref_frame ==7 )
#define magic number 7?
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1575
Quoted 7 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +7
-0+ frame->prev_fb_idx =AV1_INVALID_IDX ; + else + frame->prev_fb_idx = frame->frame_refs[frame->uh.primary_ref_frame].ref_fb_idx; +} + +static void vdec_av1_slice_setup_operating_mode (struct vdec_av1_slice_instance *instance, +struct vdec_av1_slice_frame *frame)
static inline void?
Quoted 14 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +14
-0+{ + frame->large_scale_tile =0 ; +} + +static int vdec_av1_slice_setup_pfc (struct vdec_av1_slice_instance *instance, +struct vdec_av1_slice_pfc *pfc) +{ +struct v4l2_ctrl_av1_frame *ctrl_fh; +struct v4l2_ctrl_av1_sequence *ctrl_seq; +struct vdec_av1_slice_vsi *vsi = &pfc->vsi; +int ret =0 ; + +/* frame header */ + ctrl_fh = (struct v4l2_ctrl_av1_frame *)
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1599
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+vdec_av1_get_ctrl_ptr (instance->ctx, +V4L2_CID_STATELESS_AV1_FRAME ); +if (IS_ERR (ctrl_fh)) +return PTR_ERR (ctrl_fh); + + ctrl_seq = (struct v4l2_ctrl_av1_sequence *) +vdec_av1_get_ctrl_ptr (instance->ctx, +V4L2_CID_STATELESS_AV1_SEQUENCE ); +if (IS_ERR (ctrl_seq)) +return PTR_ERR (ctrl_seq);
Just to make sure: I assume request api is used? If so, does vdec's framework ensure that v4l2_ctrl_request_setup() has been called? It influences what's actually in ctrl->p_cur.p (current or previous value), and the vdec_av1_get_ctrl_ptr() wrapper returns ctrl->p_cur.p.
Quoted 63 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +63
-0+ +/* setup vsi information */ +vdec_av1_slice_setup_seq (&vsi->frame.seq, ctrl_seq); +vdec_av1_slice_setup_uh (instance, &vsi->frame, ctrl_fh); +vdec_av1_slice_setup_operating_mode (instance, &vsi->frame); + +vdec_av1_slice_setup_state (vsi); +vdec_av1_slice_setup_slot (instance, vsi, ctrl_fh); +vdec_av1_slice_setup_ref (pfc, ctrl_fh); +vdec_av1_slice_get_previous (vsi); + + pfc->seq = instance->seq; + instance->seq++; + +return ret; +} + +static void vdec_av1_slice_setup_lat_buffer (struct vdec_av1_slice_instance *instance, +struct vdec_av1_slice_vsi *vsi, +struct mtk_vcodec_mem *bs, +struct vdec_lat_buf *lat_buf) +{ +struct vdec_av1_slice_work_buffer *work_buffer; +int i; + + vsi->bs.dma_addr = bs->dma_addr; + vsi->bs.size = bs->size; + + vsi->ube.dma_addr = lat_buf->ctx->msg_queue.wdma_addr.dma_addr; + vsi->ube.size = lat_buf->ctx->msg_queue.wdma_addr.size; + vsi->trans.dma_addr = lat_buf->ctx->msg_queue.wdma_wptr_addr; +/* used to store trans end */ + vsi->trans.dma_addr_end = lat_buf->ctx->msg_queue.wdma_rptr_addr; + vsi->err_map.dma_addr = lat_buf->wdma_err_addr.dma_addr; + vsi->err_map.size = lat_buf->wdma_err_addr.size; + vsi->rd_mv.dma_addr = lat_buf->rd_mv_addr.dma_addr; + vsi->rd_mv.size = lat_buf->rd_mv_addr.size; + + vsi->row_info.buf =0 ; + vsi->row_info.size =0 ; + + work_buffer = vsi->work_buffer; + +for (i =0 ; i <AV1_MAX_FRAME_BUF_COUNT ; i++) { + work_buffer[i].mv_addr.buf = instance->mv[i].dma_addr; + work_buffer[i].mv_addr.size = instance->mv[i].size; + work_buffer[i].segid_addr.buf = instance->seg[i].dma_addr; + work_buffer[i].segid_addr.size = instance->seg[i].size; + work_buffer[i].cdf_addr.buf = instance->cdf[i].dma_addr; + work_buffer[i].cdf_addr.size = instance->cdf[i].size; + } + + vsi->cdf_tmp.buf = instance->cdf_temp.dma_addr; + vsi->cdf_tmp.size = instance->cdf_temp.size; + + vsi->tile.buf = instance->tile.dma_addr; + vsi->tile.size = instance->tile.size; +memcpy (lat_buf->tile_addr.va, instance->tile.va,64 * instance->tile_group.num_tiles); + + vsi->cdf_table.buf = instance->cdf_table.dma_addr; + vsi->cdf_table.size = instance->cdf_table.size; + vsi->iq_table.buf = instance->iq_table.dma_addr; + vsi->iq_table.size = instance->iq_table.size;
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1672
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+} + +static void vdec_av1_slice_setup_seg_buffer (struct vdec_av1_slice_instance *instance, +struct vdec_av1_slice_vsi *vsi) +{ +struct vdec_av1_slice_uncompressed_header *uh = &vsi->frame.uh; +struct mtk_vcodec_mem *buf; + +/* reset segment buffer */ +if (uh->primary_ref_frame ==7 || !uh->seg.segmentation_enabled) {
#define magic 7?
Quoted 207 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +207
-0+mtk_vcodec_debug (instance,"reset seg %d\n" , vsi->slot_id); +if (vsi->slot_id !=AV1_INVALID_IDX ) { + buf = &instance->seg[vsi->slot_id]; +memset (buf->va,0 , buf->size); + } + } +} + +static void vdec_av1_slice_setup_tile_buffer (struct vdec_av1_slice_instance *instance, +struct vdec_av1_slice_vsi *vsi, +struct mtk_vcodec_mem *bs) +{ +struct vdec_av1_slice_tile_group *tile_group = &instance->tile_group; +struct vdec_av1_slice_uncompressed_header *uh = &vsi->frame.uh; +struct vdec_av1_slice_tile *tile = &uh->tile; +u32 tile_num, tile_row, tile_col; +u32 allow_update_cdf =0 ; +u32 sb_boundary_x_m1 =0 , sb_boundary_y_m1 =0 ; +int tile_info_base; +u32 tile_buf_pa; +u32 *tile_info_buf = instance->tile.va; +u32 pa = (u32 )bs->dma_addr; + +if (uh->disable_cdf_update ==0 ) + allow_update_cdf =1 ; + +for (tile_num =0 ; tile_num < tile_group->num_tiles; tile_num++) { +/* each uint32 takes place of 4 bytes */ + tile_info_base = (AV1_TILE_BUF_SIZE * tile_num) >>2 ; + tile_row = tile_num / tile->tile_cols; + tile_col = tile_num % tile->tile_cols; + tile_info_buf[tile_info_base +0 ] = (tile_group->tile_size[tile_num] <<3 ); + tile_buf_pa = pa + tile_group->tile_start_offset[tile_num]; + + tile_info_buf[tile_info_base +1 ] = (tile_buf_pa >>4 ) <<4 ; + tile_info_buf[tile_info_base +2 ] = (tile_buf_pa %16 ) <<3 ; + + sb_boundary_x_m1 = + (tile->mi_col_starts[tile_col +1 ] - tile->mi_col_starts[tile_col] -1 ) & +0x3f ; + sb_boundary_y_m1 = + (tile->mi_row_starts[tile_row +1 ] - tile->mi_row_starts[tile_row] -1 ) & +0x1ff ; + + tile_info_buf[tile_info_base +3 ] = (sb_boundary_y_m1 <<7 ) | sb_boundary_x_m1; + tile_info_buf[tile_info_base +4 ] = ((allow_update_cdf <<18 ) | (1 <<16 )); + +if (tile_num == tile->context_update_tile_id && + uh->disable_frame_end_update_cdf ==0 ) + tile_info_buf[tile_info_base +4 ] |= (1 <<17 ); + +mtk_vcodec_debug (instance,"// tile buf %d pos(%dx%d) offset 0x%x\n" , + tile_num, tile_row, tile_col, tile_info_base); +mtk_vcodec_debug (instance,"// %08x %08x %08x %08x\n" , + tile_info_buf[tile_info_base +0 ], + tile_info_buf[tile_info_base +1 ], + tile_info_buf[tile_info_base +2 ], + tile_info_buf[tile_info_base +3 ]); +mtk_vcodec_debug (instance,"// %08x %08x %08x %08x\n" , + tile_info_buf[tile_info_base +4 ], + tile_info_buf[tile_info_base +5 ], + tile_info_buf[tile_info_base +6 ], + tile_info_buf[tile_info_base +7 ]); + } +} + +static int vdec_av1_slice_setup_lat (struct vdec_av1_slice_instance *instance, +struct mtk_vcodec_mem *bs, +struct vdec_lat_buf *lat_buf, +struct vdec_av1_slice_pfc *pfc) +{ +struct vdec_av1_slice_vsi *vsi = &pfc->vsi; +int ret; + + ret =vdec_av1_slice_setup_lat_from_src_buf (instance, vsi, lat_buf); +if (ret) +return ret; + + ret =vdec_av1_slice_setup_pfc (instance, pfc); +if (ret) +return ret; + + ret =vdec_av1_slice_setup_tile_group (instance, vsi); +if (ret) +return ret; + + ret =vdec_av1_slice_alloc_working_buffer (instance, vsi); +if (ret) +return ret; + +vdec_av1_slice_setup_seg_buffer (instance, vsi); +vdec_av1_slice_setup_tile_buffer (instance, vsi, bs); +vdec_av1_slice_setup_lat_buffer (instance, vsi, bs, lat_buf); + +return 0 ; +} + +static int vdec_av1_slice_update_lat (struct vdec_av1_slice_instance *instance, +struct vdec_lat_buf *lat_buf, +struct vdec_av1_slice_pfc *pfc) +{ +struct vdec_av1_slice_vsi *vsi; + + vsi = &pfc->vsi; +mtk_vcodec_debug (instance,"frame %u LAT CRC 0x%08x, output size is %d\n" , + pfc->seq, vsi->state.crc[0 ], vsi->state.out_size); + +/* buffer full, need to re-decode */ +if (vsi->state.full) { +/* buffer not enough */ +if (vsi->trans.dma_addr_end - vsi->trans.dma_addr == vsi->ube.size) +return -ENOMEM ; +return -EAGAIN ; + } + + instance->width = vsi->frame.uh.upscaled_width; + instance->height = vsi->frame.uh.frame_height; + instance->frame_type = vsi->frame.uh.frame_type; + +return 0 ; +} + +static int vdec_av1_slice_setup_core_to_dst_buf (struct vdec_av1_slice_instance *instance, +struct vdec_lat_buf *lat_buf) +{ +struct vb2_v4l2_buffer *dst; + + dst =v4l2_m2m_next_dst_buf (instance->ctx->m2m_ctx); +if (!dst) +return -EINVAL ; + +v4l2_m2m_buf_copy_metadata (&lat_buf->ts_info, dst, true); + +return 0 ; +} + +static int vdec_av1_slice_setup_core_buffer (struct vdec_av1_slice_instance *instance, +struct vdec_av1_slice_pfc *pfc, +struct vdec_av1_slice_vsi *vsi, +struct vdec_fb *fb, +struct vdec_lat_buf *lat_buf) +{ +struct vb2_buffer *vb; +struct vb2_queue *vq; +int w, h, plane, size; +int i; + + plane = instance->ctx->q_data[MTK_Q_DATA_DST ].fmt->num_planes; + w = vsi->frame.uh.upscaled_width; + h = vsi->frame.uh.frame_height; + size =ALIGN (w,VCODEC_DEC_ALIGNED_64 ) *ALIGN (h,VCODEC_DEC_ALIGNED_64 ); + +/* frame buffer */ + vsi->fb.y.dma_addr = fb->base_y.dma_addr; +if (plane ==1 ) + vsi->fb.c.dma_addr = fb->base_y.dma_addr + size; +else + vsi->fb.c.dma_addr = fb->base_c.dma_addr; + +/* reference buffers */ + vq =v4l2_m2m_get_vq (instance->ctx->m2m_ctx,V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE ); +if (!vq) +return -EINVAL ; + +/* get current output buffer */ + vb = &v4l2_m2m_next_dst_buf (instance->ctx->m2m_ctx)->vb2_buf; +if (!vb) +return -EINVAL ; + +/* get buffer address from vb2buf */ +for (i =0 ; i <V4L2_AV1_REFS_PER_FRAME ; i++) { +struct vdec_av1_slice_fb *vref = &vsi->ref[i]; + + vb =vb2_find_buffer (vq, pfc->ref_idx[i]); +if (!vb) { +memset (vref,0 ,sizeof (*vref)); +continue ; + } + + vref->y.dma_addr =vb2_dma_contig_plane_dma_addr (vb,0 ); +if (plane ==1 ) + vref->c.dma_addr = vref->y.dma_addr + size; +else + vref->c.dma_addr =vb2_dma_contig_plane_dma_addr (vb,1 ); + } + vsi->tile.dma_addr = lat_buf->tile_addr.dma_addr; + vsi->tile.size = lat_buf->tile_addr.size; + +return 0 ; +} + +static int vdec_av1_slice_setup_core (struct vdec_av1_slice_instance *instance, +struct vdec_fb *fb, +struct vdec_lat_buf *lat_buf, +struct vdec_av1_slice_pfc *pfc) +{ +struct vdec_av1_slice_vsi *vsi = &pfc->vsi; +int ret; + + ret =vdec_av1_slice_setup_core_to_dst_buf (instance, lat_buf); +if (ret) +return ret; + + ret =vdec_av1_slice_setup_core_buffer (instance, pfc, vsi, fb, lat_buf); +if (ret) +return ret; +
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1889
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+return 0 ; +} + +static int vdec_av1_slice_update_core (struct vdec_av1_slice_instance *instance, +struct vdec_lat_buf *lat_buf, +struct vdec_av1_slice_pfc *pfc) +{ +struct vdec_av1_slice_vsi *vsi = instance->core_vsi; + +/* TODO: Do something here, or remove this function entirely */
And?
Quoted 44 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +44
-0+ +mtk_vcodec_debug (instance,"frame %u Y_CRC %08x %08x %08x %08x\n" , + pfc->seq, vsi->state.crc[0 ], vsi->state.crc[1 ], + vsi->state.crc[2 ], vsi->state.crc[3 ]); +mtk_vcodec_debug (instance,"frame %u C_CRC %08x %08x %08x %08x\n" , + pfc->seq, vsi->state.crc[8 ], vsi->state.crc[9 ], + vsi->state.crc[10 ], vsi->state.crc[11 ]); + +return 0 ; +} + +static int vdec_av1_slice_init (struct mtk_vcodec_ctx *ctx) +{ +struct vdec_av1_slice_instance *instance; +struct vdec_av1_slice_init_vsi *vsi; +int ret; + + instance =kzalloc (sizeof (*instance),GFP_KERNEL ); +if (!instance) +return -ENOMEM ; + + instance->ctx = ctx; + instance->vpu.id =SCP_IPI_VDEC_LAT ; + instance->vpu.core_id =SCP_IPI_VDEC_CORE ; + instance->vpu.ctx = ctx; + instance->vpu.codec_type = ctx->current_codec; + + ret =vpu_dec_init (&instance->vpu); +if (ret) { +mtk_vcodec_err (instance,"failed to init vpu dec, ret %d\n" , ret); + goto error_vpu_init; + } + +/* init vsi and global flags */ + vsi = instance->vpu.vsi; +if (!vsi) { +mtk_vcodec_err (instance,"failed to get AV1 vsi\n" ); + ret = -EINVAL ; + goto error_vsi; + } + instance->init_vsi = vsi; + instance->core_vsi =mtk_vcodec_fw_map_dm_addr (ctx->dev->fw_handler, (u32 )vsi->core_vsi); + +if (!instance->core_vsi) {
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1943
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+mtk_vcodec_err (instance,"failed to get AV1 core vsi\n" ); + ret = -EINVAL ; + goto error_vsi; + } + +if (vsi->vsi_size !=sizeof (struct vdec_av1_slice_vsi )) +mtk_vcodec_err (instance,"remote vsi size 0x%x mismatch! expected: 0x%lx\n" , + vsi->vsi_size,sizeof (struct vdec_av1_slice_vsi )); + + instance->irq =1 ;
Does this mean "irq_enabled"? If so, rename?
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+ instance->inneracing_mode =IS_VDEC_INNER_RACING (instance->ctx->dev->dec_capability); + +mtk_vcodec_debug (instance,"vsi 0x%p core_vsi 0x%llx 0x%p, inneracing_mode %d\n" , + vsi, vsi->core_vsi, instance->core_vsi, instance->inneracing_mode); + + ret =vdec_av1_slice_init_cdf_table (instance); +if (ret) + goto error_vsi; + + ret =vdec_av1_slice_init_iq_table (instance);
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1963
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+if (ret) + goto error_vsi; + + ctx->drv_handle = instance; + +return 0 ; +error_vsi: +vpu_dec_deinit (&instance->vpu); +error_vpu_init: +kfree (instance);
newline?
Quoted 18 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +18
-0+return ret; +} + +static void vdec_av1_slice_deinit (void *h_vdec) +{ +struct vdec_av1_slice_instance *instance = h_vdec; + +if (!instance) +return ; +mtk_vcodec_debug (instance,"h_vdec 0x%p\n" , h_vdec); +vpu_dec_deinit (&instance->vpu); +vdec_av1_slice_free_working_buffer (instance); +vdec_msg_queue_deinit (&instance->ctx->msg_queue, instance->ctx); +kfree (instance); +} + +static int vdec_av1_slice_flush (void *h_vdec,struct mtk_vcodec_mem *bs, +struct vdec_fb *fb,bool *res_chg)
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1991
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+{ +struct vdec_av1_slice_instance *instance = h_vdec; +int i; + +mtk_vcodec_debug (instance,"flush ...\n" ); + +for (i =0 ; i <AV1_MAX_FRAME_BUF_COUNT ; i++) +vdec_av1_slice_clear_fb (&instance->slots.frame_info[i]); + +vdec_msg_queue_wait_lat_buf_full (&instance->ctx->msg_queue);
newline?
Quoted 12 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +12
-0+return vpu_dec_reset (&instance->vpu); +} + +static void vdec_av1_slice_get_pic_info (struct vdec_av1_slice_instance *instance) +{ +struct mtk_vcodec_ctx *ctx = instance->ctx; +u32 data[3 ]; + +mtk_vcodec_debug (instance,"w %u h %u\n" , ctx->picinfo.pic_w, ctx->picinfo.pic_h); + + data[0 ] = ctx->picinfo.pic_w; + data[1 ] = ctx->picinfo.pic_h;
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 2013
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+ data[2 ] = ctx->capture_fourcc; +vpu_dec_get_param (&instance->vpu, data,3 ,GET_PARAM_PIC_INFO ); + + ctx->picinfo.buf_w =ALIGN (ctx->picinfo.pic_w,VCODEC_DEC_ALIGNED_64 ); + ctx->picinfo.buf_h =ALIGN (ctx->picinfo.pic_h,VCODEC_DEC_ALIGNED_64 ); + ctx->picinfo.fb_sz[0 ] = instance->vpu.fb_sz[0 ]; + ctx->picinfo.fb_sz[1 ] = instance->vpu.fb_sz[1 ]; +} + +static void vdec_av1_slice_get_dpb_size (struct vdec_av1_slice_instance *instance,u32 *dpb_sz)
static inline void?
Quoted 59 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +59
-0+{ +/* refer av1 specification */ + *dpb_sz =V4L2_AV1_TOTAL_REFS_PER_FRAME +1 ; +} + +static void vdec_av1_slice_get_crop_info (struct vdec_av1_slice_instance *instance, +struct v4l2_rect *cr) +{ +struct mtk_vcodec_ctx *ctx = instance->ctx; + + cr->left =0 ; + cr->top =0 ; + cr->width = ctx->picinfo.pic_w; + cr->height = ctx->picinfo.pic_h; + +mtk_vcodec_debug (instance,"l=%d, t=%d, w=%d, h=%d\n" , + cr->left, cr->top, cr->width, cr->height); +} + +static int vdec_av1_slice_get_param (void *h_vdec,enum vdec_get_param_type type,void *out) +{ +struct vdec_av1_slice_instance *instance = h_vdec; + +switch (type) { +case GET_PARAM_PIC_INFO : +vdec_av1_slice_get_pic_info (instance); +break ; +case GET_PARAM_DPB_SIZE : +vdec_av1_slice_get_dpb_size (instance, out); +break ; +case GET_PARAM_CROP_INFO : +vdec_av1_slice_get_crop_info (instance, out); +break ; +default : +mtk_vcodec_err (instance,"invalid get parameter type=%d\n" , type); +return -EINVAL ; + } + +return 0 ; +} + +static int vdec_av1_slice_lat_decode (void *h_vdec,struct mtk_vcodec_mem *bs, +struct vdec_fb *fb,bool *res_chg) +{ +struct vdec_av1_slice_instance *instance = h_vdec; +struct vdec_lat_buf *lat_buf; +struct vdec_av1_slice_pfc *pfc; +struct vdec_av1_slice_vsi *vsi; +struct mtk_vcodec_ctx *ctx; +int ret; + +if (!instance || !instance->ctx) +return -EINVAL ; + + ctx = instance->ctx; +/* init msgQ for the first time */ +if (vdec_msg_queue_init (&ctx->msg_queue, ctx, + vdec_av1_slice_core_decode,sizeof (*pfc))) { +mtk_vcodec_err (instance,"failed to init AV1 msg queue\n" );
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 2082
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+return -ENOMEM ; + } + +/* bs NULL means flush decoder */ +if (!bs) +return vdec_av1_slice_flush (h_vdec, bs, fb, res_chg); + + lat_buf =vdec_msg_queue_dqbuf (&ctx->msg_queue.lat_ctx); +if (!lat_buf) { +mtk_vcodec_err (instance,"failed to get AV1 lat buf\n" );
there exists vdec_msg_queue_deinit(). Should it be called in this (and subsequent) error recovery path(s)?
Quoted 253 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +152
-0+return -EBUSY ; + } + pfc = (struct vdec_av1_slice_pfc *)lat_buf->private_data; +if (!pfc) { + ret = -EINVAL ; + goto err_free_fb_out; + } + vsi = &pfc->vsi; + + ret =vdec_av1_slice_setup_lat (instance, bs, lat_buf, pfc); +if (ret) { +mtk_vcodec_err (instance,"failed to setup AV1 lat ret %d\n" , ret); + goto err_free_fb_out; + } + +vdec_av1_slice_vsi_to_remote (vsi, instance->vsi); + ret =vpu_dec_start (&instance->vpu,NULL ,0 ); +if (ret) { +mtk_vcodec_err (instance,"failed to dec AV1 ret %d\n" , ret); + goto err_free_fb_out; + } +if (instance->inneracing_mode) +vdec_msg_queue_qbuf (&ctx->dev->msg_queue_core_ctx, lat_buf); + +if (instance->irq) { + ret =mtk_vcodec_wait_for_done_ctx (ctx,MTK_INST_IRQ_RECEIVED , +WAIT_INTR_TIMEOUT_MS , +MTK_VDEC_LAT0 ); +/* update remote vsi if decode timeout */ +if (ret) { +mtk_vcodec_err (instance,"AV1 Frame %d decode timeout %d\n" , pfc->seq, ret); +WRITE_ONCE (instance->vsi->state.timeout,1 ); + } +vpu_dec_end (&instance->vpu); + } + +vdec_av1_slice_vsi_from_remote (vsi, instance->vsi); + ret =vdec_av1_slice_update_lat (instance, lat_buf, pfc); + +/* LAT trans full, re-decode */ +if (ret == -EAGAIN ) { +mtk_vcodec_err (instance,"AV1 Frame %d trans full\n" , pfc->seq); +if (!instance->inneracing_mode) +vdec_msg_queue_qbuf (&ctx->msg_queue.lat_ctx, lat_buf); +return 0 ; + } + +/* LAT trans full, no more UBE or decode timeout */ +if (ret == -ENOMEM || vsi->state.timeout) { +mtk_vcodec_err (instance,"AV1 Frame %d insufficient buffer or timeout\n" , pfc->seq); +if (!instance->inneracing_mode) +vdec_msg_queue_qbuf (&ctx->msg_queue.lat_ctx, lat_buf); +return -EBUSY ; + } + vsi->trans.dma_addr_end += ctx->msg_queue.wdma_addr.dma_addr; +mtk_vcodec_debug (instance,"lat dma 1 0x%llx 0x%llx\n" , + pfc->vsi.trans.dma_addr, pfc->vsi.trans.dma_addr_end); + +vdec_msg_queue_update_ube_wptr (&ctx->msg_queue, vsi->trans.dma_addr_end); + +if (!instance->inneracing_mode) +vdec_msg_queue_qbuf (&ctx->dev->msg_queue_core_ctx, lat_buf); +memcpy (&instance->slots, &vsi->slots,sizeof (instance->slots)); + +return 0 ; + +err_free_fb_out: +vdec_msg_queue_qbuf (&ctx->msg_queue.lat_ctx, lat_buf); +mtk_vcodec_err (instance,"slice dec number: %d err: %d" , pfc->seq, ret); +return ret; +} + +static int vdec_av1_slice_core_decode (struct vdec_lat_buf *lat_buf) +{ +struct vdec_av1_slice_instance *instance; +struct vdec_av1_slice_pfc *pfc; +struct mtk_vcodec_ctx *ctx =NULL ; +struct vdec_fb *fb =NULL ; +int ret = -EINVAL ; + +if (!lat_buf) +return -EINVAL ; + + pfc = lat_buf->private_data; + ctx = lat_buf->ctx; +if (!pfc || !ctx) +return -EINVAL ; + + instance = ctx->drv_handle; +if (!instance) + goto err; + + fb = ctx->dev->vdec_pdata->get_cap_buffer (ctx); +if (!fb) { + ret = -EBUSY ; + goto err; + } + + ret =vdec_av1_slice_setup_core (instance, fb, lat_buf, pfc); +if (ret) { +mtk_vcodec_err (instance,"vdec_av1_slice_setup_core\n" ); + goto err; + } +vdec_av1_slice_vsi_to_remote (&pfc->vsi, instance->core_vsi); + ret =vpu_dec_core (&instance->vpu); +if (ret) { +mtk_vcodec_err (instance,"vpu_dec_core\n" ); + goto err; + } + +if (instance->irq) { + ret =mtk_vcodec_wait_for_done_ctx (ctx,MTK_INST_IRQ_RECEIVED , +WAIT_INTR_TIMEOUT_MS , +MTK_VDEC_CORE ); +/* update remote vsi if decode timeout */ +if (ret) { +mtk_vcodec_err (instance,"AV1 frame %d core timeout\n" , pfc->seq); +WRITE_ONCE (instance->vsi->state.timeout,1 ); + } +vpu_dec_core_end (&instance->vpu); + } + + ret =vdec_av1_slice_update_core (instance, lat_buf, pfc); +if (ret) { +mtk_vcodec_err (instance,"vdec_av1_slice_update_core\n" ); + goto err; + } + +mtk_vcodec_debug (instance,"core dma_addr_end 0x%llx\n" , + instance->core_vsi->trans.dma_addr_end); +vdec_msg_queue_update_ube_rptr (&ctx->msg_queue, instance->core_vsi->trans.dma_addr_end); + + ctx->dev->vdec_pdata->cap_to_disp (ctx,0 , lat_buf->src_buf_req); + +return 0 ; + +err: +/* always update read pointer */ +vdec_msg_queue_update_ube_rptr (&ctx->msg_queue, pfc->vsi.trans.dma_addr_end); + +if (fb) + ctx->dev->vdec_pdata->cap_to_disp (ctx,1 , lat_buf->src_buf_req); + +return ret; +} + +const struct vdec_common_if vdec_av1_slice_lat_if = { + .init = vdec_av1_slice_init, + .decode = vdec_av1_slice_lat_decode, + .get_param = vdec_av1_slice_get_param, + .deinit = vdec_av1_slice_deinit, +};drivers/media/platform/mediatek/vcodec/vdec_drv_if.c +4
-0@@ -49,6 +49,10 @@ int vdec_if_init(struct mtk_vcodec_ctx *ctx, unsigned int fourcc) ctx->dec_if = &vdec_vp9_slice_lat_if; ctx->hw_id =IS_VDEC_LAT_ARCH (hw_arch) ?MTK_VDEC_LAT0 :MTK_VDEC_CORE ;break ; +case V4L2_PIX_FMT_AV1_FRAME : + ctx->dec_if = &vdec_av1_slice_lat_if; + ctx->hw_id =MTK_VDEC_LAT0 ; +break ;default :return -EINVAL ; }drivers/media/platform/mediatek/vcodec/vdec_drv_if.h +1
-0@@ -61,6 +61,7 @@ extern const struct vdec_common_if vdec_vp8_if;extern const struct vdec_common_if vdec_vp8_slice_if;extern const struct vdec_common_if vdec_vp9_if;extern const struct vdec_common_if vdec_vp9_slice_lat_if; +extern const struct vdec_common_if vdec_av1_slice_lat_if;/** * vdec_if_init() - initialize decode driver drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c +27
-0@@ -20,6 +20,9 @@/* the size used to store avc error information */ #define VDEC_ERR_MAP_SZ_AVC (17 * SZ_1K) +#define VDEC_RD_MV_BUFFER_SZ (((SZ_4K * 2304 >> 4) + SZ_1K) << 1) +#define VDEC_LAT_TILE_SZ (64 * SZ_4K) +/* core will read the trans buffer which decoded by lat to decode again. * The trans buffer size of FHD and 4K bitstreams are different. */ @@ -194,6 +197,14 @@ void vdec_msg_queue_deinit(struct vdec_msg_queue *msg_queue,if (mem->va)mtk_vcodec_mem_free (ctx, mem); + mem = &lat_buf->rd_mv_addr; +if (mem->va) +mtk_vcodec_mem_free (ctx, mem); + + mem = &lat_buf->tile_addr; +if (mem->va) +mtk_vcodec_mem_free (ctx, mem); +kfree (lat_buf->private_data); } }@@ -270,6 +281,22 @@ int vdec_msg_queue_init(struct vdec_msg_queue *msg_queue, goto mem_alloc_err; } +if (ctx->current_codec ==V4L2_PIX_FMT_AV1_FRAME ) { + lat_buf->rd_mv_addr.size =VDEC_RD_MV_BUFFER_SZ ; + err =mtk_vcodec_mem_alloc (ctx, &lat_buf->rd_mv_addr); +if (err) { +mtk_v4l2_err ("failed to allocate rd_mv_addr buf[%d]" , i); +return -ENOMEM ; + } + + lat_buf->tile_addr.size =VDEC_LAT_TILE_SZ ; + err =mtk_vcodec_mem_alloc (ctx, &lat_buf->tile_addr); +if (err) { +mtk_v4l2_err ("failed to allocate tile_addr buf[%d]" , i); +return -ENOMEM ; + } + } + lat_buf->private_data =kzalloc (private_size,GFP_KERNEL );if (!lat_buf->private_data) { err = -ENOMEM ;drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h +4
-0@@ -42,6 +42,8 @@ struct vdec_msg_queue_ctx {* struct vdec_lat_buf - lat buffer message used to store lat info for core decode * @wdma_err_addr: wdma error address used for lat hardware * @slice_bc_addr: slice bc address used for lat hardware +* @rd_mv_addr: mv addr for av1 lat hardware output, core hardware input +* @tile_addr: tile buffer for av1 core input * @ts_info: need to set timestamp from output to capture * @src_buf_req: output buffer media request object * @@ -54,6 +56,8 @@ struct vdec_msg_queue_ctx {struct vdec_lat_buf {struct mtk_vcodec_mem wdma_err_addr;struct mtk_vcodec_mem slice_bc_addr; +struct mtk_vcodec_mem rd_mv_addr; +struct mtk_vcodec_mem tile_addr;struct vb2_v4l2_buffer ts_info;struct media_request *src_buf_req;
Hi again,
W dniu 17.11.2022 o 13:42, Andrzej Pietrasiewicz pisze:
Quoted 56 lines
Hi Xiaoyong Lu,
Sorry about chiming in only at v6. Please see inline below.
Andrzej
W dniu 17.11.2022 o 07:17, Xiaoyong Lu pisze:
Quoted 49 lines
Add mediatek av1 decoder linux driver which use the stateless API in MT8195.
Signed-off-by Xiaoyong Lu<[email protected]>---
Changes from v5:- change av1 PROFILE and LEVEL cfg
- test by av1 fluster, result is 173/239Changes from v4:
- convert
vb2_find_timestamptovb2_find_buffer
- test by av1 fluster, result is 173/239Changes from v3:
- modify comment for struct
vdec_av1_slice_slot
- add defineSEG_LVL_ALT_Q
- change use_lr/use_chroma_lr parse from av1 spec
- useARRAY_SIZEto replace size forloop_filter_levelandloop_filter_mode_deltas
- change array size ofloop_filter_mode_deltasfrom 4 to 2
- add defineSECONDARY_FILTER_STRENGTH_NUM_BITS
- change some hex values from upper case to lower case
- change*dpb_szequal toV4L2_AV1_TOTAL_REFS_PER_FRAME+ 1
- test by av1 fluster, result is 173/239Changes from v2:
- Match with av1 uapi v3 modify
- test by av1 fluster, result is 173/239---
Reference series:
[1]: v3 of this series is presend by Daniel Almeida.
message-id: [email protected].../media/platform/mediatek/vcodec/Makefile | 1 + .../vcodec/mtk_vcodec_dec_stateless.c | 47 +-
.../platform/mediatek/vcodec/mtk_vcodec_drv.h| 1 + .../vcodec/vdec/vdec_av1_req_lat_if.c | 2234 +++++++++++++++++ .../platform/mediatek/vcodec/vdec_drv_if.c | 4 + .../platform/mediatek/vcodec/vdec_drv_if.h | 1 +.../platform/mediatek/vcodec/vdec_msg_queue.c| 27 +.../platform/mediatek/vcodec/vdec_msg_queue.h| 4 +8 files changed, 2318 insertions(+), 1 deletion(-)create mode 100644
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c
<snip>
Quoted 26 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 765
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+ +static void *vdec_av1_get_ctrl_ptr (struct mtk_vcodec_ctx *ctx,int id) +{ + struct v4l2_ctrl *ctrl = v4l2_ctrl_find(&ctx->ctrl_hdl, id); + + if (!ctrl) + return ERR_PTR(-EINVAL); + + return ctrl->p_cur.p; +}I see we keep repeating this kind of a
v4l2_ctrl_find()wrapper in drivers. The only reason this code cannot be factored out is the "context" struct pointer pointing at structs of different types. Maybe we could#define
v4l2_get_ctrl_ptr(ctx, member, id)\
__v4l2_get_ctrl_ptr((ctx),offsetof(typeof(*ctx), (member)), (id))void *__v4l2_get_ctrl_ptr(void *ctx,
size_toffset, u32 id)
{
structv4l2_ctrl_handler*hdl = (structv4l2_ctrl_handler*)(ctx + offset); structv4l2_ctrl*ctrl =v4l2_ctrl_find(hdl, id);if (!ctrl)
returnERR_PTR(-EINVAL);
Quoted 7 lines
return
ctrl->p_cur.p;
}and reuse
v4l2_get_ctrl_ptr()in drivers?A similar kind of void* arithmetic happens in
container_of, only with '-'.
When I think of it it seems a bit over-engineered to me now, it would be better to give up the macro and simply pass struct v4l2_ctrl_handler *hdl.
Another second thought is that including such a wrapper in this patch would make it too noisy if all potential users were to be updated. A separate series would make more sense.
Regards,
Andrzej
Hi Andrzej,
Thanks for your comments, I have fixed all except for some items which need more discussion with you.
1.
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1023
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+for (i =0 ; i <AV1_MAX_FRAME_BUF_COUNT ; i++) { +if (instance->cdf[i].va) +mtk_vcodec_mem_free (ctx, &instance->cdf[i]); + instance->cdf[i].size = size; + ret =mtk_vcodec_mem_alloc (ctx, &instance->cdf[i]); +if (ret) + goto err; + work_buffer[i].cdf_addr.buf = instance->cdf[i].dma_addr; + work_buffer[i].cdf_addr.size = size; + }
The 3 for loops are supposed to iterate from 0 toAV1_MAX_FRAME_BUF_COUNT - 1,
inclusive. Is it possible to merge them?
-->can you help to explain more clearly, and what does "3" stand for?
2.
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1043
Quoted 7 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +7
-0+ + ret =mtk_vcodec_mem_alloc (ctx, &instance->tile); +if (ret) + goto err; + + vsi->tile.buf = instance->tile.dma_addr; + vsi->tile.size = size;
vsi->tile.size = instance->tile.size;
and now it is clear the size in vsi is the same as the one in instance. BTW, is vsi->tile.size supposed to always be equal to the one in instance?
If yes:
- Is instance available whenever we need to access vsi->tile.size?
- What's the point of duplicating this value? Can it be stored in one
place?
--> vsi->tile.size is always equal to instance->tile.size, but they should not be stored in one place. because vsi will be used for micro- processor,and instance is only used in kernel side.
Also I can remove following two statements.
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1043
Quoted 2 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +2
-0+ vsi->tile.buf = instance->tile.dma_addr; + vsi->tile.size = size;
because it will re-assign values for each frame before entering to micro-processor in vdec_av1_slice_setup_lat_buffer.
3.
Quoted 1 line
+static void vdec_av1_slice_free_working_buffer(struct
vdec_av1_slice_instance *instance)
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1060
Quoted 7 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +7
-0+{ +struct mtk_vcodec_ctx *ctx = instance->ctx; +int i; + +for (i =0 ; i <ARRAY_SIZE (instance->mv); i++) +if (instance->mv[i].va) +mtk_vcodec_mem_free (ctx, &instance->mv[i]);
Perhaps mtk_vcodec_mem_free() can properly handle the case
(!instance->mv[i].va) ? This would eliminate 7 of 20 lines of code in this function.
--> I think it will be better to add this , because
1.if mtk_vcodec_mem_free is changed by someone later and donnot do va null check, it will ensure safely in caller.
2.If I donnot do va null check, there will print an error log in mtk_vcodec_mem_free when va is null. But it may be normal behivor.
if (!mem->va) {
mtk_v4l2_err("%s dma_free size=%ld failed!", dev_name(dev),
size);
return;
}what about your opinion?
4.
+static void vdec_av1_slice_setup_gm(struct vdec_av1_slice_gm *gm,
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1174
Quoted 7 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +7
-0+ struct v4l2_av1_global_motion *ctrl_gm) +{ +u32 i, j; + +for (i =0 ; i <V4L2_AV1_TOTAL_REFS_PER_FRAME ; i++) { + gm[i].wmtype = ctrl_gm->type[i]; +for (j =0 ; j <6 ; j++)
Maybe #define this magic 6?
--> I see uapi driver use magic number 6 too, which is in
struct v4l2_av1_global_motion {
__u8 flags[V4L2_AV1_TOTAL_REFS_PER_FRAME];
enum v4l2_av1_warp_model type[V4L2_AV1_TOTAL_REFS_PER_FRAME];
__u32 params[V4L2_AV1_TOTAL_REFS_PER_FRAME][6];
__u8 invalid;
};From av1 official document in 5.9.24 Global motion params syntax section, it also use magic number 6.
so i think it will not need to change this.
5.
static void vdec_av1_slice_setup_quant(structvdec_av1_slice_quantization *quant,
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1217
Quoted 11 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +11
-0+ struct v4l2_av1_quantization *ctrl_quant) +{ + quant->base_q_idx = ctrl_quant->base_q_idx; + quant->delta_qydc = ctrl_quant->delta_q_y_dc; + quant->delta_qudc = ctrl_quant->delta_q_u_dc; + quant->delta_quac = ctrl_quant->delta_q_u_ac; + quant->delta_qvdc = ctrl_quant->delta_q_v_dc; + quant->delta_qvac = ctrl_quant->delta_q_v_ac; + quant->qm_y = ctrl_quant->qm_y; + quant->qm_u = ctrl_quant->qm_u; + quant->qm_v = ctrl_quant->qm_v;
Can a common struct be introduced to hold these parameters? And then copied in one go?
Maybe there's a good reason the code is the way it is now. However, a series of "dumb" assignments (no value modifications) makes me wonder.
+ cdef->cdef_y_strength[i] =
Quoted 1 line
+ ctrl_cdef->y_pri_strength[i] <<
SECONDARY_FILTER_STRENGTH_NUM_BITS |
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c
Quoted 3 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +3
-0+ ctrl_cdef->y_sec_strength[i]; + cdef->cdef_uv_strength[i] = + ctrl_cdef->uv_pri_strength[i] <<
SECONDARY_FILTER_STRENGTH_NUM_BITS |
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1297
Quoted 3 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +3
-0+ ctrl_cdef->uv_sec_strength[i]; + } +}
Both vdec_av1_slice_setup_lf() and vdec_av1_slice_setup_cdef():
I'm wondering if the user of struct vdec_av1_slice_loop_filter and structvdec_av1_slice_cdef could work with the uAPI variants of these structs? Is there
a need for driver-specific mutations? (Maybe there is, the driver's author
should know).
-->1.There is a mediatek map structure in kernel part which also has the same structure in micro-processor.
2.Uapi v4l2 structure will not access in micro-processor, and mediatek driver structure may not be all the same with v4l2.
so these will not need to change.
6.
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 2082
Quoted 7 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +7
-0+/* bs NULL means flush decoder */ +if (!bs) +return vdec_av1_slice_flush (h_vdec, bs, fb, res_chg); + + lat_buf =vdec_msg_queue_dqbuf (&ctx->msg_queue.lat_ctx); +if (!lat_buf) { +mtk_vcodec_err (instance,"failed to get AV1 lat buf\n" );
there exists vdec_msg_queue_deinit(). Should it be called in this (and subsequent) error recovery path(s)?
Review
Quoted 2 lines
(quoted diff) +2
-0+ return -EBUSY; + }
-->vdec_msg_queue_deinit is called when do deinit operation before stop streaming.
But here is just error handle for current frame, so it shouldnot call vdec_msg_queue_deinit here.
7.
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1107
Quoted 6 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +6
-0+ src =v4l2_m2m_next_src_buf (instance->ctx->m2m_ctx); +if (!src) +return -EINVAL ; + + lat_buf->src_buf_req = src->vb2_buf.req_obj.req; + dst = &lat_buf->ts_info;
the "ts_info" actually contains a struct vb2_v4l2_buffer. Why such a name?
-->"ts_info" is not named by me, and i just use it here, so i will not rename it.
I ask the owner why it is named with ts_info and the answer is:
"This parame is used to store timestamp releated information from output queue to capture queue."
8.
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1599
Quoted 12 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +12
-0+/* frame header */ + ctrl_fh = (struct v4l2_ctrl_av1_frame *) +vdec_av1_get_ctrl_ptr (instance->ctx, +V4L2_CID_STATELESS_AV1_FRAME ); +if (IS_ERR (ctrl_fh)) +return PTR_ERR (ctrl_fh); + + ctrl_seq = (struct v4l2_ctrl_av1_sequence *) +vdec_av1_get_ctrl_ptr (instance->ctx, +V4L2_CID_STATELESS_AV1_SEQUENCE ); +if (IS_ERR (ctrl_seq)) +return PTR_ERR (ctrl_seq);
Just to make sure: I assume request api is used? If so, does vdec's framework
ensure that v4l2_ctrl_request_setup() has been called? It influences what's
actually in ctrl->p_cur.p (current or previous value), and the vdec_av1_get_ctrl_ptr() wrapper returns ctrl->p_cur.p.
-->v4l2_ctrl_request_setup() is called in mtk_vdec_worker which is before this function.
Thanks
Best Regards
xiaoyong Lu
Quoted 3,117 lines · Andrzej Pietrasiewicz
Hi Xiaoyong Lu,
Sorry about chiming in only at v6. Please see inline below.
Andrzej
W dniu 17.11.2022 o 07:17, Xiaoyong Lu pisze:
Quoted 1,061 lines
Add mediatek av1 decoder linux driver which use the stateless API in
MT8195.Signed-off-by Xiaoyong Lu<[email protected]>---
Changes from v5:- change av1 PROFILE and LEVEL cfg
- test by av1 fluster, result is 173/239Changes from v4:
- convert
vb2_find_timestamptovb2_find_buffer
- test by av1 fluster, result is 173/239Changes from v3:
- modify comment for struct
vdec_av1_slice_slot
- add defineSEG_LVL_ALT_Q
- change use_lr/use_chroma_lr parse from av1 spec
- useARRAY_SIZEto replace size forloop_filter_levelandloop_filter_mode_deltas
- change array size ofloop_filter_mode_deltasfrom 4 to 2
- add defineSECONDARY_FILTER_STRENGTH_NUM_BITS
- change some hex values from upper case to lower case
- change*dpb_szequal toV4L2_AV1_TOTAL_REFS_PER_FRAME+ 1
- test by av1 fluster, result is 173/239Changes from v2:
- Match with av1 uapi v3 modify
- test by av1 fluster, result is 173/239---
Reference series:
[1]: v3 of this series is presend by Daniel Almeida.
message-id:
[email protected].../media/platform/mediatek/vcodec/Makefile | 1 + .../vcodec/mtk_vcodec_dec_stateless.c | 47 +- .../platform/mediatek/vcodec/mtk_vcodec_drv.h | 1 + .../vcodec/vdec/vdec_av1_req_lat_if.c | 2234 +++++++++++++++++ .../platform/mediatek/vcodec/vdec_drv_if.c | 4 + .../platform/mediatek/vcodec/vdec_drv_if.h | 1 + .../platform/mediatek/vcodec/vdec_msg_queue.c | 27 + .../platform/mediatek/vcodec/vdec_msg_queue.h | 4 + 8 files changed, 2318 insertions(+), 1 deletion(-)create mode 100644
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.cdrivers/media/platform/mediatek/vcodec/Makefile +1
-0@@ -10,6 +10,7 @@ mtk-vcodec-dec-y := vdec/vdec_h264_if.o \ vdec/vdec_vp8_req_if.o \ vdec/vdec_vp9_if.o \ vdec/vdec_vp9_req_lat_if.o \ + vdec/vdec_av1_req_lat_if.o \ vdec/vdec_h264_req_if.o \ vdec/vdec_h264_req_common.o \ vdec/vdec_h264_req_multi_if.o \diff --git
a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.cb/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.cindexc45bd2599bb2d..ceb6fabc67749100644
---a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.c
+++b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.cdrivers/media/platform/mediatek/vcodec/Makefile +41
-1@@ -107,11 +107,51 @@ static const struct mtk_stateless_control mtk_stateless_controls[] = { }, .codec_type = V4L2_PIX_FMT_VP9_FRAME, }, + { + .cfg = { + .id = V4L2_CID_STATELESS_AV1_SEQUENCE, + + }, + .codec_type = V4L2_PIX_FMT_AV1_FRAME, + }, + { + .cfg = { + .id = V4L2_CID_STATELESS_AV1_FRAME, + + }, + .codec_type = V4L2_PIX_FMT_AV1_FRAME, + }, + { + .cfg = { + .id = V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY, + .dims = { V4L2_AV1_MAX_TILE_COUNT }, + + }, + .codec_type = V4L2_PIX_FMT_AV1_FRAME, + }, + { + .cfg = { + .id = V4L2_CID_STATELESS_AV1_PROFILE, + .min = V4L2_STATELESS_AV1_PROFILE_MAIN, + .def = V4L2_STATELESS_AV1_PROFILE_MAIN, + .max = V4L2_STATELESS_AV1_PROFILE_MAIN, + }, + .codec_type = V4L2_PIX_FMT_AV1_FRAME, + }, + { + .cfg = { + .id = V4L2_CID_STATELESS_AV1_LEVEL, + .min = V4L2_STATELESS_AV1_LEVEL_2_0, + .def = V4L2_STATELESS_AV1_LEVEL_4_0, + .max = V4L2_STATELESS_AV1_LEVEL_5_1, + }, + .codec_type = V4L2_PIX_FMT_AV1_FRAME, + }, }; #define NUM_CTRLS ARRAY_SIZE(mtk_stateless_controls) -static struct mtk_video_fmt mtk_video_formats[5]; +static struct mtk_video_fmt mtk_video_formats[6]; static struct mtk_video_fmt default_out_format;static struct
mtk_video_fmtdefault_cap_format;drivers/media/platform/mediatek/vcodec/Makefile +1
-0@@ -351,6 +391,7 @@ static void mtk_vcodec_add_formats(unsigned int fourcc, case V4L2_PIX_FMT_H264_SLICE: case V4L2_PIX_FMT_VP8_FRAME: case V4L2_PIX_FMT_VP9_FRAME: + case V4L2_PIX_FMT_AV1_FRAME: mtk_video_formats[count_formats].fourcc = fourcc; mtk_video_formats[count_formats].type = MTK_FMT_DEC;mtk_video_formats[count_formats].num_planes = 1;drivers/media/platform/mediatek/vcodec/Makefile +4
-0@@ -407,6 +448,10 @@ static void mtk_vcodec_get_supported_formats(struct mtk_vcodec_ctx *ctx) mtk_vcodec_add_formats(V4L2_PIX_FMT_VP9_FRAME, ctx); out_format_count++; } + if (ctx->dev->dec_capability & MTK_VDEC_FORMAT_AV1_FRAME) { + mtk_vcodec_add_formats(V4L2_PIX_FMT_AV1_FRAME, ctx); + out_format_count++; + } if (cap_format_count)
default_cap_format= mtk_video_formats[cap_format_count
- 1];
diff --gita/drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.hb/drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.hindex6a47a11ff654a..a6db972b1ff72100644drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0@@ -344,6 +344,7 @@ enum mtk_vdec_format_types {MTK_VDEC_FORMAT_H264_SLICE =0x100 ,MTK_VDEC_FORMAT_VP8_FRAME =0x200 ,MTK_VDEC_FORMAT_VP9_FRAME =0x400 , +MTK_VDEC_FORMAT_AV1_FRAME =0x800 , MTK_VCODEC_INNER_RACING = 0x20000, };diff --git
a/drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.cb/drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.cnew file mode 100644
index 0000000000000..2ac77175dad7c
---/dev/null
+++b/drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.cdrivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +18
-0@@ -0,0 +1,2234 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (c) 2022 MediaTek Inc. +* Author: Xiaoyong Lu <[email protected]> +*/ + +#include <linux/module.h> +#include <linux/slab.h> +#include <media/videobuf2-dma-contig.h> + +#include "../mtk_vcodec_util.h" +#include "../mtk_vcodec_dec.h" +#include "../mtk_vcodec_intr.h" +#include "../vdec_drv_base.h" +#include "../vdec_drv_if.h" +#include "../vdec_vpu_if.h" + +#define AV1_MAX_FRAME_BUF_COUNT (V4L2_AV1_TOTAL_REFS_PE
R_FRAME+ 1)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +16
-0+#define AV1_TILE_BUF_SIZE 64 +#define AV1_SCALE_SUBPEL_BITS 10 +#define AV1_REF_SCALE_SHIFT 14 +#define AV1_REF_NO_SCALE BIT(AV1_REF_SCALE_SHIFT) +#define AV1_REF_INVALID_SCALE -1 + +#define AV1_INVALID_IDX -1 + +#define AV1_DIV_ROUND_UP_POW2 (value, n) \ +({ \ + typeof(n) _n = n; \ + typeof(value) _value = value; \ + (_value + (BIT(_n) >> 1)) >> _n; \ +}) + +#define AV1_DIV_ROUND_UP_POW2_SIGNED (value, n)\+({
\drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+typeof (n) _n_ = n; \ +typeof (value) _value_ = value;\
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ (((_value_) < 0) ? -AV1_DIV_ROUND_UP_POW2(-(_value_), (_n_))\
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+ : AV1_DIV_ROUND_UP_POW2((_value_), (_n_))); \ +}) + +#define BIT_FLAG (x, bit) (!!((x)->flags & (bit))) +#define SEGMENTATION_FLAG (x, name) (!!((x)->flags &V4L2_AV1_SEGMENTATION_FLAG_##name))
+#defineQUANT_FLAG(x, name)(!!((x)->flags &
V4L2_AV1_QUANTIZATION_FLAG_##name))
+#defineSEQUENCE_FLAG(x, name)(!!((x)->flags &
V4L2_AV1_SEQUENCE_FLAG_##name))
+#defineFH_FLAG(x, name)(!!((x)->flags &
V4L2_AV1_FRAME_FLAG_##name))drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +15
-0+ +#define MINQ 0 +#define MAXQ 255 + +#define DIV_LUT_PREC_BITS 14 +#define DIV_LUT_BITS 8 +#define DIV_LUT_NUM BIT(DIV_LUT_BITS) +#define WARP_PARAM_REDUCE_BITS 6 +#define WARPEDMODEL_PREC_BITS 16 + +#define SEG_LVL_ALT_Q 0 +#define SECONDARY_FILTER_STRENGTH_NUM_BITS 2 + +static const short div_lut[DIV_LUT_NUM +1 ] = { +16384 ,16320 ,16257 ,16194 ,16132 ,16070 ,16009 ,15948 ,15888 ,15828, 15768,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 15709, 15650, 15592, 15534, 15477, 15420, 15364, 15308, 15252,15197, 15142,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 15087, 15033, 14980, 14926, 14873, 14821, 14769, 14717, 14665,14614, 14564,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 14513, 14463, 14413, 14364, 14315, 14266, 14218, 14170, 14122,14075, 14028,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 13981, 13935, 13888, 13843, 13797, 13752, 13707, 13662, 13618,13574, 13530,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 13487, 13443, 13400, 13358, 13315, 13273, 13231, 13190, 13148,13107, 13066,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 13026, 12985, 12945, 12906, 12866, 12827, 12788, 12749, 12710,12672, 12633,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 12596, 12558, 12520, 12483, 12446, 12409, 12373, 12336, 12300,12264, 12228,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 12193, 12157, 12122, 12087, 12053, 12018, 11984, 11950, 11916,11882, 11848,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 11815, 11782, 11749, 11716, 11683, 11651, 11619, 11586, 11555,11523, 11491,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 11460, 11429, 11398, 11367, 11336, 11305, 11275, 11245, 11215,11185, 11155,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 11125, 11096, 11067, 11038, 11009, 10980, 10951, 10923, 10894,10866, 10838,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 10810, 10782, 10755, 10727, 10700, 10673, 10645, 10618, 10592,10565, 10538,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 10512, 10486, 10460, 10434, 10408, 10382, 10356, 10331, 10305,10280, 10255,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 10230, 10205, 10180, 10156, 10131, 10107, 10082, 10058, 10034,10010, 9986,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 9963, 9939, 9916, 9892, 9869, 9846, 9823, 9800, 9777,9754, 9732,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 9709, 9687, 9664, 9642, 9620, 9598, 9576, 9554, 9533,9511, 9489,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 9468, 9447, 9425, 9404, 9383, 9362, 9341, 9321, 9300,9279, 9259,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 9239, 9218, 9198, 9178, 9158, 9138, 9118, 9098, 9079,9059, 9039,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 9020, 9001, 8981, 8962, 8943, 8924, 8905, 8886, 8867,8849, 8830,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 8812, 8793, 8775, 8756, 8738, 8720, 8702, 8684, 8666,8648, 8630,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 8613, 8595, 8577, 8560, 8542, 8525, 8508, 8490, 8473,8456, 8439,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ 8422, 8405, 8389, 8372, 8355, 8339, 8322, 8306, 8289,8273, 8257,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+ 8240, 8224, 8208, 8192, +}; + +/** +* struct vdec_av1_slice_init_vsi - VSI used to initialize instance
+ * @architecture: architecture type
+ * @reserved: reserved
+ * @core_vsi: for core vsi
+ * @cdf_table_addr: cdf table addr
+ * @cdf_table_size: cdf table size
+ * @iq_table_addr: iq table addr
+ * @iq_table_size: iq table size
+ * @vsi_size: share vsi structure size
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +94
-0+struct vdec_av1_slice_init_vsi { +u32 architecture; +u32 reserved; +u64 core_vsi; +u64 cdf_table_addr; +u32 cdf_table_size; +u64 iq_table_addr; +u32 iq_table_size; +u32 vsi_size; +}; + +/** +* struct vdec_av1_slice_mem - memory address and size +* @buf: dma_addr padding +* @dma_addr: buffer address +* @size: buffer size +* @dma_addr_end: buffer end address +* @padding: for padding +*/ +struct vdec_av1_slice_mem { +union { +u64 buf; +dma_addr_t dma_addr; + }; +union { +size_t size; +dma_addr_t dma_addr_end; +u64 padding; + }; +}; + +/** +* struct vdec_av1_slice_state - decoding state +* @err : err type for decode +* @full : transcoded buffer is full or not +* @timeout : decode timeout or not +* @perf : performance enable +* @crc : hw checksum +* @out_size : hw output size +*/ +struct vdec_av1_slice_state { +int err; +u32 full; +u32 timeout; +u32 perf; +u32 crc[16 ]; +u32 out_size; +}; + +/* +* enum vdec_av1_slice_resolution_level - resolution level +*/ +enum vdec_av1_slice_resolution_level { +AV1_RES_NONE , +AV1_RES_FHD , +AV1_RES_4K , +AV1_RES_8K , +}; + +/* +* enum vdec_av1_slice_frame_type - av1 frame type +*/ +enum vdec_av1_slice_frame_type { +AV1_KEY_FRAME =0 , +AV1_INTER_FRAME , +AV1_INTRA_ONLY_FRAME , +AV1_SWITCH_FRAME , +AV1_FRAME_TYPES , +}; + +/* +* enum vdec_av1_slice_reference_mode - reference mode type +*/ +enum vdec_av1_slice_reference_mode { +AV1_SINGLE_REFERENCE =0 , +AV1_COMPOUND_REFERENCE , +AV1_REFERENCE_MODE_SELECT , +AV1_REFERENCE_MODES , +}; + +/** +* struct vdec_av1_slice_tile_group - info for each tile +* @num_tiles: tile number +* @tile_size: input size for each tile +* @tile_start_offset: tile offset to input buffer +*/ +struct vdec_av1_slice_tile_group { +u32 num_tiles; +u32 tile_size[V4L2_AV1_MAX_TILE_COUNT ]; +u32 tile_start_offset[V4L2_AV1_MAX_TILE_COUNT ]; +}; + +/** +* struct vdec_av1_slice_scale_factors - scale info for each ref frame
+ * @is_scaled: frame is scaled or not + * @x_scale: frame width scale coefficient + * @y_scale: frame height scale coefficient + * @x_step: width step for x_scale + * @y_step: height step for y_scale+ */
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +44
-0+struct vdec_av1_slice_scale_factors { +u8 is_scaled; +int x_scale; +int y_scale; +int x_step; +int y_step; +}; + +/** +* struct vdec_av1_slice_frame_refs - ref frame info +* @ref_fb_idx: ref slot index +* @ref_map_idx: ref frame index +* @scale_factors: scale factors for each ref frame +*/ +struct vdec_av1_slice_frame_refs { +int ref_fb_idx; +int ref_map_idx; +struct vdec_av1_slice_scale_factors scale_factors; +}; + +/** +* struct vdec_av1_slice_gm - AV1 Global Motion parameters +* @wmtype: The type of global motion transform used +* @wmmat: gm_params +* @alpha: alpha info +* @beta: beta info +* @gamma: gamma info +* @delta: delta info +* @invalid: is invalid or not +*/ +struct vdec_av1_slice_gm { +int wmtype; +int wmmat[8 ]; +short alpha; +short beta; +short gamma; +short delta; +char invalid; +}; + +/** +* struct vdec_av1_slice_sm - AV1 Skip Mode parameters +* @skip_mode_allowed: Skip Mode is allowed or not +* @skip_mode_present: specified that the skip_mode will be present or not
+ * @skip_mode_frame: specifies the frames to use for compound
prediction
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+struct vdec_av1_slice_sm { +u8 skip_mode_allowed; +u8 skip_mode_present; +int skip_mode_frame[2 ]; +}; + +/** +* struct vdec_av1_slice_seg - AV1 Segmentation params +* @segmentation_enabled: this frame makes use of the segmentation tool or not
+ * @segmentation_update_map: segmentation map are updated
during the decoding frame
+ * @segmentation_temporal_update:segmentation map are coded relative the existing segmentaion map
+ * @segmentation_update_data: new parameters are about to be
specified for each segment
+ * @feature_data: specifies the feature data for a
segment feature
+ * @feature_enabled_mask: the corresponding feature value
is coded or not.
+ * @segid_preskip: segment id will be read before
the skip syntax element.
+ * @last_active_segid: the highest numbered segment id
that has some enabled feature
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +13
-0+struct vdec_av1_slice_seg { +u8 segmentation_enabled; +u8 segmentation_update_map; +u8 segmentation_temporal_update; +u8 segmentation_update_data; +int feature_data[V4L2_AV1_MAX_SEGMENTS ][V4L2_AV1_SEG_LVL_MAX ]; +u16 feature_enabled_mask[V4L2_AV1_MAX_SEGMENTS ]; +int segid_preskip; +int last_active_segid; +}; + +/** +* struct vdec_av1_slice_delta_q_lf - AV1 Loop Filter delta parameters
+ * @delta_q_present: specified whether quantizer index delta
values are present
+ * @delta_q_res: specifies the left shift which should be
applied to decoded quantizer index
+ * @delta_lf_present: specifies whether loop filter delta values
are present
+ * @delta_lf_res: specifies the left shift which should be
applied to decoded
+ * loop filter delta values
+ * @delta_lf_multi: specifies that separate loop filter deltas
are sent for horizontal
+ * luma edges,vertical luma edges,the u
edges, and the v edges.
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +11
-0+struct vdec_av1_slice_delta_q_lf { +u8 delta_q_present; +u8 delta_q_res; +u8 delta_lf_present; +u8 delta_lf_res; +u8 delta_lf_multi; +}; + +/** +* struct vdec_av1_slice_quantization - AV1 Quantization params +* @base_q_idx: indicates the base frame qindex. This is used for Y AC
+ * coefficients and as the base value for the
other quantizers.
+ * @qindex: qindex
+ * @delta_qydc: indicates the Y DC quantizer relative tobase_q_idx
+ * @delta_qudc: indicates the U DC quantizer relative tobase_q_idx.
+ * @delta_quac: indicates the U AC quantizer relative tobase_q_idx
+ * @delta_qvdc: indicates the V DC quantizer relative tobase_q_idx
+ * @delta_qvac: indicates the V AC quantizer relative tobase_q_idx
+ * @using_qmatrix: specifies that the quantizer matrix will
be used to
+ * compute quantizers
+ * @qm_y: specifies the level in the quantizer
matrix that should
+ * be used for luma plane decoding
+ * @qm_u: specifies the level in the quantizer
matrix that should
+ * be used for chroma U plane decoding.
+ * @qm_v: specifies the level in the quantizer
matrix that should be
+ * used for chroma V plane decoding
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +18
-0+struct vdec_av1_slice_quantization { +int base_q_idx; +int qindex[V4L2_AV1_MAX_SEGMENTS ]; +int delta_qydc; +int delta_qudc; +int delta_quac; +int delta_qvdc; +int delta_qvac; +u8 using_qmatrix; +u8 qm_y; +u8 qm_u; +u8 qm_v; +}; + +/** +* struct vdec_av1_slice_lr - AV1 Loop Restauration parameters +* @use_lr: whether to use loop restoration +* @use_chroma_lr: whether to use chroma loop restoration
+ * @frame_restoration_type: specifies the type of restoration
used for each plane
+ * @loop_restoration_size: pecifies the size of loop
restoration units in units
+ * of samples in the current plane
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+struct vdec_av1_slice_lr { +u8 use_lr; +u8 use_chroma_lr; +u8 frame_restoration_type[V4L2_AV1_NUM_PLANES_MAX ]; +u32 loop_restoration_size[V4L2_AV1_NUM_PLANES_MAX ]; +}; + +/** +* struct vdec_av1_slice_loop_filter - AV1 Loop filter parameters +* @loop_filter_level: an array containing loop filter strength values.
+ * @loop_filter_ref_deltas: contains the adjustment needed for
the filter
+ * level based on the chosen
reference frame
+ * @loop_filter_mode_deltas: contains the adjustment needed for
the filter
+ * level based on the chosen mode
+ * @loop_filter_sharpness: indicates the sharpness level. Theloop_filter_level
+ * andloop_filter_sharpnesstogether
determine when
+ * a block edge is filtered, and by
how much the
+ * filtering can change the sample
values
+ * @loop_filter_delta_enabled: filetr level depends on the mode and reference
+ * frame used to predict a block
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +11
-0+struct vdec_av1_slice_loop_filter { +u8 loop_filter_level[4 ]; +int loop_filter_ref_deltas[V4L2_AV1_TOTAL_REFS_PER_FRAME ]; +int loop_filter_mode_deltas[2 ]; +u8 loop_filter_sharpness; +u8 loop_filter_delta_enabled; +}; + +/** +* struct vdec_av1_slice_cdef - AV1 CDEF parameters +* @cdef_damping: controls the amount of damping in the deringing filter
+ * @cdef_y_strength: specifies the strength of the primary
filter and secondary filter
+ * @cdef_uv_strength: specifies the strength of the primary
filter and secondary filter
+ * @cdef_bits: specifies the number of bits needed to
specify which
+ * CDEF filter to apply
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +26
-0+struct vdec_av1_slice_cdef { +u8 cdef_damping; +u8 cdef_y_strength[8 ]; +u8 cdef_uv_strength[8 ]; +u8 cdef_bits; +}; + +/** +* struct vdec_av1_slice_mfmv - AV1 mfmv parameters +* @mfmv_valid_ref: mfmv_valid_ref +* @mfmv_dir: mfmv_dir +* @mfmv_ref_to_cur: mfmv_ref_to_cur +* @mfmv_ref_frame_idx: mfmv_ref_frame_idx +* @mfmv_count: mfmv_count +*/ +struct vdec_av1_slice_mfmv { +u32 mfmv_valid_ref[3 ]; +u32 mfmv_dir[3 ]; +int mfmv_ref_to_cur[3 ]; +int mfmv_ref_frame_idx[3 ]; +int mfmv_count; +}; + +/** +* struct vdec_av1_slice_tile - AV1 Tile info +* @tile_cols: specifies the number of tiles across the frame
+ * @tile_rows: pecifies the number of tiles down
the frame
+ * @mi_col_starts: an array specifying the start
column
+ * @mi_row_starts: an array specifying the start row
+ * @context_update_tile_id: specifies which tile to use for
the CDF update
+ * @uniform_tile_spacing_flag: tiles are uniformly spaced across the frame
+ * or the tile sizes are coded
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +11
-0+struct vdec_av1_slice_tile { +u8 tile_cols; +u8 tile_rows; +int mi_col_starts[V4L2_AV1_MAX_TILE_COLS +1 ]; +int mi_row_starts[V4L2_AV1_MAX_TILE_ROWS +1 ]; +u8 context_update_tile_id; +u8 uniform_tile_spacing_flag; +}; + +/** +* struct vdec_av1_slice_uncompressed_header - Represents an AV1 Frame Header OBU
+ * @use_ref_frame_mvs:use_ref_frame_mvsflag
+ * @order_hint: specifies OrderHintBits least
significant bits of the expected+ * @gm: global motion param + * @upscaled_width: the upscaled width + * @frame_width: frame's width + * @frame_height: frame's height + * @reduced_tx_set: frame is restricted to a reducedsubset of the full
+ * set of transform types
+ * @tx_mode: specifies how the transform size
is determined
+ * @uniform_tile_spacing_flag: tiles are uniformly spaced across the frame
+ * or the tile sizes are coded
+ * @interpolation_filter: specifies the filter selection
used for performing inter prediction
+ * @allow_warped_motion:motion_modemay be present or not
+ * @is_motion_mode_switchable : euqlt to 0 specifies that only the SIMPLE motion mode will be used
+ * @reference_mode : frame reference mode selected
+ * @allow_high_precision_mv: specifies that motion vectors are
specified to
+ * quarter pel precision or to eighth
pel precision
+ * @allow_intra_bc: ubducates that intra block copy
may be used in this frame
+ * @force_integer_mv: specifies motion vectors will
always be integers or
+ * can contain fractional bits
+ * @allow_screen_content_tools: intra blocks may use palette encoding
+ * @error_resilient_mode: error resislent mode is
enable/disable
+ * @frame_type: specifies the AV1 frame type
+ * @primary_ref_frame: specifies which reference frame
contains the CDF values
+ * and other state that should be
loaded at the start of the frame
+ * slots will be updated with the
current frame after it is decoded
+ * @disable_frame_end_update_cdf:indicates the end of frame CDF update is disable or enable
+ * @disable_cdf_update: specified whether the CDF update
in the symbol
+ * decoding process should be
disables+ * @skip_mode: av1 skip mode parameters + * @seg: av1 segmentaon parameters + * @delta_q_lf: av1 delta loop fileter + * @quant: av1 Quantization params + * @lr: av1 Loop Restauration parameters + * @superres_denom: the denominator for the upscaling ratio + * @loop_filter: av1 Loop filter parameters + * @cdef: av1 CDEF parameters + * @mfmv: av1 mfmv parameters + * @tile: av1 Tile info + * @frame_is_intra: intra frame + * @loss_less_array: loss less array + * @coded_loss_less: coded lsss less + * @mi_rows: size of mi unit in rows + * @mi_cols: size of mi unit in cols+ */
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +42
-0+struct vdec_av1_slice_uncompressed_header { +u8 use_ref_frame_mvs; +int order_hint; +struct vdec_av1_slice_gm gm[V4L2_AV1_TOTAL_REFS_PER_FRAME ]; +u32 upscaled_width; +u32 frame_width; +u32 frame_height; +u8 reduced_tx_set; +u8 tx_mode; +u8 uniform_tile_spacing_flag; +u8 interpolation_filter; +u8 allow_warped_motion; +u8 is_motion_mode_switchable; +u8 reference_mode; +u8 allow_high_precision_mv; +u8 allow_intra_bc; +u8 force_integer_mv; +u8 allow_screen_content_tools; +u8 error_resilient_mode; +u8 frame_type; +u8 primary_ref_frame; +u8 disable_frame_end_update_cdf; +u32 disable_cdf_update; +struct vdec_av1_slice_sm skip_mode; +struct vdec_av1_slice_seg seg; +struct vdec_av1_slice_delta_q_lf delta_q_lf; +struct vdec_av1_slice_quantization quant; +struct vdec_av1_slice_lr lr; +u32 superres_denom; +struct vdec_av1_slice_loop_filter loop_filter; +struct vdec_av1_slice_cdef cdef; +struct vdec_av1_slice_mfmv mfmv; +struct vdec_av1_slice_tile tile; +u8 frame_is_intra; +u8 loss_less_array[V4L2_AV1_MAX_SEGMENTS ]; +u8 coded_loss_less; +u32 mi_rows; +u32 mi_cols; +}; + +/** +* struct vdec_av1_slice_seq_header - Represents an AV1 Sequence OBU
+ * @bitdepth: the bitdepth to use for the
sequence
+ * @enable_superres: specifies whether theuse_superres
syntax element may be present
+ * @enable_filter_intra: specifies theuse_filter_intra
syntax element may be present
+ * @enable_intra_edge_filter: whether the intra edge filtering
process should be enabled
+ * @enable_interintra_compound: specifies the mode info fo rinter blocks may
+ * contain the syntax element
interintra
+ * @enable_masked_compound: specifies the mode info fo rinter
blocks may
+ * contain the syntax elementcompound_type
+ * @enable_dual_filter: the inter prediction filter type
may be specified independently
+ * @enable_jnt_comp: distance weights process may be
used for inter prediction
+ * @mono_chrome: indicates the video does not
contain U and V color planes
+ * @enable_order_hint: tools based on the values of order
hints may be used
+ * @order_hint_bits: the number of bits used for theorder_hintfield at each frame
+ * @use_128x128_superblock: indicates superblocks contain
128*128 luma samples+ * @subsampling_x: the chroma subsamling format + * @subsampling_y: the chroma subsamling format + * @max_frame_width: the maximum frame width for theframes represented by sequence
+ * @max_frame_height: the maximum frame height for the
frames represented by sequence
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +43
-0+struct vdec_av1_slice_seq_header { +u8 bitdepth; +u8 enable_superres; +u8 enable_filter_intra; +u8 enable_intra_edge_filter; +u8 enable_interintra_compound; +u8 enable_masked_compound; +u8 enable_dual_filter; +u8 enable_jnt_comp; +u8 mono_chrome; +u8 enable_order_hint; +u8 order_hint_bits; +u8 use_128x128_superblock; +u8 subsampling_x; +u8 subsampling_y; +u32 max_frame_width; +u32 max_frame_height; +}; + +/** +* struct vdec_av1_slice_frame - Represents current Frame info +* @uh: uncompressed header info +* @seq: sequence header info +* @large_scale_tile: is large scale mode +* @cur_ts: current frame timestamp +* @prev_fb_idx: prev slot id +* @ref_frame_sign_bias: arrays for ref_frame sign bias +* @order_hints: arrays for ref_frame order hint +* @ref_frame_valid: arrays for valid ref_frame +* @ref_frame_map: map to slot frame info +* @frame_refs: ref_frame info +*/ +struct vdec_av1_slice_frame { +struct vdec_av1_slice_uncompressed_header uh; +struct vdec_av1_slice_seq_header seq; +u8 large_scale_tile; +u64 cur_ts; +int prev_fb_idx; +u8 ref_frame_sign_bias[V4L2_AV1_TOTAL_REFS_PER_FRAME ]; +u32 order_hints[V4L2_AV1_REFS_PER_FRAME ]; +u32 ref_frame_valid[V4L2_AV1_REFS_PER_FRAME ]; +int ref_frame_map[V4L2_AV1_TOTAL_REFS_PER_FRAME ]; +struct vdec_av1_slice_frame_refs frame_refs[V4L2_AV1_REFS_PER_FRAME];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +44
-0+}; + +/** +* struct vdec_av1_slice_work_buffer - work buffer for lat +* @mv_addr: mv buffer memory info +* @cdf_addr: cdf buffer memory info +* @segid_addr: segid buffer memory info +*/ +struct vdec_av1_slice_work_buffer { +struct vdec_av1_slice_mem mv_addr; +struct vdec_av1_slice_mem cdf_addr; +struct vdec_av1_slice_mem segid_addr; +}; + +/** +* struct vdec_av1_slice_frame_info - frame info for each slot +* @frame_type: frame type +* @frame_is_intra: is intra frame +* @order_hint: order hint +* @order_hints: referece frame order hint +* @upscaled_width: upscale width +* @pic_pitch: buffer pitch +* @frame_width: frane width +* @frame_height: frame height +* @mi_rows: rows in mode info +* @mi_cols: cols in mode info +* @ref_count: mark to reference frame counts +*/ +struct vdec_av1_slice_frame_info { +u8 frame_type; +u8 frame_is_intra; +int order_hint; +u32 order_hints[V4L2_AV1_REFS_PER_FRAME ]; +u32 upscaled_width; +u32 pic_pitch; +u32 frame_width; +u32 frame_height; +u32 mi_rows; +u32 mi_cols; +int ref_count; +}; + +/** +* struct vdec_av1_slice_slot - slot info that needs to be saved in the global instance
+ * @frame_info: frame info for each slot
+ * @timestamp: time stamp info
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+struct vdec_av1_slice_slot { +struct vdec_av1_slice_frame_info frame_info[AV1_MAX_FRAME_BUF_COUNT];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +15
-0+u64 timestamp[AV1_MAX_FRAME_BUF_COUNT ]; +}; + +/** +* struct vdec_av1_slice_fb - frame buffer for decoding +* @y: current y buffer address info +* @c: current c buffer address info +*/ +struct vdec_av1_slice_fb { +struct vdec_av1_slice_mem y; +struct vdec_av1_slice_mem c; +}; + +/** +* struct vdec_av1_slice_vsi - exchange frame information between Main CPU and MicroP
+ * @bs: input buffer info
+ * @work_buffer: working buffe for hw
+ * @cdf_table:cdf_tablebuffer
+ * @cdf_tmp: cdf temp buffer
+ * @rd_mv: mv buffer for lat output , core input
+ * @ube: ube buffer
+ * @trans: transcoded buffer
+ * @err_map: err map buffer
+ * @row_info: row info buffer
+ * @fb: current y/c buffer
+ * @ref: ref y/c buffer
+ * @iq_table: iq table buffer
+ * @tile: tile buffer
+ * @slots: slots info for each frame
+ * @slot_id: current frame slot id
+ * @frame: current frame info
+ * @state: status after decode done
+ * @cur_lst_tile_id: tile id for large scale
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+struct vdec_av1_slice_vsi { +/* lat */ +struct vdec_av1_slice_mem bs; +struct vdec_av1_slice_work_buffer work_buffer[AV1_MAX_FRAME_BUF_COUNT];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +23
-0+struct vdec_av1_slice_mem cdf_table; +struct vdec_av1_slice_mem cdf_tmp; +/* LAT stage's output, Core stage's input */ +struct vdec_av1_slice_mem rd_mv; +struct vdec_av1_slice_mem ube; +struct vdec_av1_slice_mem trans; +struct vdec_av1_slice_mem err_map; +struct vdec_av1_slice_mem row_info; +/* core */ +struct vdec_av1_slice_fb fb; +struct vdec_av1_slice_fb ref[V4L2_AV1_REFS_PER_FRAME ]; +struct vdec_av1_slice_mem iq_table; +/* lat and core share*/ +struct vdec_av1_slice_mem tile; +struct vdec_av1_slice_slot slots; +u8 slot_id; +struct vdec_av1_slice_frame frame; +struct vdec_av1_slice_state state; +u32 cur_lst_tile_id; +}; + +/** +* struct vdec_av1_slice_pfc - per-frame context that contains a local vsi.
+ * pass it from lat to core
+ * @vsi: local vsi. copy to/from remote vsi before/after
decoding
+ * @ref_idx: reference buffer timestamp
+ * @seq: picture sequence
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +64
-0+struct vdec_av1_slice_pfc { +struct vdec_av1_slice_vsi vsi; +u64 ref_idx[V4L2_AV1_REFS_PER_FRAME ]; +int seq; +}; + +/** +* struct vdec_av1_slice_instance - represent one av1 instance +* @ctx: pointer to codec's context +* @vpu: VPU instance +* @iq_table: iq table buffer +* @cdf_table: cdf table buffer +* @mv: mv working buffer +* @cdf: cdf working buffer +* @seg: segmentation working buffer +* @cdf_temp: cdf temp buffer +* @tile: tile buffer +* @slots: slots info +* @tile_group: tile_group entry +* @level: level of current resolution +* @width: width of last picture +* @height: height of last picture +* @frame_type: frame_type of last picture +* @irq: irq to Main CPU or MicroP +* @inneracing_mode: is inneracing mode +* @init_vsi: vsi used for initialized AV1 instance +* @vsi: vsi used for decoding/flush ... +* @core_vsi: vsi used for Core stage +* @seq: global picture sequence +*/ +struct vdec_av1_slice_instance { +struct mtk_vcodec_ctx *ctx; +struct vdec_vpu_inst vpu; + +struct mtk_vcodec_mem iq_table; +struct mtk_vcodec_mem cdf_table; + +struct mtk_vcodec_mem mv[AV1_MAX_FRAME_BUF_COUNT ]; +struct mtk_vcodec_mem cdf[AV1_MAX_FRAME_BUF_COUNT ]; +struct mtk_vcodec_mem seg[AV1_MAX_FRAME_BUF_COUNT ]; +struct mtk_vcodec_mem cdf_temp; +struct mtk_vcodec_mem tile; +struct vdec_av1_slice_slot slots; +struct vdec_av1_slice_tile_group tile_group; + +/* for resolution change and get_pic_info */ +enum vdec_av1_slice_resolution_level level; +u32 width; +u32 height; + +u32 frame_type; +u32 irq; +u32 inneracing_mode; + +/* MicroP vsi */ +union { +struct vdec_av1_slice_init_vsi *init_vsi; +struct vdec_av1_slice_vsi *vsi; + }; +struct vdec_av1_slice_vsi *core_vsi; +int seq; +}; + +static int vdec_av1_slice_core_decode(struct vdec_lat_buf
*lat_buf);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+ +static inline int vdec_av1_slice_get_msb (u32 n) +{ +if (n ==0 ) +return 0 ; +return 31 ^__builtin_clz (n); +} + +static inline bool vdec_av1_slice_need_scale(u32 ref_width, u32
ref_height,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+u32 this_width, u32
this_height)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+{ +return ((this_width <<1 ) >= ref_width) && + ((this_height <<1 ) >= ref_height) && + (this_width <= (ref_width <<4 )) && + (this_height <= (ref_height <<4 )); +} + +static void *vdec_av1_get_ctrl_ptr(struct mtk_vcodec_ctx *ctx, intid)
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 8 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+{ +struct v4l2_ctrl *ctrl =v4l2_ctrl_find (&ctx->ctrl_hdl, id); + +if (!ctrl) +return ERR_PTR (-EINVAL ); + +return ctrl->p_cur.p; +}I see we keep repeating this kind of a
v4l2_ctrl_find()wrapper in drivers.
The only reason this code cannot be factored out is the "context" struct pointer
pointing at structs of different types. Maybe we could#define v4l2_get_ctrl_ptr(ctx, member, id) \ __v4l2_get_ctrl_ptr((ctx), offsetof(typeof(*ctx), (member)),(id))
void *__v4l2_get_ctrl_ptr(void *ctx,
size_toffset, u32 id) {
structv4l2_ctrl_handler*hdl = (structv4l2_ctrl_handler*)(ctx + offset); struct v4l2_ctrl *ctrl = v4l2_ctrl_find(hdl, id); if (!ctrl) return ERR_PTR(-EINVAL); return ctrl->p_cur.p; }and reuse
v4l2_get_ctrl_ptr()in drivers?A similar kind of void* arithmetic happens in
container_of, only with '-'.Quoted 14 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ +static int vdec_av1_slice_init_cdf_table(struct
vdec_av1_slice_instance*instance)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+{ +u8 *remote_cdf_table; +struct mtk_vcodec_ctx *ctx; +struct vdec_av1_slice_init_vsi *vsi; +int ret; + + ctx = instance->ctx; + vsi = instance->vpu.vsi; +if (!ctx || !vsi) { + mtk_vcodec_err(instance, "invalid ctx or vsi 0x%p0x%p\n",
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 3 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ ctx, vsi); +return -EINVAL ; + }The above if block is redundant, because - given the current shape of ths driver
code - the condition is never true.This function is only called from
vdec_av1_slice_init(), where bothinstance->ctxandinstance->vpu.vsiare set to some values. The latter is even
checked for being null before this function is called.In the caller,
instance->ctxis set to whatever the caller receives from its
caller. This perhaps might be checked, butvdec_av1_slice_init()dereferences
ctx without checking anyway (instance->vpu.codec_type= ctx-Quoted 1 line
current_codec;).So maybe add a check in
vdec_av1_slice_init(), or ensure thatvdec_av1_slice_init()is never passed a NULL ctx.Quoted 40 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ + remote_cdf_table = mtk_vcodec_fw_map_dm_addr(ctx->dev-Quoted 1 line
fw_handler,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ (u32)vsi-Quoted 1 line
cdf_table_addr);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +17
-0+if (IS_ERR (remote_cdf_table)) { +mtk_vcodec_err (instance,"failed to map cdf table\n" ); +return PTR_ERR (remote_cdf_table); + } + +mtk_vcodec_debug (instance,"map cdf table to 0x%p\n" , + remote_cdf_table); + +if (instance->cdf_table.va) +mtk_vcodec_mem_free (ctx, &instance->cdf_table); + instance->cdf_table.size = vsi->cdf_table_size; + + ret =mtk_vcodec_mem_alloc (ctx, &instance->cdf_table); +if (ret) +return ret; + + memcpy(instance->cdf_table.va, remote_cdf_table, vsi-Quoted 1 line
cdf_table_size);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+ +return 0 ; +} + +static int vdec_av1_slice_init_iq_table(struct
vdec_av1_slice_instance*instance)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+{ +u8 *remote_iq_table; +struct mtk_vcodec_ctx *ctx; +struct vdec_av1_slice_init_vsi *vsi; +int ret; + + ctx = instance->ctx; + vsi = instance->vpu.vsi; +if (!ctx || !vsi) { + mtk_vcodec_err(instance, "invalid ctx or vsi 0x%p0x%p\n",
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 3 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ ctx, vsi); +return -EINVAL ; + }ditto
Quoted 50 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ + remote_iq_table = mtk_vcodec_fw_map_dm_addr(ctx->dev-Quoted 1 line
fw_handler,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ (u32)vsi-Quoted 1 line
iq_table_addr);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+if (IS_ERR (remote_iq_table)) { +mtk_vcodec_err (instance,"failed to map iq table\n" ); +return PTR_ERR (remote_iq_table); + } + + mtk_vcodec_debug(instance, "map iq table to 0x%p\n",
remote_iq_table);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+ +if (instance->iq_table.va) +mtk_vcodec_mem_free (ctx, &instance->iq_table); + instance->iq_table.size = vsi->iq_table_size; + + ret =mtk_vcodec_mem_alloc (ctx, &instance->iq_table); +if (ret) +return ret; + + memcpy(instance->iq_table.va, remote_iq_table, vsi-Quoted 1 line
iq_table_size);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+ +return 0 ; +} + +static int vdec_av1_slice_get_new_slot(struct vdec_av1_slice_vsi*vsi)
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +21
-0+{ +struct vdec_av1_slice_slot *slots = &vsi->slots; +int new_slot_idx =AV1_INVALID_IDX ; +int i; + +for (i =0 ; i <AV1_MAX_FRAME_BUF_COUNT ; i++) { +if (slots->frame_info[i].ref_count ==0 ) { + new_slot_idx = i; +break ; + } + } + +if (new_slot_idx !=AV1_INVALID_IDX ) { + slots->frame_info[new_slot_idx].ref_count++; + slots->timestamp[new_slot_idx] = vsi->frame.cur_ts; + } + +return new_slot_idx; +} + +static void vdec_av1_slice_clear_fb(structQuoted 1 line
vdec_av1_slice_frame_info*frame_info)static inline void?
Quoted 14 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+{ + memset((void *)frame_info, 0, sizeof(struct
vdec_av1_slice_frame_info));drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+} + +static void vdec_av1_slice_decrease_ref_count(struct
vdec_av1_slice_slot*slots, intfb_idx)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+{ + struct vdec_av1_slice_frame_info *frame_info = slots-Quoted 1 line
frame_info;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ +if (fb_idx <0 || fb_idx >=AV1_MAX_FRAME_BUF_COUNT ) { + mtk_v4l2_err("av1_error: %s() invalid fb_idx %d\n",
__func__,fb_idx);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 2 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+return ; + }The above if block is redundant, because - given the current shape of this
driver code - the condition is never true.This function is only called from the below
vdec_av1_slice_cleanup_slots().
Thefb_idxformal param comes from the caller'sslot_idlocal variable, whose
value is only assigned in the for loop, iterating from 0 toAV1_MAX_FRAME_BUF_COUNT- 1, inclusive. Henceslot_idis never < 0 nor >=AV1_MAX_FRAME_BUF_COUNT.Quoted 132 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+ + frame_info[fb_idx].ref_count--; +if (frame_info[fb_idx].ref_count <0 ) { + frame_info[fb_idx].ref_count =0 ; + mtk_v4l2_err("av1_error: %s() fb_idx %d decrease
ref_counterror\n",drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+ __func__, fb_idx); + } +vdec_av1_slice_clear_fb (&frame_info[fb_idx]); +} + +static void vdec_av1_slice_cleanup_slots(struct
vdec_av1_slice_slot*slots,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+struct vdec_av1_slice_frame *frame,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+struct v4l2_ctrl_av1_frame
*ctrl_fh)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+{ +int slot_id, ref_id; + + for (ref_id = 0; ref_id < V4L2_AV1_TOTAL_REFS_PER_FRAME;ref_id++)
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ frame->ref_frame_map[ref_id] =AV1_INVALID_IDX ; + +for (slot_id =0 ; slot_id <AV1_MAX_FRAME_BUF_COUNT ; slot_id++){
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+u64 timestamp = slots->timestamp[slot_id]; +bool ref_used = false; + +/* ignored unused slots */ +if (slots->frame_info[slot_id].ref_count ==0 ) +continue ; + + for (ref_id = 0; ref_id <
V4L2_AV1_TOTAL_REFS_PER_FRAME; ref_id++) {drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ if (ctrl_fh->reference_frame_ts[ref_id] ==timestamp) {
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+ frame->ref_frame_map[ref_id] = slot_id; + ref_used = true; + } + } + +if (!ref_used) + vdec_av1_slice_decrease_ref_count(slots,
slot_id);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ } +} + +static void vdec_av1_slice_setup_slot(struct
vdec_av1_slice_instance*instance,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+struct vdec_av1_slice_vsi *vsi, + struct v4l2_ctrl_av1_frame
*ctrl_fh)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+{ +struct vdec_av1_slice_frame_info *cur_frame_info; +struct vdec_av1_slice_uncompressed_header *uh = &vsi->frame.uh; +int ref_id; + +memcpy (&vsi->slots, &instance->slots,sizeof (instance->slots)); + vdec_av1_slice_cleanup_slots(&vsi->slots, &vsi->frame,
ctrl_fh);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+ vsi->slot_id =vdec_av1_slice_get_new_slot (vsi); + +if (vsi->slot_id ==AV1_INVALID_IDX ) { +mtk_v4l2_err ("warning:av1 get invalid index slot\n" ); + vsi->slot_id =0 ; + } + cur_frame_info = &vsi->slots.frame_info[vsi->slot_id]; + cur_frame_info->frame_type = uh->frame_type; + cur_frame_info->frame_is_intra = ((uh->frame_type ==
AV1_INTRA_ONLY_FRAME) ||drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ (uh->frame_type ==
AV1_KEY_FRAME));drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+ cur_frame_info->order_hint = uh->order_hint; + cur_frame_info->upscaled_width = uh->upscaled_width; + cur_frame_info->pic_pitch =0 ; + cur_frame_info->frame_width = uh->frame_width; + cur_frame_info->frame_height = uh->frame_height; + cur_frame_info->mi_cols = ((uh->frame_width +7 ) >>3 ) <<1 ; + cur_frame_info->mi_rows = ((uh->frame_height +7 ) >>3 ) <<1 ; + +/* ensure current frame is properly mapped if referenced */ + for (ref_id = 0; ref_id < V4L2_AV1_TOTAL_REFS_PER_FRAME;ref_id++) {
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+u64 timestamp = vsi->slots.timestamp[vsi->slot_id]; + +if (ctrl_fh->reference_frame_ts[ref_id] == timestamp) + vsi->frame.ref_frame_map[ref_id] = vsi-Quoted 1 line
slot_id;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ } +} + +static int vdec_av1_slice_alloc_working_buffer(struct
vdec_av1_slice_instance*instance,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ struct
vdec_av1_slice_vsi*vsi)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+{ +struct mtk_vcodec_ctx *ctx = instance->ctx; + struct vdec_av1_slice_work_buffer *work_buffer = vsi-Quoted 1 line
work_buffer;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+enum vdec_av1_slice_resolution_level level; +u32 max_sb_w, max_sb_h, max_w, max_h, w, h; +size_t size; +int i, ret; + + w = vsi->frame.uh.frame_width; + h = vsi->frame.uh.frame_height; + + if (w > VCODEC_DEC_4K_CODED_WIDTH || h >
VCODEC_DEC_4K_CODED_HEIGHT)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +19
-0+/* 8K */ +return -EINVAL ; + +if (w >MTK_VDEC_MAX_W || h >MTK_VDEC_MAX_H ) { +/* 4K */ + level =AV1_RES_4K ; + max_w =VCODEC_DEC_4K_CODED_WIDTH ; + max_h =VCODEC_DEC_4K_CODED_HEIGHT ; + }else { +/* FHD */ + level =AV1_RES_FHD ; + max_w =MTK_VDEC_MAX_W ; + max_h =MTK_VDEC_MAX_H ; + } + +if (level == instance->level) +return 0 ; + + mtk_vcodec_debug(instance, "resolution level changed from %u to%u, %ux%u",
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ instance->level, level, w, h); +drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+ max_sb_w =DIV_ROUND_UP (max_w,128 ); + max_sb_h =DIV_ROUND_UP (max_h,128 ); + size = max_sb_w * max_sb_h *SZ_1K ; +for (i =0 ; i <AV1_MAX_FRAME_BUF_COUNT ; i++) { +if (instance->mv[i].va) +mtk_vcodec_mem_free (ctx, &instance->mv[i]); + instance->mv[i].size = size; + ret =mtk_vcodec_mem_alloc (ctx, &instance->mv[i]); +if (ret) + goto err;Please ignore this comment if this has been discussed and settled. Maybe it's just me, but I feel it is idiomatic in the kernel to undo all previous allocations if at some iteration we fail. Here a different
approach is taken: we stop iterating and return an error, and free next time
we are called. Why?Quoted 13 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +12
-0+ work_buffer[i].mv_addr.buf = instance->mv[i].dma_addr; + work_buffer[i].mv_addr.size = size; > + } + + size = max_sb_w * max_sb_h *512 ; +for (i =0 ; i <AV1_MAX_FRAME_BUF_COUNT ; i++) { +if (instance->seg[i].va) +mtk_vcodec_mem_free (ctx, &instance->seg[i]); + instance->seg[i].size = size; + ret =mtk_vcodec_mem_alloc (ctx, &instance->seg[i]); +if (ret) + goto err; + work_buffer[i].segid_addr.buf = instance-Quoted 1 line
seg[i].dma_addr;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 4 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ work_buffer[i].segid_addr.size = size; + } + + size =16384 ;#define a named constant for this magic number?
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 11 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+for (i =0 ; i <AV1_MAX_FRAME_BUF_COUNT ; i++) { +if (instance->cdf[i].va) +mtk_vcodec_mem_free (ctx, &instance->cdf[i]); + instance->cdf[i].size = size; + ret =mtk_vcodec_mem_alloc (ctx, &instance->cdf[i]); +if (ret) + goto err; + work_buffer[i].cdf_addr.buf = instance-Quoted 1 line
cdf[i].dma_addr;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ work_buffer[i].cdf_addr.size = size; + }The 3 for loops are supposed to iterate from 0 to
AV1_MAX_FRAME_BUF_COUNT- 1,
inclusive. Is it possible to merge them?drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 9 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+if (!instance->cdf_temp.va) { + instance->cdf_temp.size = (SZ_1K *16 *100 ); + ret =mtk_vcodec_mem_alloc (ctx, &instance->cdf_temp); +if (ret) + goto err; + vsi->cdf_tmp.buf = instance->cdf_temp.dma_addr; + vsi->cdf_tmp.size = instance->cdf_temp.size; + } + size =AV1_TILE_BUF_SIZE *V4L2_AV1_MAX_TILE_COUNT ;This "size" is never changed until the end of this function. It is a compile-time constant, so there's no need to assign its value to an intermediate variable.
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 4 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ +if (instance->tile.va) +mtk_vcodec_mem_free (ctx, &instance->tile); + instance->tile.size = size;
instance->tile.size=AV1_TILE_BUF_SIZE*V4L2_AV1_MAX_TILE_COUNT;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 7 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+ + ret =mtk_vcodec_mem_alloc (ctx, &instance->tile); +if (ret) + goto err; + + vsi->tile.buf = instance->tile.dma_addr; + vsi->tile.size = size;
vsi->tile.size=instance->tile.size;and now it is clear the size in vsi is the same as the one in instance.
BTW, isvsi->tile.sizesupposed to always be equal to the one in instance?
If yes:
- Is instance available whenever we need to accessvsi->tile.size?
- What's the point of duplicating this value? Can it be stored in
one place?Quoted 11 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+ + instance->level = level; +return 0 ; + +err: + instance->level =AV1_RES_NONE ; +return ret; +} + +static void vdec_av1_slice_free_working_buffer(struct
vdec_av1_slice_instance*instance)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 7 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+{ +struct mtk_vcodec_ctx *ctx = instance->ctx; +int i; + +for (i =0 ; i <ARRAY_SIZE (instance->mv); i++) +if (instance->mv[i].va) +mtk_vcodec_mem_free (ctx, &instance->mv[i]);Perhaps
mtk_vcodec_mem_free()can properly handle the case(!instance->mv[i].va) ? This would eliminate 7 of 20 lines of code in this function.
Quoted 24 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +22
-0+ +for (i =0 ; i <ARRAY_SIZE (instance->seg); i++) +if (instance->seg[i].va) +mtk_vcodec_mem_free (ctx, &instance->seg[i]); + +for (i =0 ; i <ARRAY_SIZE (instance->cdf); i++) +if (instance->cdf[i].va) +mtk_vcodec_mem_free (ctx, &instance->cdf[i]); + +if (instance->tile.va) +mtk_vcodec_mem_free (ctx, &instance->tile); +if (instance->cdf_temp.va) +mtk_vcodec_mem_free (ctx, &instance->cdf_temp); +if (instance->cdf_table.va) +mtk_vcodec_mem_free (ctx, &instance->cdf_table); +if (instance->iq_table.va) +mtk_vcodec_mem_free (ctx, &instance->iq_table); + + instance->level =AV1_RES_NONE ; +} + +static void vdec_av1_slice_vsi_from_remote(struct
vdec_av1_slice_vsi*vsi,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+struct vdec_av1_slice_vsi Quoted 1 line
*remote_vsi)static inline void?
Quoted 9 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+{ +memcpy (&vsi->trans, &remote_vsi->trans,sizeof (vsi->trans)); +memcpy (&vsi->state, &remote_vsi->state,sizeof (vsi->state)); +} + +static void vdec_av1_slice_vsi_to_remote(struct vdec_av1_slice_vsi*vsi,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+struct vdec_av1_slice_vsi
*remote_vsi)static inline void?
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+{ +memcpy (remote_vsi, vsi,sizeof (*vsi)); +} + +static int vdec_av1_slice_setup_lat_from_src_buf(struct
vdec_av1_slice_instance*instance,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ struct
vdec_av1_slice_vsi*vsi,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+struct vdec_lat_buf
*lat_buf)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+{ +struct vb2_v4l2_buffer *src; +struct vb2_v4l2_buffer *dst; + + src =v4l2_m2m_next_src_buf (instance->ctx->m2m_ctx); +if (!src) +return -EINVAL ; + + lat_buf->src_buf_req = src->vb2_buf.req_obj.req; + dst = &lat_buf->ts_info;the "
ts_info" actually contains a structvb2_v4l2_buffer. Why such a name?Quoted 79 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+v4l2_m2m_buf_copy_metadata (src, dst, true); + vsi->frame.cur_ts = dst->vb2_buf.timestamp; + +return 0 ; +} + +static short vdec_av1_slice_resolve_divisor_32(u32 D, short*shift)
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+{ +int f; +int e; + + *shift =vdec_av1_slice_get_msb (D ); +/* e is obtained from D after resetting the most significant 1 bit. */
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ e =D - ((u32 )1 << *shift); +/* Get the most significant DIV_LUT_BITS (8) bits of e into f */
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +12
-0+if (*shift >DIV_LUT_BITS ) + f =AV1_DIV_ROUND_UP_POW2 (e, *shift -DIV_LUT_BITS ); +else + f = e << (DIV_LUT_BITS - *shift); +if (f >DIV_LUT_NUM ) +return -1 ; + *shift +=DIV_LUT_PREC_BITS ; +/* Use f as lookup into the precomputed table of multipliers */ +return div_lut[f]; +} + +static void vdec_av1_slice_get_shear_params(struct
vdec_av1_slice_gm*gm_params)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+{ +const int *mat = gm_params->wmmat; +short shift; +short y; +long long gv, dv; + +if (gm_params->wmmat[2 ] <=0 ) +return ; + + gm_params->alpha = clamp_val(mat[2] - (1 <<
WARPEDMODEL_PREC_BITS),S16_MIN,S16_MAX);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ gm_params->beta =clamp_val (mat[3 ],S16_MIN ,S16_MAX ); + + y = vdec_av1_slice_resolve_divisor_32(abs(mat[2]), &shift) *(mat[2] < 0 ? -1 : 1);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ + gv = ((long long )mat[4 ] * (1 <<WARPEDMODEL_PREC_BITS )) * y; + gm_params->gamma =clamp_val((int)AV1_DIV_ROUND_UP_POW2_SIGNED(gv, shift),
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ S16_MIN, S16_MAX); + + dv = ((long long )mat[3 ] * mat[4 ]) * y; + gm_params->delta = clamp_val(mat[5] -(int)AV1_DIV_ROUND_UP_POW2_SIGNED(dv, shift) -
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ (1 << WARPEDMODEL_PREC_BITS),
S16_MIN,S16_MAX);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ + gm_params->alpha = AV1_DIV_ROUND_UP_POW2_SIGNED(gm_params-Quoted 1 line
alpha,
WARP_PARAM_REDUCE_BITS) *drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ (1 <<
WARP_PARAM_REDUCE_BITS);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ gm_params->beta = AV1_DIV_ROUND_UP_POW2_SIGNED(gm_params->beta,
WARP_PARAM_REDUCE_BITS) *drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ (1 <<
WARP_PARAM_REDUCE_BITS);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ gm_params->gamma = AV1_DIV_ROUND_UP_POW2_SIGNED(gm_params-Quoted 1 line
gamma,
WARP_PARAM_REDUCE_BITS) *drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ (1 <<
WARP_PARAM_REDUCE_BITS);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ gm_params->delta = AV1_DIV_ROUND_UP_POW2_SIGNED(gm_params-Quoted 1 line
delta,
WARP_PARAM_REDUCE_BITS) *drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ (1 <<
WARP_PARAM_REDUCE_BITS);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+} + +static void vdec_av1_slice_setup_gm (struct vdec_av1_slice_gm *gm, + struct v4l2_av1_global_motion
*ctrl_gm)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 6 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+{ +u32 i, j; + +for (i =0 ; i <V4L2_AV1_TOTAL_REFS_PER_FRAME ; i++) { + gm[i].wmtype = ctrl_gm->type[i]; +for (j =0 ; j <6 ; j++)Maybe #define this magic 6?
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 8 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+ gm[i].wmmat[j] = ctrl_gm->params[i][j]; + + gm[i].invalid = !!(ctrl_gm->invalid &BIT (i)); + gm[i].alpha =0 ; + gm[i].beta =0 ; + gm[i].gamma =0 ; + gm[i].delta =0 ; +if (gm[i].wmtype <=3 )And this 3?
Quoted 36 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+vdec_av1_slice_get_shear_params (&gm[i]); + } +} + +static void vdec_av1_slice_setup_seg(struct vdec_av1_slice_seg*seg,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+struct v4l2_av1_segmentation
*ctrl_seg)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+{ +u32 i, j; + + seg->segmentation_enabled = SEGMENTATION_FLAG(ctrl_seg,ENABLED);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ seg->segmentation_update_map = SEGMENTATION_FLAG(ctrl_seg,
UPDATE_MAP);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ seg->segmentation_temporal_update = SEGMENTATION_FLAG(ctrl_seg,
TEMPORAL_UPDATE);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ seg->segmentation_update_data = SEGMENTATION_FLAG(ctrl_seg,
UPDATE_DATA);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ seg->segid_preskip = SEGMENTATION_FLAG(ctrl_seg,
SEG_ID_PRE_SKIP);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ seg->last_active_segid = ctrl_seg->last_active_seg_id; + +for (i =0 ; i <V4L2_AV1_MAX_SEGMENTS ; i++) { + seg->feature_enabled_mask[i] = ctrl_seg-Quoted 1 line
feature_enabled[i];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+for (j =0 ; j <V4L2_AV1_SEG_LVL_MAX ; j++) + seg->feature_data[i][j] = ctrl_seg-Quoted 1 line
feature_data[i][j];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ } +} + +static void vdec_av1_slice_setup_quant(struct
vdec_av1_slice_quantization*quant,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+struct v4l2_av1_quantization
*ctrl_quant)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+{ + quant->base_q_idx = ctrl_quant->base_q_idx; + quant->delta_qydc = ctrl_quant->delta_q_y_dc; + quant->delta_qudc = ctrl_quant->delta_q_u_dc; + quant->delta_quac = ctrl_quant->delta_q_u_ac; + quant->delta_qvdc = ctrl_quant->delta_q_v_dc; + quant->delta_qvac = ctrl_quant->delta_q_v_ac; + quant->qm_y = ctrl_quant->qm_y; + quant->qm_u = ctrl_quant->qm_u; + quant->qm_v = ctrl_quant->qm_v;Can a common struct be introduced to hold these parameters? And then copied in one go?
Maybe there's a good reason the code is the way it is now. However, a series of "dumb" assignments (no value modifications) makes me wonder.
Quoted 90 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ quant->using_qmatrix =QUANT_FLAG (ctrl_quant,USING_QMATRIX ); +} + +static int vdec_av1_slice_get_qindex(struct
vdec_av1_slice_uncompressed_header*uh,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+ int segmentation_id) +{ +struct vdec_av1_slice_seg *seg = &uh->seg; +struct vdec_av1_slice_quantization *quant = &uh->quant; +int data =0 , qindex =0 ; + + if (seg->segmentation_enabled && + (seg->feature_enabled_mask[segmentation_id] &
BIT(SEG_LVL_ALT_Q))) {drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ data = seg-Quoted 1 line
feature_data[segmentation_id][SEG_LVL_ALT_Q];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+ qindex = quant->base_q_idx + data; +return clamp_val (qindex,0 ,MAXQ ); + } + +return quant->base_q_idx; +} + +static void vdec_av1_slice_setup_lr(struct vdec_av1_slice_lr *lr, + struct
v4l2_av1_loop_restoration*ctrl_lr)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+{ +int i; + + lr->use_lr =0 ; + lr->use_chroma_lr =0 ; +for (i =0 ; i <V4L2_AV1_NUM_PLANES_MAX ; i++) { + lr->frame_restoration_type[i] = ctrl_lr-Quoted 1 line
frame_restoration_type[i];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ lr->loop_restoration_size[i] = ctrl_lr-Quoted 1 line
loop_restoration_size[i];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+if (lr->frame_restoration_type[i]) { + lr->use_lr =1 ; +if (i >0 ) + lr->use_chroma_lr =1 ; + } + } +} + +static void vdec_av1_slice_setup_lf(struct
vdec_av1_slice_loop_filter*lf,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+struct v4l2_av1_loop_filter
*ctrl_lf)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +11
-0+{ +int i; + +for (i =0 ; i <ARRAY_SIZE (lf->loop_filter_level); i++) + lf->loop_filter_level[i] = ctrl_lf->level[i]; + +for (i =0 ; i <V4L2_AV1_TOTAL_REFS_PER_FRAME ; i++) + lf->loop_filter_ref_deltas[i] = ctrl_lf->ref_deltas[i]; + +for (i =0 ; i <ARRAY_SIZE (lf->loop_filter_mode_deltas); i++) + lf->loop_filter_mode_deltas[i] = ctrl_lf-Quoted 1 line
mode_deltas[i];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ + lf->loop_filter_sharpness = ctrl_lf->sharpness; + lf->loop_filter_delta_enabled = + BIT_FLAG(ctrl_lf,
V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+} + +static void vdec_av1_slice_setup_cdef(struct vdec_av1_slice_cdef*cdef,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +16
-0+ struct v4l2_av1_cdef *ctrl_cdef) +{ +int i; + + cdef->cdef_damping = ctrl_cdef->damping_minus_3 +3 ; + cdef->cdef_bits = ctrl_cdef->bits; + +for (i =0 ; i <V4L2_AV1_CDEF_MAX ; i++) { +if (ctrl_cdef->y_sec_strength[i] ==4 ) + ctrl_cdef->y_sec_strength[i] -=1 ; + +if (ctrl_cdef->uv_sec_strength[i] ==4 ) + ctrl_cdef->uv_sec_strength[i] -=1 ; + + cdef->cdef_y_strength[i] = + ctrl_cdef->y_pri_strength[i] <<
SECONDARY_FILTER_STRENGTH_NUM_BITS|drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ ctrl_cdef->y_sec_strength[i]; + cdef->cdef_uv_strength[i] = + ctrl_cdef->uv_pri_strength[i] <<
SECONDARY_FILTER_STRENGTH_NUM_BITS|drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 3 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ ctrl_cdef->uv_sec_strength[i]; + } +}Both
vdec_av1_slice_setup_lf()andvdec_av1_slice_setup_cdef():I'm wondering if the user of struct
vdec_av1_slice_loop_filterand structvdec_av1_slice_cdefcould work with the uAPI variants of these structs? Is there
a need for driver-specific mutations? (Maybe there is, the driver's author
should know).Quoted 210 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ +static void vdec_av1_slice_setup_seq(struct
vdec_av1_slice_seq_header*seq,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+struct v4l2_ctrl_av1_sequence
*ctrl_seq)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+{ + seq->bitdepth = ctrl_seq->bit_depth; + seq->max_frame_width = ctrl_seq->max_frame_width_minus_1 +1 ; + seq->max_frame_height = ctrl_seq->max_frame_height_minus_1 +1 ; + seq->enable_superres = SEQUENCE_FLAG(ctrl_seq,
ENABLE_SUPERRES);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ seq->enable_filter_intra = SEQUENCE_FLAG(ctrl_seq,
ENABLE_FILTER_INTRA);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ seq->enable_intra_edge_filter = SEQUENCE_FLAG(ctrl_seq,
ENABLE_INTRA_EDGE_FILTER);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ seq->enable_interintra_compound = SEQUENCE_FLAG(ctrl_seq,
ENABLE_INTERINTRA_COMPOUND);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ seq->enable_masked_compound = SEQUENCE_FLAG(ctrl_seq,
ENABLE_MASKED_COMPOUND);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ seq->enable_dual_filter = SEQUENCE_FLAG(ctrl_seq,
ENABLE_DUAL_FILTER);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ seq->enable_jnt_comp = SEQUENCE_FLAG(ctrl_seq,
ENABLE_JNT_COMP);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ seq->mono_chrome =SEQUENCE_FLAG (ctrl_seq,MONO_CHROME ); + seq->enable_order_hint = SEQUENCE_FLAG(ctrl_seq,
ENABLE_ORDER_HINT);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ seq->order_hint_bits = ctrl_seq->order_hint_bits; + seq->use_128x128_superblock = SEQUENCE_FLAG(ctrl_seq,
USE_128X128_SUPERBLOCK);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+ seq->subsampling_x =SEQUENCE_FLAG (ctrl_seq,SUBSAMPLING_X ); + seq->subsampling_y =SEQUENCE_FLAG (ctrl_seq,SUBSAMPLING_Y ); +} + +static void vdec_av1_slice_setup_tile(struct vdec_av1_slice_frame*frame,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+struct v4l2_av1_tile_info
*ctrl_tile)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+{ +struct vdec_av1_slice_seq_header *seq = &frame->seq; +struct vdec_av1_slice_tile *tile = &frame->uh.tile; +u32 mib_size_log2 = seq->use_128x128_superblock ?5 :4 ; +int i; + + tile->tile_cols = ctrl_tile->tile_cols; + tile->tile_rows = ctrl_tile->tile_rows; + tile->context_update_tile_id = ctrl_tile-Quoted 1 line
context_update_tile_id;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ tile->uniform_tile_spacing_flag = + BIT_FLAG(ctrl_tile,
V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ +for (i =0 ; i < tile->tile_cols +1 ; i++) + tile->mi_col_starts[i] = + ALIGN(ctrl_tile->mi_col_starts[i],
BIT(mib_size_log2)) >>mib_size_log2;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ +for (i =0 ; i < tile->tile_rows +1 ; i++) + tile->mi_row_starts[i] = + ALIGN(ctrl_tile->mi_row_starts[i],
BIT(mib_size_log2)) >>mib_size_log2;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+} + +static void vdec_av1_slice_setup_uh(struct vdec_av1_slice_instance*instance,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+struct vdec_av1_slice_frame *frame, + struct v4l2_ctrl_av1_frame
*ctrl_fh)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +15
-0+{ +struct vdec_av1_slice_uncompressed_header *uh = &frame->uh; +int i; + + uh->use_ref_frame_mvs =FH_FLAG (ctrl_fh,USE_REF_FRAME_MVS ); + uh->order_hint = ctrl_fh->order_hint; +vdec_av1_slice_setup_gm (uh->gm, &ctrl_fh->global_motion); + uh->upscaled_width = ctrl_fh->upscaled_width; + uh->frame_width = ctrl_fh->frame_width_minus_1 +1 ; + uh->frame_height = ctrl_fh->frame_height_minus_1 +1 ; + uh->mi_cols = ((uh->frame_width +7 ) >>3 ) <<1 ; + uh->mi_rows = ((uh->frame_height +7 ) >>3 ) <<1 ; + uh->reduced_tx_set =FH_FLAG (ctrl_fh,REDUCED_TX_SET ); + uh->tx_mode = ctrl_fh->tx_mode; + uh->uniform_tile_spacing_flag = FH_FLAG(ctrl_fh,
UNIFORM_TILE_SPACING);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ uh->interpolation_filter = ctrl_fh->interpolation_filter; + uh->allow_warped_motion = FH_FLAG(ctrl_fh,
ALLOW_WARPED_MOTION);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ uh->is_motion_mode_switchable = FH_FLAG(ctrl_fh,
IS_MOTION_MODE_SWITCHABLE);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ uh->frame_type = ctrl_fh->frame_type; + uh->frame_is_intra = (uh->frame_type ==
V4L2_AV1_INTRA_ONLY_FRAME||drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+ uh->frame_type == V4L2_AV1_KEY_FRAME); + +if (!uh->frame_is_intra &&FH_FLAG (ctrl_fh,REFERENCE_SELECT )) + uh->reference_mode =AV1_REFERENCE_MODE_SELECT ; +else + uh->reference_mode =AV1_SINGLE_REFERENCE ; + + uh->allow_high_precision_mv = FH_FLAG(ctrl_fh,
ALLOW_HIGH_PRECISION_MV);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ uh->allow_intra_bc =FH_FLAG (ctrl_fh,ALLOW_INTRABC ); + uh->force_integer_mv =FH_FLAG (ctrl_fh,FORCE_INTEGER_MV ); + uh->allow_screen_content_tools = FH_FLAG(ctrl_fh,
ALLOW_SCREEN_CONTENT_TOOLS);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ uh->error_resilient_mode = FH_FLAG(ctrl_fh,
ERROR_RESILIENT_MODE);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+ uh->primary_ref_frame = ctrl_fh->primary_ref_frame; + uh->disable_frame_end_update_cdf = +FH_FLAG (ctrl_fh,DISABLE_FRAME_END_UPDATE_CDF ); + uh->disable_cdf_update =FH_FLAG (ctrl_fh,DISABLE_CDF_UPDATE ); + uh->skip_mode.skip_mode_present = FH_FLAG(ctrl_fh,
SKIP_MODE_PRESENT);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+ uh->skip_mode.skip_mode_frame[0 ] = + ctrl_fh->skip_mode_frame[0 ] -V4L2_AV1_REF_LAST_FRAME ; + uh->skip_mode.skip_mode_frame[1 ] = + ctrl_fh->skip_mode_frame[1 ] -V4L2_AV1_REF_LAST_FRAME ; + uh->skip_mode.skip_mode_allowed = ctrl_fh->skip_mode_frame[0] ?1 : 0;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ +vdec_av1_slice_setup_seg (&uh->seg, &ctrl_fh->segmentation); + uh->delta_q_lf.delta_q_present = QUANT_FLAG(&ctrl_fh-Quoted 1 line
quantization,
DELTA_Q_PRESENT);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ uh->delta_q_lf.delta_q_res = 1 << ctrl_fh-Quoted 1 line
quantization.delta_q_res;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ uh->delta_q_lf.delta_lf_present = + BIT_FLAG(&ctrl_fh->loop_filter,
V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_PRESENT);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ uh->delta_q_lf.delta_lf_res = ctrl_fh-Quoted 1 line
loop_filter.delta_lf_res;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ uh->delta_q_lf.delta_lf_multi = + BIT_FLAG(&ctrl_fh->loop_filter,
V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_MULTI);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+vdec_av1_slice_setup_quant (&uh->quant, &ctrl_fh->quantization); + + uh->coded_loss_less =1 ; + for (i = 0; i < V4L2_AV1_MAX_SEGMENTS; i++) { + uh->quant.qindex[i] = vdec_av1_slice_get_qindex(uh, i); + uh->loss_less_array[i] = + (uh->quant.qindex[i] == 0 && uh-Quoted 1 line
quant.delta_qydc == 0 &&
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ uh->quant.delta_quac == 0 && uh-Quoted 1 line
quant.delta_qudc == 0 &&
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ uh->quant.delta_qvac == 0 && uh-Quoted 1 line
quant.delta_qvdc == 0);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+ +if (!uh->loss_less_array[i]) + uh->coded_loss_less =0 ; + } + +vdec_av1_slice_setup_lr (&uh->lr, &ctrl_fh->loop_restoration); + uh->superres_denom = ctrl_fh->superres_denom; + vdec_av1_slice_setup_lf(&uh->loop_filter, &ctrl_fh-Quoted 1 line
loop_filter);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+vdec_av1_slice_setup_cdef (&uh->cdef, &ctrl_fh->cdef); +vdec_av1_slice_setup_tile (frame, &ctrl_fh->tile_info); +} + +static int vdec_av1_slice_setup_tile_group(struct
vdec_av1_slice_instance*instance,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+struct vdec_av1_slice_vsi *vsi)
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+{ +struct v4l2_ctrl_av1_tile_group_entry *ctrl_tge; + struct vdec_av1_slice_tile_group *tile_group = &instance-Quoted 1 line
tile_group;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+struct vdec_av1_slice_uncompressed_header *uh = &vsi->frame.uh; +struct vdec_av1_slice_tile *tile = &uh->tile; +struct v4l2_ctrl *ctrl; +u32 tge_size; +int i; + + ctrl = v4l2_ctrl_find(&instance->ctx->ctrl_hdl,
V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+if (!ctrl) +return -EINVAL ; + + tge_size = ctrl->elems; + ctrl_tge = (struct v4l2_ctrl_av1_tile_group_entry *)ctrl-Quoted 1 line
p_cur.p;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+ + tile_group->num_tiles = tile->tile_cols * tile->tile_rows; + +if (tile_group->num_tiles != tge_size || + tile_group->num_tiles >V4L2_AV1_MAX_TILE_COUNT ) { + mtk_vcodec_err(instance, "invalid tge_size %d,tile_num:%d\n",
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+ tge_size, tile_group->num_tiles); +return -EINVAL ; + } + + for (i = 0; i < tge_size; i++) { + if (i != ctrl_tge[i].tile_row * vsi-Quoted 1 line
frame.uh.tile.tile_cols +
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ ctrl_tge[i].tile_col) { + mtk_vcodec_err(instance, "invalid tge info %d,%d %d %d\n",
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ i, ctrl_tge[i].tile_row,ctrl_tge[i].tile_col,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+ vsi->frame.uh.tile.tile_rows); +return -EINVAL ; + } + tile_group->tile_size[i] = ctrl_tge[i].tile_size; + tile_group->tile_start_offset[i] =ctrl_tge[i].tile_offset;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+ } + +return 0 ; +} + +static void vdec_av1_slice_setup_state(struct vdec_av1_slice_vsiQuoted 1 line
*vsi)
static inline void?
Quoted 53 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+{ +memset (&vsi->state,0 ,sizeof (vsi->state)); +} + +static void vdec_av1_slice_setup_scale_factors(struct
vdec_av1_slice_frame_refs*frame_ref,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ struct
vdec_av1_slice_frame_info*ref_frame_info,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ struct
vdec_av1_slice_uncompressed_header*uh)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+{ + struct vdec_av1_slice_scale_factors *scale_factors =
&frame_ref->scale_factors;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+u32 ref_upscaled_width = ref_frame_info->upscaled_width; +u32 ref_frame_height = ref_frame_info->frame_height; +u32 frame_width = uh->frame_width; +u32 frame_height = uh->frame_height; + + if (!vdec_av1_slice_need_scale(ref_upscaled_width,
ref_frame_height,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+ frame_width, frame_height)) { + scale_factors->x_scale =-1 ; + scale_factors->y_scale =-1 ; + scale_factors->is_scaled =0 ; +return ; + } + + scale_factors->x_scale = + ((ref_upscaled_width << AV1_REF_SCALE_SHIFT) +(
frame_width>> 1)) /frame_width;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ scale_factors->y_scale = + ((ref_frame_height << AV1_REF_SCALE_SHIFT) +(
frame_height>> 1)) /frame_height;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+ scale_factors->is_scaled = + (scale_factors->x_scale !=AV1_REF_INVALID_SCALE ) && + (scale_factors->y_scale !=AV1_REF_INVALID_SCALE ) && + (scale_factors->x_scale !=AV1_REF_NO_SCALE || + scale_factors->y_scale !=AV1_REF_NO_SCALE ); + scale_factors->x_step = + AV1_DIV_ROUND_UP_POW2(scale_factors->x_scale, + AV1_REF_SCALE_SHIFT -
AV1_SCALE_SUBPEL_BITS);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ scale_factors->y_step = + AV1_DIV_ROUND_UP_POW2(scale_factors->y_scale, + AV1_REF_SCALE_SHIFT -
AV1_SCALE_SUBPEL_BITS);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+} + +static int vdec_av1_slice_get_relative_dist(int a, int b, u8
enable_order_hint, u8order_hint_bits)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+{ +int diff =0 ; +int m =0 ;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+ +if (!enable_order_hint) +return 0 ; + + diff = a - b; + m =1 << (order_hint_bits -1 ); + diff = (diff & (m -1 )) - (diff & m); + +return diff; +}This function is called in one place only, and its result needs to be interpreted at call site. Can it return the result in a form expected at call site...
Quoted 51 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ +static void vdec_av1_slice_setup_ref(struct vdec_av1_slice_pfc*pfc,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+struct v4l2_ctrl_av1_frame
*ctrl_fh)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +22
-0+{ +struct vdec_av1_slice_vsi *vsi = &pfc->vsi; +struct vdec_av1_slice_frame *frame = &vsi->frame; +struct vdec_av1_slice_slot *slots = &vsi->slots; +struct vdec_av1_slice_uncompressed_header *uh = &frame->uh; +struct vdec_av1_slice_seq_header *seq = &frame->seq; +struct vdec_av1_slice_frame_info *cur_frame_info = + &slots->frame_info[vsi->slot_id]; +struct vdec_av1_slice_frame_info *frame_info; +int i, slot_id; + +if (uh->frame_is_intra) +return ; + +for (i =0 ; i <V4L2_AV1_REFS_PER_FRAME ; i++) { +int ref_idx = ctrl_fh->ref_frame_idx[i]; + + pfc->ref_idx[i] = ctrl_fh->reference_frame_ts[ref_idx]; + slot_id = frame->ref_frame_map[ref_idx]; + frame_info = &slots->frame_info[slot_id]; +if (slot_id ==AV1_INVALID_IDX ) { + mtk_v4l2_err("cannot match reference[%d]0x%llx\n", i,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ ctrl_fh-Quoted 1 line
reference_frame_ts[ref_idx]);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+ frame->order_hints[i] =0 ; + frame->ref_frame_valid[i] =0 ; +continue ; + } + + frame->frame_refs[i].ref_fb_idx = slot_id; + vdec_av1_slice_setup_scale_factors(&frame-Quoted 1 line
frame_refs[i],
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+ frame_info, uh); +if (!seq->enable_order_hint) + frame->ref_frame_sign_bias[i +1 ] =0 ; +else + frame->ref_frame_sign_bias[i +1 ] = + vdec_av1_slice_get_relative_dist(frame_
info->order_hint,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ uh-Quoted 1 line
order_hint,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ seq-Quoted 1 line
enable_order_hint,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ seq-Quoted 1 line
order_hint_bits)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 1 line
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ <= 0 ? 0 : 1;... to get rid of this tri-argument operator altogether?
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 13 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+ + frame->order_hints[i] = ctrl_fh->order_hints[i +1 ]; + cur_frame_info->order_hints[i] = frame->order_hints[i]; + frame->ref_frame_valid[i] =1 ; + } +} + +static void vdec_av1_slice_get_previous(struct vdec_av1_slice_vsi*vsi)
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+{ +struct vdec_av1_slice_frame *frame = &vsi->frame; + +if (frame->uh.primary_ref_frame ==7 )#define magic number 7?
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ frame->prev_fb_idx =AV1_INVALID_IDX ; + else + frame->prev_fb_idx = frame->frame_refs[frame-Quoted 1 line
uh.primary_ref_frame].ref_fb_idx;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+} + +static void vdec_av1_slice_setup_operating_mode(struct
vdec_av1_slice_instance*instance,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ struct
vdec_av1_slice_frame*frame)static inline void?
Quoted 24 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+{ + frame->large_scale_tile =0 ; +} + +static int vdec_av1_slice_setup_pfc(struct vdec_av1_slice_instance*instance,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +17
-0+ struct vdec_av1_slice_pfc *pfc) +{ +struct v4l2_ctrl_av1_frame *ctrl_fh; +struct v4l2_ctrl_av1_sequence *ctrl_seq; +struct vdec_av1_slice_vsi *vsi = &pfc->vsi; +int ret =0 ; + +/* frame header */ + ctrl_fh = (struct v4l2_ctrl_av1_frame *) +vdec_av1_get_ctrl_ptr (instance->ctx, +V4L2_CID_STATELESS_AV1_FRAME ); +if (IS_ERR (ctrl_fh)) +return PTR_ERR (ctrl_fh); + + ctrl_seq = (struct v4l2_ctrl_av1_sequence *) +vdec_av1_get_ctrl_ptr (instance->ctx, + V4L2_CID_STATELESS_AV1_SEQUENCE);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 2 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+if (IS_ERR (ctrl_seq)) +return PTR_ERR (ctrl_seq);Just to make sure: I assume request api is used? If so, does vdec's framework
ensure thatv4l2_ctrl_request_setup()has been called? It influences what's
actually inctrl->p_cur.p(current or previous value), and thevdec_av1_get_ctrl_ptr()wrapper returnsctrl->p_cur.p.Quoted 82 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +18
-0+ +/* setup vsi information */ +vdec_av1_slice_setup_seq (&vsi->frame.seq, ctrl_seq); +vdec_av1_slice_setup_uh (instance, &vsi->frame, ctrl_fh); +vdec_av1_slice_setup_operating_mode (instance, &vsi->frame); + +vdec_av1_slice_setup_state (vsi); +vdec_av1_slice_setup_slot (instance, vsi, ctrl_fh); +vdec_av1_slice_setup_ref (pfc, ctrl_fh); +vdec_av1_slice_get_previous (vsi); + + pfc->seq = instance->seq; + instance->seq++; + +return ret; +} + +static void vdec_av1_slice_setup_lat_buffer(struct
vdec_av1_slice_instance*instance,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+struct vdec_av1_slice_vsi *vsi,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+struct mtk_vcodec_mem *bs, + struct vdec_lat_buf
*lat_buf)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +12
-0+{ +struct vdec_av1_slice_work_buffer *work_buffer; +int i; + + vsi->bs.dma_addr = bs->dma_addr; + vsi->bs.size = bs->size; + + vsi->ube.dma_addr = lat_buf->ctx->msg_queue.wdma_addr.dma_addr; + vsi->ube.size = lat_buf->ctx->msg_queue.wdma_addr.size; + vsi->trans.dma_addr = lat_buf->ctx->msg_queue.wdma_wptr_addr; +/* used to store trans end */ + vsi->trans.dma_addr_end = lat_buf->ctx-Quoted 1 line
msg_queue.wdma_rptr_addr;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +14
-0+ vsi->err_map.dma_addr = lat_buf->wdma_err_addr.dma_addr; + vsi->err_map.size = lat_buf->wdma_err_addr.size; + vsi->rd_mv.dma_addr = lat_buf->rd_mv_addr.dma_addr; + vsi->rd_mv.size = lat_buf->rd_mv_addr.size; + + vsi->row_info.buf =0 ; + vsi->row_info.size =0 ; + + work_buffer = vsi->work_buffer; + +for (i =0 ; i <AV1_MAX_FRAME_BUF_COUNT ; i++) { + work_buffer[i].mv_addr.buf = instance->mv[i].dma_addr; + work_buffer[i].mv_addr.size = instance->mv[i].size; + work_buffer[i].segid_addr.buf = instance-Quoted 1 line
seg[i].dma_addr;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ work_buffer[i].segid_addr.size = instance->seg[i].size; + work_buffer[i].cdf_addr.buf = instance-Quoted 1 line
cdf[i].dma_addr;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+ work_buffer[i].cdf_addr.size = instance->cdf[i].size; + } + + vsi->cdf_tmp.buf = instance->cdf_temp.dma_addr; + vsi->cdf_tmp.size = instance->cdf_temp.size; + + vsi->tile.buf = instance->tile.dma_addr; + vsi->tile.size = instance->tile.size; + memcpy(lat_buf->tile_addr.va, instance->tile.va, 64 * instance-Quoted 1 line
tile_group.num_tiles);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+ + vsi->cdf_table.buf = instance->cdf_table.dma_addr; + vsi->cdf_table.size = instance->cdf_table.size; + vsi->iq_table.buf = instance->iq_table.dma_addr; + vsi->iq_table.size = instance->iq_table.size; +} + +static void vdec_av1_slice_setup_seg_buffer(struct
vdec_av1_slice_instance*instance,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+struct vdec_av1_slice_vsi *vsi)
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+{ + struct vdec_av1_slice_uncompressed_header *uh = &vsi->frame.uh; + struct mtk_vcodec_mem *buf; + + /* reset segment buffer */ + if (uh->primary_ref_frame == 7 || !uh-Quoted 1 line
Quoted 1 line
seg.segmentation_enabled) {
#define magic 7?
Quoted 245 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ mtk_vcodec_debug(instance, "reset seg %d\n", vsi-Quoted 1 line
slot_id);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+if (vsi->slot_id !=AV1_INVALID_IDX ) { + buf = &instance->seg[vsi->slot_id]; +memset (buf->va,0 , buf->size); + } + } +} + +static void vdec_av1_slice_setup_tile_buffer(struct
vdec_av1_slice_instance*instance,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+struct vdec_av1_slice_vsi *vsi,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ struct mtk_vcodec_mem *bs) +{ + struct vdec_av1_slice_tile_group *tile_group = &instance-Quoted 1 line
tile_group;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +14
-0+struct vdec_av1_slice_uncompressed_header *uh = &vsi->frame.uh; +struct vdec_av1_slice_tile *tile = &uh->tile; +u32 tile_num, tile_row, tile_col; +u32 allow_update_cdf =0 ; +u32 sb_boundary_x_m1 =0 , sb_boundary_y_m1 =0 ; +int tile_info_base; +u32 tile_buf_pa; +u32 *tile_info_buf = instance->tile.va; +u32 pa = (u32 )bs->dma_addr; + +if (uh->disable_cdf_update ==0 ) + allow_update_cdf =1 ; + + for (tile_num = 0; tile_num < tile_group->num_tiles;tile_num++) {
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+/* each uint32 takes place of 4 bytes */ + tile_info_base = (AV1_TILE_BUF_SIZE * tile_num) >>2 ; + tile_row = tile_num / tile->tile_cols; + tile_col = tile_num % tile->tile_cols; + tile_info_buf[tile_info_base + 0] = (tile_group-Quoted 1 line
tile_size[tile_num] << 3);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ tile_buf_pa = pa + tile_group-Quoted 1 line
tile_start_offset[tile_num];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ + tile_info_buf[tile_info_base +1 ] = (tile_buf_pa >>4 )<< 4;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ tile_info_buf[tile_info_base +2 ] = (tile_buf_pa %16 )<< 3;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ + sb_boundary_x_m1 = + (tile->mi_col_starts[tile_col + 1] - tile-Quoted 1 line
mi_col_starts[tile_col] - 1) &
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+0x3f ; + sb_boundary_y_m1 = + (tile->mi_row_starts[tile_row + 1] - tile-Quoted 1 line
mi_row_starts[tile_row] - 1) &
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+0x1ff ; + + tile_info_buf[tile_info_base + 3] = (sb_boundary_y_m1<< 7) |
sb_boundary_x_m1;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ tile_info_buf[tile_info_base + 4] = ((allow_update_cdf<< 18) | (1 << 16));
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+ +if (tile_num == tile->context_update_tile_id && + uh->disable_frame_end_update_cdf ==0 ) + tile_info_buf[tile_info_base +4 ] |= (1 <<17 ); + + mtk_vcodec_debug(instance, "// tile buf %d pos(%dx%d)offset 0x%x\n",
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ tile_num, tile_row, tile_col,
tile_info_base);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +14
-0+mtk_vcodec_debug (instance,"// %08x %08x %08x %08x\n" , + tile_info_buf[tile_info_base +0 ], + tile_info_buf[tile_info_base +1 ], + tile_info_buf[tile_info_base +2 ], + tile_info_buf[tile_info_base +3 ]); +mtk_vcodec_debug (instance,"// %08x %08x %08x %08x\n" , + tile_info_buf[tile_info_base +4 ], + tile_info_buf[tile_info_base +5 ], + tile_info_buf[tile_info_base +6 ], + tile_info_buf[tile_info_base +7 ]); + } +} + +static int vdec_av1_slice_setup_lat(struct vdec_av1_slice_instance*instance,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+struct mtk_vcodec_mem *bs, + struct vdec_lat_buf *lat_buf, + struct vdec_av1_slice_pfc *pfc) +{ + struct vdec_av1_slice_vsi *vsi = &pfc->vsi; +int ret; + + ret = vdec_av1_slice_setup_lat_from_src_buf(instance, vsi,
lat_buf);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +23
-0+if (ret) +return ret; + + ret =vdec_av1_slice_setup_pfc (instance, pfc); +if (ret) +return ret; + + ret =vdec_av1_slice_setup_tile_group (instance, vsi); +if (ret) +return ret; + + ret =vdec_av1_slice_alloc_working_buffer (instance, vsi); +if (ret) +return ret; + +vdec_av1_slice_setup_seg_buffer (instance, vsi); +vdec_av1_slice_setup_tile_buffer (instance, vsi, bs); +vdec_av1_slice_setup_lat_buffer (instance, vsi, bs, lat_buf); + +return 0 ; +} + +static int vdec_av1_slice_update_lat(struct
vdec_av1_slice_instance*instance,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+struct vdec_lat_buf *lat_buf, + struct vdec_av1_slice_pfc *pfc) +{ + struct vdec_av1_slice_vsi *vsi; + + vsi = &pfc->vsi; + mtk_vcodec_debug(instance, "frame %u LAT CRC 0x%08x, outputsize is %d\n",
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ pfc->seq, vsi->state.crc[0], vsi-Quoted 1 line
state.out_size);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+ +/* buffer full, need to re-decode */ +if (vsi->state.full) { +/* buffer not enough */ + if (vsi->trans.dma_addr_end - vsi->trans.dma_addr ==
vsi->ube.size)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +12
-0+return -ENOMEM ; +return -EAGAIN ; + } + + instance->width = vsi->frame.uh.upscaled_width; + instance->height = vsi->frame.uh.frame_height; + instance->frame_type = vsi->frame.uh.frame_type; + +return 0 ; +} + +static int vdec_av1_slice_setup_core_to_dst_buf(struct
vdec_av1_slice_instance*instance,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+struct vdec_lat_buf
*lat_buf)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +13
-0+{ +struct vb2_v4l2_buffer *dst; + + dst =v4l2_m2m_next_dst_buf (instance->ctx->m2m_ctx); +if (!dst) +return -EINVAL ; + +v4l2_m2m_buf_copy_metadata (&lat_buf->ts_info, dst, true); + +return 0 ; +} + +static int vdec_av1_slice_setup_core_buffer(struct
vdec_av1_slice_instance*instance,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+struct vdec_av1_slice_pfc *pfc,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+struct vdec_av1_slice_vsi *vsi,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+struct vdec_fb *fb, + struct vdec_lat_buf
*lat_buf)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+{ +struct vb2_buffer *vb; +struct vb2_queue *vq; +int w, h, plane, size; +int i; + + plane = instance->ctx->q_data[MTK_Q_DATA_DST ].fmt->num_planes; + w = vsi->frame.uh.upscaled_width; + h = vsi->frame.uh.frame_height; + size = ALIGN(w, VCODEC_DEC_ALIGNED_64) * ALIGN(h,
VCODEC_DEC_ALIGNED_64);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+ +/* frame buffer */ + vsi->fb.y.dma_addr = fb->base_y.dma_addr; +if (plane ==1 ) + vsi->fb.c.dma_addr = fb->base_y.dma_addr + size; +else + vsi->fb.c.dma_addr = fb->base_c.dma_addr; + +/* reference buffers */ + vq = v4l2_m2m_get_vq(instance->ctx->m2m_ctx,
V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +19
-0+if (!vq) +return -EINVAL ; + +/* get current output buffer */ + vb = &v4l2_m2m_next_dst_buf (instance->ctx->m2m_ctx)->vb2_buf; +if (!vb) +return -EINVAL ; + +/* get buffer address from vb2buf */ +for (i =0 ; i <V4L2_AV1_REFS_PER_FRAME ; i++) { +struct vdec_av1_slice_fb *vref = &vsi->ref[i]; + + vb =vb2_find_buffer (vq, pfc->ref_idx[i]); +if (!vb) { +memset (vref,0 ,sizeof (*vref)); +continue ; + } + + vref->y.dma_addr = vb2_dma_contig_plane_dma_addr(vb,0);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+if (plane ==1 ) + vref->c.dma_addr = vref->y.dma_addr + size; +else + vref->c.dma_addr =
vb2_dma_contig_plane_dma_addr(vb, 1);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+ } + vsi->tile.dma_addr = lat_buf->tile_addr.dma_addr; + vsi->tile.size = lat_buf->tile_addr.size; + +return 0 ; +} + +static int vdec_av1_slice_setup_core(struct
vdec_av1_slice_instance*instance,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +12
-0+struct vdec_fb *fb, + struct vdec_lat_buf *lat_buf, + struct vdec_av1_slice_pfc *pfc) +{ + struct vdec_av1_slice_vsi *vsi = &pfc->vsi; +int ret; + + ret =vdec_av1_slice_setup_core_to_dst_buf (instance, lat_buf); +if (ret) +return ret; + + ret = vdec_av1_slice_setup_core_buffer(instance, pfc, vsi, fb,
lat_buf);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+if (ret) +return ret; + +return 0 ; +} + +static int vdec_av1_slice_update_core(struct
vdec_av1_slice_instance*instance,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 6 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+struct vdec_lat_buf *lat_buf, + struct vdec_av1_slice_pfc *pfc) +{ + struct vdec_av1_slice_vsi *vsi = instance->core_vsi; + +/* TODO: Do something here, or remove this function entirely */ And?
Quoted 61 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ + mtk_vcodec_debug(instance, "frame %u Y_CRC %08x %08x %08x%08x\n",
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ pfc->seq, vsi->state.crc[0], vsi-Quoted 1 line
state.crc[1],
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ vsi->state.crc[2], vsi->state.crc[3]); + mtk_vcodec_debug(instance, "frame %u C_CRC %08x %08x %08x%08x\n",
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ pfc->seq, vsi->state.crc[8], vsi-Quoted 1 line
state.crc[9],
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +24
-0+ vsi->state.crc[10], vsi->state.crc[11]); + +return 0 ; +} + +static int vdec_av1_slice_init (struct mtk_vcodec_ctx *ctx) +{ +struct vdec_av1_slice_instance *instance; +struct vdec_av1_slice_init_vsi *vsi; +int ret; + + instance =kzalloc (sizeof (*instance),GFP_KERNEL ); +if (!instance) +return -ENOMEM ; + + instance->ctx = ctx; + instance->vpu.id =SCP_IPI_VDEC_LAT ; + instance->vpu.core_id =SCP_IPI_VDEC_CORE ; + instance->vpu.ctx = ctx; + instance->vpu.codec_type = ctx->current_codec; + + ret =vpu_dec_init (&instance->vpu); +if (ret) { + mtk_vcodec_err(instance, "failed to init vpu dec, ret%d\n", ret);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +12
-0+ goto error_vpu_init; + } + +/* init vsi and global flags */ + vsi = instance->vpu.vsi; +if (!vsi) { +mtk_vcodec_err (instance,"failed to get AV1 vsi\n" ); + ret = -EINVAL ; + goto error_vsi; + } + instance->init_vsi = vsi; + instance->core_vsi = mtk_vcodec_fw_map_dm_addr(ctx->dev-Quoted 1 line
fw_handler, (u32)vsi->core_vsi);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ +if (!instance->core_vsi) { + mtk_vcodec_err(instance, "failed to get AV1 corevsi\n");
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+ ret = -EINVAL ; + goto error_vsi; + } + +if (vsi->vsi_size !=sizeof (struct vdec_av1_slice_vsi )) + mtk_vcodec_err(instance, "remote vsi size 0x%xmismatch! expected: 0x%lx\n",
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ vsi->vsi_size, sizeof(struct
vdec_av1_slice_vsi));drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 2 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ + instance->irq =1 ;Does this mean "
irq_enabled"? If so, rename?Quoted 13 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ instance->inneracing_mode = IS_VDEC_INNER_RACING(instance->ctx-Quoted 1 line
dev->dec_capability);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ + mtk_vcodec_debug(instance, "vsi 0x%p core_vsi 0x%llx 0x%p,
inneracing_mode%d\n",drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ vsi, vsi->core_vsi, instance->core_vsi,
instance->inneracing_mode);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+ + ret =vdec_av1_slice_init_cdf_table (instance); +if (ret) + goto error_vsi; + + ret =vdec_av1_slice_init_iq_table (instance);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+if (ret) + goto error_vsi; + + ctx->drv_handle = instance; + +return 0 ; +error_vsi: +vpu_dec_deinit (&instance->vpu); +error_vpu_init: +kfree (instance);newline?
Quoted 29 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +13
-0+return ret; +} + +static void vdec_av1_slice_deinit (void *h_vdec) +{ +struct vdec_av1_slice_instance *instance = h_vdec; + +if (!instance) +return ; +mtk_vcodec_debug (instance,"h_vdec 0x%p\n" , h_vdec); +vpu_dec_deinit (&instance->vpu); +vdec_av1_slice_free_working_buffer (instance); + vdec_msg_queue_deinit(&instance->ctx->msg_queue, instance-Quoted 1 line
ctx);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+kfree (instance); +} + +static int vdec_av1_slice_flush(void *h_vdec, struct
mtk_vcodec_mem*bs,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+ struct vdec_fb *fb, bool *res_chg) +{ + struct vdec_av1_slice_instance *instance = h_vdec; +int i; + +mtk_vcodec_debug (instance,"flush ...\n" ); + + for (i = 0; i < AV1_MAX_FRAME_BUF_COUNT; i++) + vdec_av1_slice_clear_fb(&instance-Quoted 1 line
slots.frame_info[i]);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 2 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ +vdec_msg_queue_wait_lat_buf_full (&instance->ctx->msg_queue);newline?
Quoted 26 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+return vpu_dec_reset (&instance->vpu); +} + +static void vdec_av1_slice_get_pic_info(struct
vdec_av1_slice_instance*instance)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+{ +struct mtk_vcodec_ctx *ctx = instance->ctx; +u32 data[3 ]; + + mtk_vcodec_debug(instance, "w %u h %u\n", ctx->picinfo.pic_w,
ctx->picinfo.pic_h);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+ + data[0 ] = ctx->picinfo.pic_w; + data[1 ] = ctx->picinfo.pic_h; + data[2 ] = ctx->capture_fourcc; +vpu_dec_get_param (&instance->vpu, data,3 ,GET_PARAM_PIC_INFO ); + + ctx->picinfo.buf_w = ALIGN(ctx->picinfo.pic_w,
VCODEC_DEC_ALIGNED_64);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ ctx->picinfo.buf_h = ALIGN(ctx->picinfo.pic_h,
VCODEC_DEC_ALIGNED_64);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+ ctx->picinfo.fb_sz[0 ] = instance->vpu.fb_sz[0 ]; + ctx->picinfo.fb_sz[1 ] = instance->vpu.fb_sz[1 ]; +} + +static void vdec_av1_slice_get_dpb_size(structQuoted 1 line
vdec_av1_slice_instance*instance, u32*dpb_sz)static inline void?
Quoted 75 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+{ +/* refer av1 specification */ + *dpb_sz =V4L2_AV1_TOTAL_REFS_PER_FRAME +1 ; +} + +static void vdec_av1_slice_get_crop_info(struct
vdec_av1_slice_instance*instance,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +14
-0+ struct v4l2_rect *cr) +{ +struct mtk_vcodec_ctx *ctx = instance->ctx; + + cr->left =0 ; + cr->top =0 ; + cr->width = ctx->picinfo.pic_w; + cr->height = ctx->picinfo.pic_h; + +mtk_vcodec_debug (instance,"l=%d, t=%d, w=%d, h=%d\n" , + cr->left, cr->top, cr->width, cr->height); +} + +static int vdec_av1_slice_get_param(void *h_vdec, enum
vdec_get_param_typetype, void *out)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +15
-0+{ +struct vdec_av1_slice_instance *instance = h_vdec; + +switch (type) { +case GET_PARAM_PIC_INFO : +vdec_av1_slice_get_pic_info (instance); +break ; +case GET_PARAM_DPB_SIZE : +vdec_av1_slice_get_dpb_size (instance, out); +break ; +case GET_PARAM_CROP_INFO : +vdec_av1_slice_get_crop_info (instance, out); +break ; +default : + mtk_vcodec_err(instance, "invalid get parametertype=%d\n", type);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+return -EINVAL ; + } + +return 0 ; +} + +static int vdec_av1_slice_lat_decode(void *h_vdec, struct
mtk_vcodec_mem*bs,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +16
-0+ struct vdec_fb *fb, bool *res_chg) +{ + struct vdec_av1_slice_instance *instance = h_vdec; +struct vdec_lat_buf *lat_buf; +struct vdec_av1_slice_pfc *pfc; +struct vdec_av1_slice_vsi *vsi; +struct mtk_vcodec_ctx *ctx; +int ret; + +if (!instance || !instance->ctx) +return -EINVAL ; + + ctx = instance->ctx; +/* init msgQ for the first time */ + if (vdec_msg_queue_init(&ctx->msg_queue, ctx, + vdec_av1_slice_core_decode,
sizeof(*pfc))) {drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+ mtk_vcodec_err(instance, "failed to init AV1 msgqueue\n");
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+return -ENOMEM ; + } + +/* bs NULL means flush decoder */ +if (!bs) +return vdec_av1_slice_flush (h_vdec, bs, fb, res_chg); + + lat_buf =vdec_msg_queue_dqbuf (&ctx->msg_queue.lat_ctx); +if (!lat_buf) { + mtk_vcodec_err(instance, "failed to get AV1 latQuoted 1 line
buf\n");
there exists
vdec_msg_queue_deinit(). Should it be called in this (and
subsequent) error recovery path(s)?Quoted 297 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +12
-0+return -EBUSY ; + } + pfc = (struct vdec_av1_slice_pfc *)lat_buf->private_data; +if (!pfc) { + ret = -EINVAL ; + goto err_free_fb_out; + } + vsi = &pfc->vsi; + + ret =vdec_av1_slice_setup_lat (instance, bs, lat_buf, pfc); +if (ret) { + mtk_vcodec_err(instance, "failed to setup AV1 lat ret%d\n", ret);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+ goto err_free_fb_out; + } + +vdec_av1_slice_vsi_to_remote (vsi, instance->vsi); + ret =vpu_dec_start (&instance->vpu,NULL ,0 ); +if (ret) { + mtk_vcodec_err(instance, "failed to dec AV1 ret %d\n",ret);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ goto err_free_fb_out; + } +if (instance->inneracing_mode) + vdec_msg_queue_qbuf(&ctx->dev->msg_queue_core_ctx,
lat_buf);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ +if (instance->irq) { + ret = mtk_vcodec_wait_for_done_ctx(ctx,
MTK_INST_IRQ_RECEIVED,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+WAIT_INTR_TIMEOUT_MS ,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ MTK_VDEC_LAT0); +/* update remote vsi if decode timeout */ +if (ret) { + mtk_vcodec_err(instance, "AV1 Frame %d decodetimeout %d\n",
pfc->seq, ret);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +11
-0+WRITE_ONCE (instance->vsi->state.timeout,1 ); + } +vpu_dec_end (&instance->vpu); + } + +vdec_av1_slice_vsi_from_remote (vsi, instance->vsi); + ret =vdec_av1_slice_update_lat (instance, lat_buf, pfc); + +/* LAT trans full, re-decode */ +if (ret == -EAGAIN ) { + mtk_vcodec_err(instance, "AV1 Frame %d trans full\n",
pfc->seq);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+if (!instance->inneracing_mode) + vdec_msg_queue_qbuf(&ctx->msg_queue.lat_ctx,
lat_buf);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+return 0 ; + } + +/* LAT trans full, no more UBE or decode timeout */ +if (ret == -ENOMEM || vsi->state.timeout) { + mtk_vcodec_err(instance, "AV1 Frame %d insufficientbuffer or timeout\n",
pfc->seq);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+if (!instance->inneracing_mode) + vdec_msg_queue_qbuf(&ctx->msg_queue.lat_ctx,
lat_buf);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+return -EBUSY ; + } + vsi->trans.dma_addr_end += ctx->msg_queue.wdma_addr.dma_addr; + mtk_vcodec_debug(instance, "lat dma 1 0x%llx 0x%llx\n", + pfc->vsi.trans.dma_addr, pfc-Quoted 1 line
vsi.trans.dma_addr_end);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ + vdec_msg_queue_update_ube_wptr(&ctx->msg_queue, vsi-Quoted 1 line
trans.dma_addr_end);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ +if (!instance->inneracing_mode) + vdec_msg_queue_qbuf(&ctx->dev->msg_queue_core_ctx,
lat_buf);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+memcpy (&instance->slots, &vsi->slots,sizeof (instance->slots)); + +return 0 ; + +err_free_fb_out: +vdec_msg_queue_qbuf (&ctx->msg_queue.lat_ctx, lat_buf); + mtk_vcodec_err(instance, "slice dec number: %d err: %d", pfc-Quoted 1 line
seq, ret);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+return ret; +} + +static int vdec_av1_slice_core_decode(struct vdec_lat_buf
*lat_buf)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +28
-0+{ +struct vdec_av1_slice_instance *instance; +struct vdec_av1_slice_pfc *pfc; +struct mtk_vcodec_ctx *ctx =NULL ; +struct vdec_fb *fb =NULL ; +int ret = -EINVAL ; + +if (!lat_buf) +return -EINVAL ; + + pfc = lat_buf->private_data; + ctx = lat_buf->ctx; +if (!pfc || !ctx) +return -EINVAL ; + + instance = ctx->drv_handle; +if (!instance) + goto err; + + fb = ctx->dev->vdec_pdata->get_cap_buffer (ctx); +if (!fb) { + ret = -EBUSY ; + goto err; + } + + ret =vdec_av1_slice_setup_core (instance, fb, lat_buf, pfc); +if (ret) { + mtk_vcodec_err(instance,"vdec_av1_slice_setup_core\n");
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +11
-0+ goto err; + } +vdec_av1_slice_vsi_to_remote (&pfc->vsi, instance->core_vsi); + ret =vpu_dec_core (&instance->vpu); +if (ret) { +mtk_vcodec_err (instance,"vpu_dec_core\n" ); + goto err; + } + +if (instance->irq) { + ret = mtk_vcodec_wait_for_done_ctx(ctx,
MTK_INST_IRQ_RECEIVED,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+WAIT_INTR_TIMEOUT_MS ,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ MTK_VDEC_CORE); +/* update remote vsi if decode timeout */ +if (ret) { + mtk_vcodec_err(instance, "AV1 frame %d coretimeout\n",
pfc->seq);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+WRITE_ONCE (instance->vsi->state.timeout,1 ); + } +vpu_dec_core_end (&instance->vpu); + } + + ret =vdec_av1_slice_update_core (instance, lat_buf, pfc); +if (ret) { + mtk_vcodec_err(instance,"vdec_av1_slice_update_core\n");
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+ goto err; + } + +mtk_vcodec_debug (instance,"core dma_addr_end 0x%llx\n" , + instance->core_vsi->trans.dma_addr_end); + vdec_msg_queue_update_ube_rptr(&ctx->msg_queue, instance-Quoted 1 line
core_vsi->trans.dma_addr_end);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ + ctx->dev->vdec_pdata->cap_to_disp(ctx, 0, lat_buf-Quoted 1 line
src_buf_req);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+ +return 0 ; + +err: +/* always update read pointer */ + vdec_msg_queue_update_ube_rptr(&ctx->msg_queue, pfc-Quoted 1 line
vsi.trans.dma_addr_end);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ +if (fb) + ctx->dev->vdec_pdata->cap_to_disp(ctx, 1, lat_buf-Quoted 1 line
src_buf_req);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+ +return ret; +} + +const struct vdec_common_if vdec_av1_slice_lat_if = { + .init = vdec_av1_slice_init, + .decode = vdec_av1_slice_lat_decode, + .get_param = vdec_av1_slice_get_param, + .deinit = vdec_av1_slice_deinit, +};drivers/media/platform/mediatek/vcodec/vdec_drv_if.c +4
-0@@ -49,6 +49,10 @@ int vdec_if_init(struct mtk_vcodec_ctx *ctx, unsigned int fourcc) ctx->dec_if = &vdec_vp9_slice_lat_if; ctx->hw_id =IS_VDEC_LAT_ARCH (hw_arch) ?MTK_VDEC_LAT0 :MTK_VDEC_CORE ;break ; +case V4L2_PIX_FMT_AV1_FRAME : + ctx->dec_if = &vdec_av1_slice_lat_if; + ctx->hw_id =MTK_VDEC_LAT0 ; +break ;default :return -EINVAL; }drivers/media/platform/mediatek/vcodec/vdec_drv_if.h +1
-0@@ -61,6 +61,7 @@ extern const struct vdec_common_if vdec_vp8_if;extern const struct vdec_common_if vdec_vp8_slice_if;extern const struct vdec_common_if vdec_vp9_if;extern const struct vdec_common_if vdec_vp9_slice_lat_if; +extern const struct vdec_common_if vdec_av1_slice_lat_if;/** * vdec_if_init() - initialize decode driver diff --git
a/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.cb/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.cindexae500980ad45c..05b54b0e3f2d2100644drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c +3
-0@@ -20,6 +20,9 @@/* the size used to store avc error information */ #define VDEC_ERR_MAP_SZ_AVC (17 * SZ_1K) +#define VDEC_RD_MV_BUFFER_SZ (((SZ_4K * 2304 >> 4) + SZ_1K) << 1) +#define VDEC_LAT_TILE_SZ (64 * SZ_4K) +/* core will read the trans buffer which decoded by lat to decode again.
* The trans buffer size of FHD and 4K bitstreams are different. */drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c +8
-0@@ -194,6 +197,14 @@ void vdec_msg_queue_deinit(struct vdec_msg_queue *msg_queue, if (mem->va)mtk_vcodec_mem_free (ctx, mem); + mem = &lat_buf->rd_mv_addr; +if (mem->va) +mtk_vcodec_mem_free (ctx, mem); + + mem = &lat_buf->tile_addr; +if (mem->va) +mtk_vcodec_mem_free (ctx, mem); +kfree (lat_buf->private_data); }}drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c +5
-0@@ -270,6 +281,22 @@ int vdec_msg_queue_init(struct vdec_msg_queue *msg_queue, goto mem_alloc_err; } +if (ctx->current_codec ==V4L2_PIX_FMT_AV1_FRAME ) { + lat_buf->rd_mv_addr.size =VDEC_RD_MV_BUFFER_SZ ; + err =mtk_vcodec_mem_alloc (ctx, &lat_buf- >rd_mv_addr); +if (err) { + mtk_v4l2_err("failed to allocate
rd_mv_addrbuf[%d]", i);drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c +5
-0+return -ENOMEM ; + } + + lat_buf->tile_addr.size =VDEC_LAT_TILE_SZ ; + err = mtk_vcodec_mem_alloc(ctx, &lat_buf-Quoted 1 line
tile_addr);drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c +2
-0+if (err) { + mtk_v4l2_err("failed to allocate
tile_addrbuf[%d]", i);drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c +4
-0+return -ENOMEM ; + } + } + lat_buf->private_data = kzalloc(private_size,
GFP_KERNEL);
if (!lat_buf->private_data) {
err =-ENOMEM;
diff --gita/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.hb/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.hindexc43d427f5f544..525170e411ee0100644drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h +0
-0@@ -42,6 +42,8 @@ struct vdec_msg_queue_ctx {* struct vdec_lat_buf - lat buffer message used to store lat info for core decode
* @wdma_err_addr: wdma error address used for lat hardware
* @slice_bc_addr: slice bc address used for lat hardware
+ * @rd_mv_addr: mv addr for av1 lat hardware output, core
hardware input
+ * @tile_addr: tile buffer for av1 core input
* @ts_info: need to set timestamp from output to capture
* @src_buf_req: output buffer media request object *drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h +2
-0@@ -54,6 +56,8 @@ struct vdec_msg_queue_ctx {struct vdec_lat_buf {struct mtk_vcodec_mem wdma_err_addr;struct mtk_vcodec_mem slice_bc_addr; +struct mtk_vcodec_mem rd_mv_addr; +struct mtk_vcodec_mem tile_addr;struct vb2_v4l2_buffer ts_info;struct media_request *src_buf_req;
Hi,
W dniu 29.11.2022 o 12:50, Xiaoyong Lu (卢小勇) pisze:
Quoted 18 lines
Hi Andrzej,
Thanks for your comments, I have fixed all except for some items which need more discussion with you.
1.
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1023
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +10
-0+for (i =0 ; i <AV1_MAX_FRAME_BUF_COUNT ; i++) { +if (instance->cdf[i].va) +mtk_vcodec_mem_free (ctx, &instance->cdf[i]); + instance->cdf[i].size = size; + ret =mtk_vcodec_mem_alloc (ctx, &instance->cdf[i]); +if (ret) + goto err; + work_buffer[i].cdf_addr.buf = instance->cdf[i].dma_addr; + work_buffer[i].cdf_addr.size = size; + }
Quoted 6 lines
The 3 for loops are supposed to iterate from 0 to
AV1_MAX_FRAME_BUF_COUNT- 1,
inclusive. Is it possible to merge them?-->can you help to explain more clearly, and what does "3" stand for?
In vdec_av1_slice_alloc_working_buffer() there are 3 similar "for" loops which (are supposed to) iterate the same number of times.
I was wondering if was possible to collapse them into one loop.
Quoted 19 lines
2.
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1043
Quoted 7 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +7
-0+ + ret =mtk_vcodec_mem_alloc (ctx, &instance->tile); +if (ret) + goto err; + + vsi->tile.buf = instance->tile.dma_addr; + vsi->tile.size = size;
vsi->tile.size=instance->tile.size;and now it is clear the size in vsi is the same as the one in instance. BTW, is
vsi->tile.sizesupposed to always be equal to the one in instance?
If yes:
- Is instance available whenever we need to accessvsi->tile.size?
- What's the point of duplicating this value? Can it be stored in one
place?
Quoted 3 lines
-->
vsi->tile.sizeis always equal toinstance->tile.size, but they should not be stored in one place. because vsi will be used for micro- processor,and instance is only used in kernel side.
Makes sense.
Quoted 6 lines
Also I can remove following two statements.
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1043
Quoted 2 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +2
-0+ vsi->tile.buf = instance->tile.dma_addr; + vsi->tile.size = size;because it will re-assign values for each frame before entering to micro-processor in
vdec_av1_slice_setup_lat_buffer.
the fewer lines to review and compile, the better :)
Quoted 13 lines
3.
Quoted 1 line
+static void vdec_av1_slice_free_working_buffer(struct
vdec_av1_slice_instance*instance)drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1060
Quoted 7 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +7
-0+{ +struct mtk_vcodec_ctx *ctx = instance->ctx; +int i; + +for (i =0 ; i <ARRAY_SIZE (instance->mv); i++) +if (instance->mv[i].va) +mtk_vcodec_mem_free (ctx, &instance->mv[i]);Perhaps
mtk_vcodec_mem_free()can properly handle the case
Quoted 6 lines
(!instance->mv[i].va) ? This would eliminate 7 of 20 lines of code in this function.
--> I think it will be better to add this , because
1.ifmtk_vcodec_mem_freeis changed by someone later and donnot do va null check, it will ensure safely in caller.
There's no stable internal api in the kernel. Whoever changes internal api, they are responsible to make sure eiter its users are unaffected, or to change all users accordingly. And you can't think of all possible crazy ways people might want to change the code 5 or 10 or 20 years from now. In other words, trying to prevent a situation that does not exist in exchange for more lines of code seems not a good deal.
Quoted 9 lines
2.If I donnot do va null check, there will print an error log in
mtk_vcodec_mem_freewhen va is null. But it may be normal behivor.if (!mem->va) { mtk_v4l2_err("%s dma_free size=%ld failed!", dev_name(dev), size); return; }what about your opinion?
What I meant by "properly handling the NULL case" was to be prepared to handle the NULL case in mtk_vcodec_mem_free(), that is to assume that NULL can as well be passed to it. Given NULL is allowed, there's no point in announcing that "we've been passed a NULL". That's how kfree() behaves, for example.
Quoted 20 lines
4.
+static void vdec_av1_slice_setup_gm(struct
vdec_av1_slice_gm*gm,drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1174
Quoted 7 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +7
-0+ struct v4l2_av1_global_motion *ctrl_gm) +{ +u32 i, j; + +for (i =0 ; i <V4L2_AV1_TOTAL_REFS_PER_FRAME ; i++) { + gm[i].wmtype = ctrl_gm->type[i]; +for (j =0 ; j <6 ; j++)Maybe #define this magic 6?
--> I see uapi driver use magic number 6 too, which is in
struct v4l2_av1_global_motion { __u8 flags[V4L2_AV1_TOTAL_REFS_PER_FRAME]; enum v4l2_av1_warp_model type[V4L2_AV1_TOTAL_REFS_PER_FRAME]; __u32 params[V4L2_AV1_TOTAL_REFS_PER_FRAME][6]; __u8 invalid; };
Quoted 5 lines
From av1 official document in 5.9.24 Global motion params syntax
section, it also use magic number 6.so i think it will not need to change this.
fair enough
Quoted 43 lines
5.
static void vdec_av1_slice_setup_quant(structvdec_av1_slice_quantization*quant,drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1217
Quoted 11 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +11
-0+ struct v4l2_av1_quantization *ctrl_quant) +{ + quant->base_q_idx = ctrl_quant->base_q_idx; + quant->delta_qydc = ctrl_quant->delta_q_y_dc; + quant->delta_qudc = ctrl_quant->delta_q_u_dc; + quant->delta_quac = ctrl_quant->delta_q_u_ac; + quant->delta_qvdc = ctrl_quant->delta_q_v_dc; + quant->delta_qvac = ctrl_quant->delta_q_v_ac; + quant->qm_y = ctrl_quant->qm_y; + quant->qm_u = ctrl_quant->qm_u; + quant->qm_v = ctrl_quant->qm_v;Can a common struct be introduced to hold these parameters? And then copied in one go?
Maybe there's a good reason the code is the way it is now. However, a series of "dumb" assignments (no value modifications) makes me wonder.
+ cdef->cdef_y_strength[i] =
Quoted 1 line
+ ctrl_cdef->y_pri_strength[i] <<
SECONDARY_FILTER_STRENGTH_NUM_BITS|drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c
Quoted 3 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +3
-0+ ctrl_cdef->y_sec_strength[i]; + cdef->cdef_uv_strength[i] = + ctrl_cdef->uv_pri_strength[i] <<
SECONDARY_FILTER_STRENGTH_NUM_BITS|drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1297
Quoted 3 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +3
-0+ ctrl_cdef->uv_sec_strength[i]; + } +}Both
vdec_av1_slice_setup_lf()andvdec_av1_slice_setup_cdef():I'm wondering if the user of struct
vdec_av1_slice_loop_filterand structvdec_av1_slice_cdefcould work with the uAPI variants of these structs? Is there
a need for driver-specific mutations? (Maybe there is, the driver's author
should know).
Quoted 6 lines
-->1.There is a mediatek map structure in kernel part which also has the same structure in micro-processor.
2.Uapi v4l2 structure will not access in micro-processor, and mediatek driver structure may not be all the same with v4l2.so these will not need to change.
You know your hardware. If you say so, you must be right.
Quoted 13 lines
6.
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 2082
Quoted 7 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +7
-0+/* bs NULL means flush decoder */ +if (!bs) +return vdec_av1_slice_flush (h_vdec, bs, fb, res_chg); + + lat_buf =vdec_msg_queue_dqbuf (&ctx->msg_queue.lat_ctx); +if (!lat_buf) { +mtk_vcodec_err (instance,"failed to get AV1 lat buf\n" );there exists
vdec_msg_queue_deinit(). Should it be called in this (and subsequent) error recovery path(s)?
Quoted 7 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ return -EBUSY; + }-->vdec_msg_queue_deinit is called when do deinit operation before stop streaming.
But here is just error handle for current frame, so it shouldnot callvdec_msg_queue_deinithere.
This is confusing. It would be better if vdec_msg_queue_deinit() were called from another place, not from the function which is called per-frame. The "mirror location" for "before stop streaming" seems "after start streaming", but I don't know.
Quoted 9 lines
7.
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1107
Quoted 6 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +6
-0+ src =v4l2_m2m_next_src_buf (instance->ctx->m2m_ctx); +if (!src) +return -EINVAL ; + + lat_buf->src_buf_req = src->vb2_buf.req_obj.req; + dst = &lat_buf->ts_info;
Quoted 6 lines
the "
ts_info" actually contains a structvb2_v4l2_buffer. Why such a name?-->"ts_info" is not named by me, and i just use it here, so i will not rename it.
fair enough
Quoted 3 lines
I ask the owner why it is named with
ts_infoand the answer is:
"This parame is used to store timestamp releated information from output queue to capture queue."
So you reached out to the author of the "ts_info" name. I haven't seen you asking here (maybe I haven't noticed?). It is better to ask such a question in the mailing list rather than in a private message.
Quoted 22 lines
8.
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c line 1599
Quoted 12 lines
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.c new file +12
-0+/* frame header */ + ctrl_fh = (struct v4l2_ctrl_av1_frame *) +vdec_av1_get_ctrl_ptr (instance->ctx, +V4L2_CID_STATELESS_AV1_FRAME ); +if (IS_ERR (ctrl_fh)) +return PTR_ERR (ctrl_fh); + + ctrl_seq = (struct v4l2_ctrl_av1_sequence *) +vdec_av1_get_ctrl_ptr (instance->ctx, +V4L2_CID_STATELESS_AV1_SEQUENCE ); +if (IS_ERR (ctrl_seq)) +return PTR_ERR (ctrl_seq);Just to make sure: I assume request api is used? If so, does vdec's framework
ensure thatv4l2_ctrl_request_setup()has been called? It influences what's
actually inctrl->p_cur.p(current or previous value), and thevdec_av1_get_ctrl_ptr()wrapper returnsctrl->p_cur.p.
Quoted 3 lines
-->v4l2_ctrl_request_setup() is called in
mtk_vdec_workerwhich is before this function.
great
Quoted 4 lines
Thanks
Best Regards
xiaoyong Lu
Please avoid top-posting. It is easier for your reviewer to read your answers inline. And, actually, it is easier for you not having to find the relevant fragments, copy and then paste on top. Instead, try answering just below reviewer's comments.
Also, when communicating on the mailing list eliminate the footer which makes the readers wonder if they are allowed to read your messages.
Regards,
Andrzej
Quoted 3,132 lines · Andrzej Pietrasiewicz
Quoted 3,105 lines
Hi Xiaoyong Lu,
Sorry about chiming in only at v6. Please see inline below.
Andrzej
W dniu 17.11.2022 o 07:17, Xiaoyong Lu pisze:
Quoted 1,061 lines
Add mediatek av1 decoder linux driver which use the stateless API in
MT8195.Signed-off-by Xiaoyong Lu<[email protected]>---
Changes from v5:- change av1 PROFILE and LEVEL cfg
- test by av1 fluster, result is 173/239Changes from v4:
- convert
vb2_find_timestamptovb2_find_buffer
- test by av1 fluster, result is 173/239Changes from v3:
- modify comment for struct
vdec_av1_slice_slot
- add defineSEG_LVL_ALT_Q
- change use_lr/use_chroma_lr parse from av1 spec
- useARRAY_SIZEto replace size forloop_filter_levelandloop_filter_mode_deltas
- change array size ofloop_filter_mode_deltasfrom 4 to 2
- add defineSECONDARY_FILTER_STRENGTH_NUM_BITS
- change some hex values from upper case to lower case
- change*dpb_szequal toV4L2_AV1_TOTAL_REFS_PER_FRAME+ 1
- test by av1 fluster, result is 173/239Changes from v2:
- Match with av1 uapi v3 modify
- test by av1 fluster, result is 173/239---
Reference series:
[1]: v3 of this series is presend by Daniel Almeida.
message-id:
[email protected].../media/platform/mediatek/vcodec/Makefile | 1 + .../vcodec/mtk_vcodec_dec_stateless.c | 47 +- .../platform/mediatek/vcodec/mtk_vcodec_drv.h | 1 + .../vcodec/vdec/vdec_av1_req_lat_if.c | 2234 +++++++++++++++++ .../platform/mediatek/vcodec/vdec_drv_if.c | 4 + .../platform/mediatek/vcodec/vdec_drv_if.h | 1 + .../platform/mediatek/vcodec/vdec_msg_queue.c | 27 + .../platform/mediatek/vcodec/vdec_msg_queue.h | 4 + 8 files changed, 2318 insertions(+), 1 deletion(-)create mode 100644
drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.cdrivers/media/platform/mediatek/vcodec/Makefile +1
-0@@ -10,6 +10,7 @@ mtk-vcodec-dec-y := vdec/vdec_h264_if.o \ vdec/vdec_vp8_req_if.o \ vdec/vdec_vp9_if.o \ vdec/vdec_vp9_req_lat_if.o \ +vdec/vdec_av1_req_lat_if.o \ vdec/vdec_h264_req_if.o \ vdec/vdec_h264_req_common.o \ vdec/vdec_h264_req_multi_if.o \diff --git
a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.cb/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.cindexc45bd2599bb2d..ceb6fabc67749100644
---a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.c
+++b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.cdrivers/media/platform/mediatek/vcodec/Makefile +41
-1@@ -107,11 +107,51 @@ static const struct mtk_stateless_control mtk_stateless_controls[] = { }, .codec_type = V4L2_PIX_FMT_VP9_FRAME, }, +{ +.cfg = { +.id = V4L2_CID_STATELESS_AV1_SEQUENCE, + +}, +.codec_type = V4L2_PIX_FMT_AV1_FRAME, +}, +{ +.cfg = { +.id = V4L2_CID_STATELESS_AV1_FRAME, + +}, +.codec_type = V4L2_PIX_FMT_AV1_FRAME, +}, +{ +.cfg = { +.id = V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY, +.dims = { V4L2_AV1_MAX_TILE_COUNT }, + +}, +.codec_type = V4L2_PIX_FMT_AV1_FRAME, +}, +{ +.cfg = { +.id = V4L2_CID_STATELESS_AV1_PROFILE, +.min = V4L2_STATELESS_AV1_PROFILE_MAIN, +.def = V4L2_STATELESS_AV1_PROFILE_MAIN, +.max = V4L2_STATELESS_AV1_PROFILE_MAIN, +}, +.codec_type = V4L2_PIX_FMT_AV1_FRAME, +}, +{ +.cfg = { +.id = V4L2_CID_STATELESS_AV1_LEVEL, +.min = V4L2_STATELESS_AV1_LEVEL_2_0, +.def = V4L2_STATELESS_AV1_LEVEL_4_0, +.max = V4L2_STATELESS_AV1_LEVEL_5_1, +}, +.codec_type = V4L2_PIX_FMT_AV1_FRAME, +}, }; #define NUM_CTRLS ARRAY_SIZE(mtk_stateless_controls) -static struct mtk_video_fmt mtk_video_formats[5]; +static struct mtk_video_fmt mtk_video_formats[6]; static struct mtk_video_fmt default_out_format;static struct
mtk_video_fmtdefault_cap_format;drivers/media/platform/mediatek/vcodec/Makefile +1
-0@@ -351,6 +391,7 @@ static void mtk_vcodec_add_formats(unsigned int fourcc, case V4L2_PIX_FMT_H264_SLICE: case V4L2_PIX_FMT_VP8_FRAME: case V4L2_PIX_FMT_VP9_FRAME: +case V4L2_PIX_FMT_AV1_FRAME: mtk_video_formats[count_formats].fourcc = fourcc; mtk_video_formats[count_formats].type = MTK_FMT_DEC;mtk_video_formats[count_formats].num_planes = 1;drivers/media/platform/mediatek/vcodec/Makefile +4
-0@@ -407,6 +448,10 @@ static void mtk_vcodec_get_supported_formats(struct mtk_vcodec_ctx *ctx) mtk_vcodec_add_formats(V4L2_PIX_FMT_VP9_FRAME, ctx); out_format_count++; } +if (ctx->dev->dec_capability & MTK_VDEC_FORMAT_AV1_FRAME) { +mtk_vcodec_add_formats(V4L2_PIX_FMT_AV1_FRAME, ctx); +out_format_count++; +} if (cap_format_count)
default_cap_format= mtk_video_formats[cap_format_count
- 1];
diff --gita/drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.hb/drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.hindex6a47a11ff654a..a6db972b1ff72100644drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0@@ -344,6 +344,7 @@ enum mtk_vdec_format_types {MTK_VDEC_FORMAT_H264_SLICE =0x100 ,MTK_VDEC_FORMAT_VP8_FRAME =0x200 ,MTK_VDEC_FORMAT_VP9_FRAME =0x400 , +MTK_VDEC_FORMAT_AV1_FRAME =0x800 , MTK_VCODEC_INNER_RACING = 0x20000, };diff --git
a/drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.cb/drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.cnew file mode 100644
index 0000000000000..2ac77175dad7c
---/dev/null
+++b/drivers/media/platform/mediatek/vcodec/vdec/vdec_av1_req_lat_if.cdrivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +18
-0@@ -0,0 +1,2234 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (c) 2022 MediaTek Inc. +* Author: Xiaoyong Lu <[email protected]> +*/ + +#include <linux/module.h> +#include <linux/slab.h> +#include <media/videobuf2-dma-contig.h> + +#include "../mtk_vcodec_util.h" +#include "../mtk_vcodec_dec.h" +#include "../mtk_vcodec_intr.h" +#include "../vdec_drv_base.h" +#include "../vdec_drv_if.h" +#include "../vdec_vpu_if.h" + +#define AV1_MAX_FRAME_BUF_COUNT(V4L2_AV1_TOTAL_REFS_PE
R_FRAME+ 1)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +16
-0+#define AV1_TILE_BUF_SIZE64 +#define AV1_SCALE_SUBPEL_BITS10 +#define AV1_REF_SCALE_SHIFT14 +#define AV1_REF_NO_SCALEBIT (AV1_REF_SCALE_SHIFT ) +#define AV1_REF_INVALID_SCALE -1 + +#define AV1_INVALID_IDX -1 + +#define AV1_DIV_ROUND_UP_POW2 (value, n)\ +({\ +typeof(n) _n = n;\ +typeof(value) _value = value;\ +(_value + (BIT(_n) >> 1)) >> _n;\ +}) + +#define AV1_DIV_ROUND_UP_POW2_SIGNED (value, n)\
+({
\drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+typeof (n) _n_ = n;\ +typeof (value) _value_ = value;\
+(((_value_) < 0) ? -AV1_DIV_ROUND_UP_POW2(-(_value_), (_n_)) \
+:AV1_DIV_ROUND_UP_POW2((_value_), (_n_)));\drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+}) + +#define BIT_FLAG (x, bit)(!!((x)->flags & (bit))) +#define SEGMENTATION_FLAG (x, name)(!!((x)->flags &V4L2_AV1_SEGMENTATION_FLAG_##name))
+#defineQUANT_FLAG(x, name)(!!((x)->flags &
V4L2_AV1_QUANTIZATION_FLAG_##name))
+#defineSEQUENCE_FLAG(x, name)(!!((x)->flags &
V4L2_AV1_SEQUENCE_FLAG_##name))
+#defineFH_FLAG(x, name)(!!((x)->flags &
V4L2_AV1_FRAME_FLAG_##name))drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +15
-0+ +#define MINQ 0 +#define MAXQ 255 + +#define DIV_LUT_PREC_BITS 14 +#define DIV_LUT_BITS 8 +#define DIV_LUT_NUM BIT(DIV_LUT_BITS) +#define WARP_PARAM_REDUCE_BITS 6 +#define WARPEDMODEL_PREC_BITS 16 + +#define SEG_LVL_ALT_Q 0 +#define SECONDARY_FILTER_STRENGTH_NUM_BITS 2 + +static const short div_lut[DIV_LUT_NUM +1 ] = { +16384 ,16320 ,16257 ,16194 ,16132 ,16070 ,16009 ,15948 ,15888 ,15828, 15768,
+15709, 15650, 15592, 15534, 15477, 15420, 15364, 15308, 15252, 15197, 15142,
+15087, 15033, 14980, 14926, 14873, 14821, 14769, 14717, 14665, 14614, 14564,
+14513, 14463, 14413, 14364, 14315, 14266, 14218, 14170, 14122, 14075, 14028,
+13981, 13935, 13888, 13843, 13797, 13752, 13707, 13662, 13618, 13574, 13530,
+13487, 13443, 13400, 13358, 13315, 13273, 13231, 13190, 13148, 13107, 13066,
+13026, 12985, 12945, 12906, 12866, 12827, 12788, 12749, 12710, 12672, 12633,
+12596, 12558, 12520, 12483, 12446, 12409, 12373, 12336, 12300, 12264, 12228,
+12193, 12157, 12122, 12087, 12053, 12018, 11984, 11950, 11916, 11882, 11848,
+11815, 11782, 11749, 11716, 11683, 11651, 11619, 11586, 11555, 11523, 11491,
+11460, 11429, 11398, 11367, 11336, 11305, 11275, 11245, 11215, 11185, 11155,
+11125, 11096, 11067, 11038, 11009, 10980, 10951, 10923, 10894, 10866, 10838,
+10810, 10782, 10755, 10727, 10700, 10673, 10645, 10618, 10592, 10565, 10538,
+10512, 10486, 10460, 10434, 10408, 10382, 10356, 10331, 10305, 10280, 10255,
+10230, 10205, 10180, 10156, 10131, 10107, 10082, 10058, 10034, 10010, 9986,
+9963, 9939, 9916, 9892, 9869, 9846, 9823, 9800, 9777, 9754, 9732,
+9709, 9687, 9664, 9642, 9620, 9598, 9576, 9554, 9533, 9511, 9489,
+9468, 9447, 9425, 9404, 9383, 9362, 9341, 9321, 9300, 9279, 9259,
+9239, 9218, 9198, 9178, 9158, 9138, 9118, 9098, 9079, 9059, 9039,
+9020, 9001, 8981, 8962, 8943, 8924, 8905, 8886, 8867, 8849, 8830,
+8812, 8793, 8775, 8756, 8738, 8720, 8702, 8684, 8666, 8648, 8630,
+8613, 8595, 8577, 8560, 8542, 8525, 8508, 8490, 8473, 8456, 8439,
+8422, 8405, 8389, 8372, 8355, 8339, 8322, 8306, 8289, 8273, 8257,
+8240, 8224, 8208, 8192,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+}; + +/** +* struct vdec_av1_slice_init_vsi - VSI used to initialize instance
+ * @architecture:architecture type
+ * @reserved:reserved
+ * @core_vsi:for core vsi
+ * @cdf_table_addr:cdf table addr
+ * @cdf_table_size:cdf table size
+ * @iq_table_addr:iq table addr
+ * @iq_table_size:iq table size
+ * @vsi_size:share vsi structure size
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +94
-0+struct vdec_av1_slice_init_vsi { +u32 architecture; +u32 reserved; +u64 core_vsi; +u64 cdf_table_addr; +u32 cdf_table_size; +u64 iq_table_addr; +u32 iq_table_size; +u32 vsi_size; +}; + +/** +* struct vdec_av1_slice_mem - memory address and size +* @buf:dma_addr padding +* @dma_addr:buffer address +* @size:buffer size +* @dma_addr_end:buffer end address +* @padding:for padding +*/ +struct vdec_av1_slice_mem { +union { +u64 buf; +dma_addr_t dma_addr; +}; +union { +size_t size; +dma_addr_t dma_addr_end; +u64 padding; +}; +}; + +/** +* struct vdec_av1_slice_state - decoding state +* @err : err type for decode +* @full : transcoded buffer is full or not +* @timeout : decode timeout or not +* @perf : performance enable +* @crc : hw checksum +* @out_size : hw output size +*/ +struct vdec_av1_slice_state { +int err; +u32 full; +u32 timeout; +u32 perf; +u32 crc[16 ]; +u32 out_size; +}; + +/* +* enum vdec_av1_slice_resolution_level - resolution level +*/ +enum vdec_av1_slice_resolution_level { +AV1_RES_NONE , +AV1_RES_FHD , +AV1_RES_4K , +AV1_RES_8K , +}; + +/* +* enum vdec_av1_slice_frame_type - av1 frame type +*/ +enum vdec_av1_slice_frame_type { +AV1_KEY_FRAME =0 , +AV1_INTER_FRAME , +AV1_INTRA_ONLY_FRAME , +AV1_SWITCH_FRAME , +AV1_FRAME_TYPES , +}; + +/* +* enum vdec_av1_slice_reference_mode - reference mode type +*/ +enum vdec_av1_slice_reference_mode { +AV1_SINGLE_REFERENCE =0 , +AV1_COMPOUND_REFERENCE , +AV1_REFERENCE_MODE_SELECT , +AV1_REFERENCE_MODES , +}; + +/** +* struct vdec_av1_slice_tile_group - info for each tile +* @num_tiles:tile number +* @tile_size:input size for each tile +* @tile_start_offset:tile offset to input buffer +*/ +struct vdec_av1_slice_tile_group { +u32 num_tiles; +u32 tile_size[V4L2_AV1_MAX_TILE_COUNT ]; +u32 tile_start_offset[V4L2_AV1_MAX_TILE_COUNT ]; +}; + +/** +* struct vdec_av1_slice_scale_factors - scale info for each ref frame
+ * @is_scaled: frame is scaled or not + * @x_scale: frame width scale coefficient + * @y_scale: frame height scale coefficient + * @x_step: width step for x_scale + * @y_step: height step for y_scale+ */
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +44
-0+struct vdec_av1_slice_scale_factors { +u8 is_scaled; +int x_scale; +int y_scale; +int x_step; +int y_step; +}; + +/** +* struct vdec_av1_slice_frame_refs - ref frame info +* @ref_fb_idx: ref slot index +* @ref_map_idx: ref frame index +* @scale_factors: scale factors for each ref frame +*/ +struct vdec_av1_slice_frame_refs { +int ref_fb_idx; +int ref_map_idx; +struct vdec_av1_slice_scale_factors scale_factors; +}; + +/** +* struct vdec_av1_slice_gm - AV1 Global Motion parameters +* @wmtype: The type of global motion transform used +* @wmmat: gm_params +* @alpha: alpha info +* @beta: beta info +* @gamma: gamma info +* @delta: delta info +* @invalid: is invalid or not +*/ +struct vdec_av1_slice_gm { +int wmtype; +int wmmat[8 ]; +short alpha; +short beta; +short gamma; +short delta; +char invalid; +}; + +/** +* struct vdec_av1_slice_sm - AV1 Skip Mode parameters +* @skip_mode_allowed: Skip Mode is allowed or not +* @skip_mode_present: specified that the skip_mode will be present or not
+ * @skip_mode_frame: specifies the frames to use for compound
prediction
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+struct vdec_av1_slice_sm { +u8 skip_mode_allowed; +u8 skip_mode_present; +int skip_mode_frame[2 ]; +}; + +/** +* struct vdec_av1_slice_seg - AV1 Segmentation params +* @segmentation_enabled: this frame makes use of the segmentation tool or not
+ * @segmentation_update_map: segmentation map are updated
during the decoding frame
+ * @segmentation_temporal_update:segmentation map are coded relative the existing segmentaion map
+ * @segmentation_update_data: new parameters are about to be
specified for each segment
+ * @feature_data: specifies the feature data for a
segment feature
+ * @feature_enabled_mask: the corresponding feature value
is coded or not.
+ * @segid_preskip: segment id will be read before
the skip syntax element.
+ * @last_active_segid: the highest numbered segment id
that has some enabled feature
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +13
-0+struct vdec_av1_slice_seg { +u8 segmentation_enabled; +u8 segmentation_update_map; +u8 segmentation_temporal_update; +u8 segmentation_update_data; +int feature_data[V4L2_AV1_MAX_SEGMENTS ][V4L2_AV1_SEG_LVL_MAX ]; +u16 feature_enabled_mask[V4L2_AV1_MAX_SEGMENTS ]; +int segid_preskip; +int last_active_segid; +}; + +/** +* struct vdec_av1_slice_delta_q_lf - AV1 Loop Filter delta parameters
+ * @delta_q_present: specified whether quantizer index delta
values are present
+ * @delta_q_res: specifies the left shift which should be
applied to decoded quantizer index
+ * @delta_lf_present: specifies whether loop filter delta values
are present
+ * @delta_lf_res: specifies the left shift which should be
applied to decoded
+ * loop filter delta values
+ * @delta_lf_multi: specifies that separate loop filter deltas
are sent for horizontal
+ * luma edges,vertical luma edges,the u
edges, and the v edges.
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +11
-0+struct vdec_av1_slice_delta_q_lf { +u8 delta_q_present; +u8 delta_q_res; +u8 delta_lf_present; +u8 delta_lf_res; +u8 delta_lf_multi; +}; + +/** +* struct vdec_av1_slice_quantization - AV1 Quantization params +* @base_q_idx: indicates the base frame qindex. This is used for Y AC
+ * coefficients and as the base value for the
other quantizers.
+ * @qindex: qindex
+ * @delta_qydc: indicates the Y DC quantizer relative tobase_q_idx
+ * @delta_qudc: indicates the U DC quantizer relative tobase_q_idx.
+ * @delta_quac: indicates the U AC quantizer relative tobase_q_idx
+ * @delta_qvdc: indicates the V DC quantizer relative tobase_q_idx
+ * @delta_qvac: indicates the V AC quantizer relative tobase_q_idx
+ * @using_qmatrix: specifies that the quantizer matrix will
be used to
+ * compute quantizers
+ * @qm_y: specifies the level in the quantizer
matrix that should
+ * be used for luma plane decoding
+ * @qm_u: specifies the level in the quantizer
matrix that should
+ * be used for chroma U plane decoding.
+ * @qm_v: specifies the level in the quantizer
matrix that should be
+ * used for chroma V plane decoding
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +18
-0+struct vdec_av1_slice_quantization { +int base_q_idx; +int qindex[V4L2_AV1_MAX_SEGMENTS ]; +int delta_qydc; +int delta_qudc; +int delta_quac; +int delta_qvdc; +int delta_qvac; +u8 using_qmatrix; +u8 qm_y; +u8 qm_u; +u8 qm_v; +}; + +/** +* struct vdec_av1_slice_lr - AV1 Loop Restauration parameters +* @use_lr: whether to use loop restoration +* @use_chroma_lr: whether to use chroma loop restoration
+ * @frame_restoration_type: specifies the type of restoration
used for each plane
+ * @loop_restoration_size: pecifies the size of loop
restoration units in units
+ * of samples in the current plane
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+struct vdec_av1_slice_lr { +u8 use_lr; +u8 use_chroma_lr; +u8 frame_restoration_type[V4L2_AV1_NUM_PLANES_MAX ]; +u32 loop_restoration_size[V4L2_AV1_NUM_PLANES_MAX ]; +}; + +/** +* struct vdec_av1_slice_loop_filter - AV1 Loop filter parameters +* @loop_filter_level: an array containing loop filter strength values.
+ * @loop_filter_ref_deltas: contains the adjustment needed for
the filter
+ * level based on the chosen
reference frame
+ * @loop_filter_mode_deltas: contains the adjustment needed for
the filter
+ * level based on the chosen mode
+ * @loop_filter_sharpness: indicates the sharpness level. Theloop_filter_level
+ * andloop_filter_sharpnesstogether
determine when
+ * a block edge is filtered, and by
how much the
+ * filtering can change the sample
values
+ * @loop_filter_delta_enabled: filetr level depends on the mode and reference
+ * frame used to predict a block
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +11
-0+struct vdec_av1_slice_loop_filter { +u8 loop_filter_level[4 ]; +int loop_filter_ref_deltas[V4L2_AV1_TOTAL_REFS_PER_FRAME ]; +int loop_filter_mode_deltas[2 ]; +u8 loop_filter_sharpness; +u8 loop_filter_delta_enabled; +}; + +/** +* struct vdec_av1_slice_cdef - AV1 CDEF parameters +* @cdef_damping: controls the amount of damping in the deringing filter
+ * @cdef_y_strength: specifies the strength of the primary
filter and secondary filter
+ * @cdef_uv_strength: specifies the strength of the primary
filter and secondary filter
+ * @cdef_bits: specifies the number of bits needed to
specify which
+ * CDEF filter to apply
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +26
-0+struct vdec_av1_slice_cdef { +u8 cdef_damping; +u8 cdef_y_strength[8 ]; +u8 cdef_uv_strength[8 ]; +u8 cdef_bits; +}; + +/** +* struct vdec_av1_slice_mfmv - AV1 mfmv parameters +* @mfmv_valid_ref: mfmv_valid_ref +* @mfmv_dir: mfmv_dir +* @mfmv_ref_to_cur: mfmv_ref_to_cur +* @mfmv_ref_frame_idx: mfmv_ref_frame_idx +* @mfmv_count: mfmv_count +*/ +struct vdec_av1_slice_mfmv { +u32 mfmv_valid_ref[3 ]; +u32 mfmv_dir[3 ]; +int mfmv_ref_to_cur[3 ]; +int mfmv_ref_frame_idx[3 ]; +int mfmv_count; +}; + +/** +* struct vdec_av1_slice_tile - AV1 Tile info +* @tile_cols: specifies the number of tiles across the frame
+ * @tile_rows: pecifies the number of tiles down
the frame
+ * @mi_col_starts: an array specifying the start
column
+ * @mi_row_starts: an array specifying the start row
+ * @context_update_tile_id: specifies which tile to use for
the CDF update
+ * @uniform_tile_spacing_flag: tiles are uniformly spaced across the frame
+ * or the tile sizes are coded
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +11
-0+struct vdec_av1_slice_tile { +u8 tile_cols; +u8 tile_rows; +int mi_col_starts[V4L2_AV1_MAX_TILE_COLS +1 ]; +int mi_row_starts[V4L2_AV1_MAX_TILE_ROWS +1 ]; +u8 context_update_tile_id; +u8 uniform_tile_spacing_flag; +}; + +/** +* struct vdec_av1_slice_uncompressed_header - Represents an AV1 Frame Header OBU
+ * @use_ref_frame_mvs:use_ref_frame_mvsflag
+ * @order_hint: specifies OrderHintBits least
significant bits of the expected+ * @gm: global motion param + * @upscaled_width: the upscaled width + * @frame_width: frame's width + * @frame_height: frame's height + * @reduced_tx_set: frame is restricted to a reducedsubset of the full
+ * set of transform types
+ * @tx_mode: specifies how the transform size
is determined
+ * @uniform_tile_spacing_flag: tiles are uniformly spaced across the frame
+ * or the tile sizes are coded
+ * @interpolation_filter: specifies the filter selection
used for performing inter prediction
+ * @allow_warped_motion:motion_modemay be present or not
+ * @is_motion_mode_switchable : euqlt to 0 specifies that only the SIMPLE motion mode will be used
+ * @reference_mode : frame reference mode selected
+ * @allow_high_precision_mv: specifies that motion vectors are
specified to
+ * quarter pel precision or to eighth
pel precision
+ * @allow_intra_bc: ubducates that intra block copy
may be used in this frame
+ * @force_integer_mv: specifies motion vectors will
always be integers or
+ * can contain fractional bits
+ * @allow_screen_content_tools: intra blocks may use palette encoding
+ * @error_resilient_mode: error resislent mode is
enable/disable
+ * @frame_type: specifies the AV1 frame type
+ * @primary_ref_frame: specifies which reference frame
contains the CDF values
+ * and other state that should be
loaded at the start of the frame
+ * slots will be updated with the
current frame after it is decoded
+ * @disable_frame_end_update_cdf:indicates the end of frame CDF update is disable or enable
+ * @disable_cdf_update: specified whether the CDF update
in the symbol
+ * decoding process should be
disables+ * @skip_mode: av1 skip mode parameters + * @seg: av1 segmentaon parameters + * @delta_q_lf: av1 delta loop fileter + * @quant: av1 Quantization params + * @lr: av1 Loop Restauration parameters + * @superres_denom: the denominator for the upscaling ratio + * @loop_filter: av1 Loop filter parameters + * @cdef: av1 CDEF parameters + * @mfmv: av1 mfmv parameters + * @tile: av1 Tile info + * @frame_is_intra: intra frame + * @loss_less_array: loss less array + * @coded_loss_less: coded lsss less + * @mi_rows: size of mi unit in rows + * @mi_cols: size of mi unit in cols+ */
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +42
-0+struct vdec_av1_slice_uncompressed_header { +u8 use_ref_frame_mvs; +int order_hint; +struct vdec_av1_slice_gm gm[V4L2_AV1_TOTAL_REFS_PER_FRAME ]; +u32 upscaled_width; +u32 frame_width; +u32 frame_height; +u8 reduced_tx_set; +u8 tx_mode; +u8 uniform_tile_spacing_flag; +u8 interpolation_filter; +u8 allow_warped_motion; +u8 is_motion_mode_switchable; +u8 reference_mode; +u8 allow_high_precision_mv; +u8 allow_intra_bc; +u8 force_integer_mv; +u8 allow_screen_content_tools; +u8 error_resilient_mode; +u8 frame_type; +u8 primary_ref_frame; +u8 disable_frame_end_update_cdf; +u32 disable_cdf_update; +struct vdec_av1_slice_sm skip_mode; +struct vdec_av1_slice_seg seg; +struct vdec_av1_slice_delta_q_lf delta_q_lf; +struct vdec_av1_slice_quantization quant; +struct vdec_av1_slice_lr lr; +u32 superres_denom; +struct vdec_av1_slice_loop_filter loop_filter; +struct vdec_av1_slice_cdef cdef; +struct vdec_av1_slice_mfmv mfmv; +struct vdec_av1_slice_tile tile; +u8 frame_is_intra; +u8 loss_less_array[V4L2_AV1_MAX_SEGMENTS ]; +u8 coded_loss_less; +u32 mi_rows; +u32 mi_cols; +}; + +/** +* struct vdec_av1_slice_seq_header - Represents an AV1 Sequence OBU
+ * @bitdepth: the bitdepth to use for the
sequence
+ * @enable_superres: specifies whether theuse_superres
syntax element may be present
+ * @enable_filter_intra: specifies theuse_filter_intra
syntax element may be present
+ * @enable_intra_edge_filter: whether the intra edge filtering
process should be enabled
+ * @enable_interintra_compound: specifies the mode info fo rinter blocks may
+ * contain the syntax element
interintra
+ * @enable_masked_compound: specifies the mode info fo rinter
blocks may
+ * contain the syntax elementcompound_type
+ * @enable_dual_filter: the inter prediction filter type
may be specified independently
+ * @enable_jnt_comp: distance weights process may be
used for inter prediction
+ * @mono_chrome: indicates the video does not
contain U and V color planes
+ * @enable_order_hint: tools based on the values of order
hints may be used
+ * @order_hint_bits: the number of bits used for theorder_hintfield at each frame
+ * @use_128x128_superblock: indicates superblocks contain
128*128 luma samples+ * @subsampling_x: the chroma subsamling format + * @subsampling_y: the chroma subsamling format + * @max_frame_width: the maximum frame width for theframes represented by sequence
+ * @max_frame_height: the maximum frame height for the
frames represented by sequence
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +43
-0+struct vdec_av1_slice_seq_header { +u8 bitdepth; +u8 enable_superres; +u8 enable_filter_intra; +u8 enable_intra_edge_filter; +u8 enable_interintra_compound; +u8 enable_masked_compound; +u8 enable_dual_filter; +u8 enable_jnt_comp; +u8 mono_chrome; +u8 enable_order_hint; +u8 order_hint_bits; +u8 use_128x128_superblock; +u8 subsampling_x; +u8 subsampling_y; +u32 max_frame_width; +u32 max_frame_height; +}; + +/** +* struct vdec_av1_slice_frame - Represents current Frame info +* @uh: uncompressed header info +* @seq: sequence header info +* @large_scale_tile: is large scale mode +* @cur_ts: current frame timestamp +* @prev_fb_idx: prev slot id +* @ref_frame_sign_bias: arrays for ref_frame sign bias +* @order_hints: arrays for ref_frame order hint +* @ref_frame_valid: arrays for valid ref_frame +* @ref_frame_map: map to slot frame info +* @frame_refs: ref_frame info +*/ +struct vdec_av1_slice_frame { +struct vdec_av1_slice_uncompressed_header uh; +struct vdec_av1_slice_seq_header seq; +u8 large_scale_tile; +u64 cur_ts; +int prev_fb_idx; +u8 ref_frame_sign_bias[V4L2_AV1_TOTAL_REFS_PER_FRAME ]; +u32 order_hints[V4L2_AV1_REFS_PER_FRAME ]; +u32 ref_frame_valid[V4L2_AV1_REFS_PER_FRAME ]; +int ref_frame_map[V4L2_AV1_TOTAL_REFS_PER_FRAME ]; +struct vdec_av1_slice_frame_refs frame_refs[V4L2_AV1_REFS_PER_FRAME];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +44
-0+}; + +/** +* struct vdec_av1_slice_work_buffer - work buffer for lat +* @mv_addr: mv buffer memory info +* @cdf_addr: cdf buffer memory info +* @segid_addr: segid buffer memory info +*/ +struct vdec_av1_slice_work_buffer { +struct vdec_av1_slice_mem mv_addr; +struct vdec_av1_slice_mem cdf_addr; +struct vdec_av1_slice_mem segid_addr; +}; + +/** +* struct vdec_av1_slice_frame_info - frame info for each slot +* @frame_type: frame type +* @frame_is_intra: is intra frame +* @order_hint: order hint +* @order_hints: referece frame order hint +* @upscaled_width: upscale width +* @pic_pitch: buffer pitch +* @frame_width: frane width +* @frame_height: frame height +* @mi_rows: rows in mode info +* @mi_cols: cols in mode info +* @ref_count: mark to reference frame counts +*/ +struct vdec_av1_slice_frame_info { +u8 frame_type; +u8 frame_is_intra; +int order_hint; +u32 order_hints[V4L2_AV1_REFS_PER_FRAME ]; +u32 upscaled_width; +u32 pic_pitch; +u32 frame_width; +u32 frame_height; +u32 mi_rows; +u32 mi_cols; +int ref_count; +}; + +/** +* struct vdec_av1_slice_slot - slot info that needs to be saved in the global instance
+ * @frame_info: frame info for each slot
+ * @timestamp: time stamp info
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+struct vdec_av1_slice_slot { +struct vdec_av1_slice_frame_info frame_info[AV1_MAX_FRAME_BUF_COUNT];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +15
-0+u64 timestamp[AV1_MAX_FRAME_BUF_COUNT ]; +}; + +/** +* struct vdec_av1_slice_fb - frame buffer for decoding +* @y: current y buffer address info +* @c: current c buffer address info +*/ +struct vdec_av1_slice_fb { +struct vdec_av1_slice_mem y; +struct vdec_av1_slice_mem c; +}; + +/** +* struct vdec_av1_slice_vsi - exchange frame information between Main CPU and MicroP
+ * @bs:input buffer info
+ * @work_buffer:working buffe for hw
+ * @cdf_table:cdf_table buffer
+ * @cdf_tmp:cdf temp buffer
+ * @rd_mv:mv buffer for lat output , core input
+ * @ube:ube buffer
+ * @trans:transcoded buffer
+ * @err_map:err map buffer
+ * @row_info:row info buffer
+ * @fb:current y/c buffer
+ * @ref:ref y/c buffer
+ * @iq_table:iq table buffer
+ * @tile:tile buffer
+ * @slots:slots info for each frame
+ * @slot_id:current frame slot id
+ * @frame:current frame info
+ * @state:status after decode done
+ * @cur_lst_tile_id:tile id for large scale
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+struct vdec_av1_slice_vsi { +/* lat */ +struct vdec_av1_slice_mem bs; +struct vdec_av1_slice_work_buffer work_buffer[AV1_MAX_FRAME_BUF_COUNT];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +23
-0+struct vdec_av1_slice_mem cdf_table; +struct vdec_av1_slice_mem cdf_tmp; +/* LAT stage's output, Core stage's input */ +struct vdec_av1_slice_mem rd_mv; +struct vdec_av1_slice_mem ube; +struct vdec_av1_slice_mem trans; +struct vdec_av1_slice_mem err_map; +struct vdec_av1_slice_mem row_info; +/* core */ +struct vdec_av1_slice_fb fb; +struct vdec_av1_slice_fb ref[V4L2_AV1_REFS_PER_FRAME ]; +struct vdec_av1_slice_mem iq_table; +/* lat and core share*/ +struct vdec_av1_slice_mem tile; +struct vdec_av1_slice_slot slots; +u8 slot_id; +struct vdec_av1_slice_frame frame; +struct vdec_av1_slice_state state; +u32 cur_lst_tile_id; +}; + +/** +* struct vdec_av1_slice_pfc - per-frame context that contains a local vsi.
+ * pass it from lat to core
+ * @vsi: local vsi. copy to/from remote vsi before/after
decoding
+ * @ref_idx: reference buffer timestamp
+ * @seq: picture sequence
+ */drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +64
-0+struct vdec_av1_slice_pfc { +struct vdec_av1_slice_vsi vsi; +u64 ref_idx[V4L2_AV1_REFS_PER_FRAME ]; +int seq; +}; + +/** +* struct vdec_av1_slice_instance - represent one av1 instance +* @ctx: pointer to codec's context +* @vpu: VPU instance +* @iq_table: iq table buffer +* @cdf_table: cdf table buffer +* @mv: mv working buffer +* @cdf: cdf working buffer +* @seg: segmentation working buffer +* @cdf_temp: cdf temp buffer +* @tile: tile buffer +* @slots: slots info +* @tile_group: tile_group entry +* @level: level of current resolution +* @width: width of last picture +* @height: height of last picture +* @frame_type: frame_type of last picture +* @irq: irq to Main CPU or MicroP +* @inneracing_mode: is inneracing mode +* @init_vsi: vsi used for initialized AV1 instance +* @vsi: vsi used for decoding/flush ... +* @core_vsi: vsi used for Core stage +* @seq: global picture sequence +*/ +struct vdec_av1_slice_instance { +struct mtk_vcodec_ctx *ctx; +struct vdec_vpu_inst vpu; + +struct mtk_vcodec_mem iq_table; +struct mtk_vcodec_mem cdf_table; + +struct mtk_vcodec_mem mv[AV1_MAX_FRAME_BUF_COUNT ]; +struct mtk_vcodec_mem cdf[AV1_MAX_FRAME_BUF_COUNT ]; +struct mtk_vcodec_mem seg[AV1_MAX_FRAME_BUF_COUNT ]; +struct mtk_vcodec_mem cdf_temp; +struct mtk_vcodec_mem tile; +struct vdec_av1_slice_slot slots; +struct vdec_av1_slice_tile_group tile_group; + +/* for resolution change and get_pic_info */ +enum vdec_av1_slice_resolution_level level; +u32 width; +u32 height; + +u32 frame_type; +u32 irq; +u32 inneracing_mode; + +/* MicroP vsi */ +union { +struct vdec_av1_slice_init_vsi *init_vsi; +struct vdec_av1_slice_vsi *vsi; +}; +struct vdec_av1_slice_vsi *core_vsi; +int seq; +}; + +static int vdec_av1_slice_core_decode(struct vdec_lat_buf
*lat_buf);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+ +static inline int vdec_av1_slice_get_msb (u32 n) +{ +if (n ==0 ) +return 0 ; +return 31 ^__builtin_clz (n); +} + +static inline bool vdec_av1_slice_need_scale(u32 ref_width, u32
ref_height,
+ u32this_width, u32this_height)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+{ +return ((this_width <<1 ) >= ref_width) && +((this_height <<1 ) >= ref_height) && +(this_width <= (ref_width <<4 )) && +(this_height <= (ref_height <<4 )); +} + +static void *vdec_av1_get_ctrl_ptr(struct mtk_vcodec_ctx *ctx, intid)
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 8 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+{ +struct v4l2_ctrl *ctrl =v4l2_ctrl_find (&ctx->ctrl_hdl, id); + +if (!ctrl) +return ERR_PTR (-EINVAL ); + +return ctrl->p_cur.p; +}I see we keep repeating this kind of a
v4l2_ctrl_find()wrapper in drivers.
The only reason this code cannot be factored out is the "context" struct pointer
pointing at structs of different types. Maybe we could#define
v4l2_get_ctrl_ptr(ctx, member, id)\__v4l2_get_ctrl_ptr((ctx), offsetof(typeof(*ctx), (member)), (id))void *__v4l2_get_ctrl_ptr(void *ctx,
size_toffset, u32 id) {
structv4l2_ctrl_handler*hdl = (structv4l2_ctrl_handler*)(ctx + offset);
structv4l2_ctrl*ctrl =v4l2_ctrl_find(hdl, id);if (!ctrl)
returnERR_PTR(-EINVAL);return
ctrl->p_cur.p;
}and reuse
v4l2_get_ctrl_ptr()in drivers?A similar kind of void* arithmetic happens in
container_of, only with '-'.Quoted 14 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ +static int vdec_av1_slice_init_cdf_table(struct
vdec_av1_slice_instance*instance)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+{ +u8 *remote_cdf_table; +struct mtk_vcodec_ctx *ctx; +struct vdec_av1_slice_init_vsi *vsi; +int ret; + +ctx = instance->ctx; +vsi = instance->vpu.vsi; +if (!ctx || !vsi) { +mtk_vcodec_err(instance, "invalid ctx or vsi 0x%p0x%p\n",
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 3 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ ctx, vsi); +return -EINVAL ; +}The above if block is redundant, because - given the current shape of ths driver
code - the condition is never true.This function is only called from
vdec_av1_slice_init(), where bothinstance->ctxandinstance->vpu.vsiare set to some values. The latter is even
checked for being null before this function is called.In the caller,
instance->ctxis set to whatever the caller receives from its
caller. This perhaps might be checked, butvdec_av1_slice_init()dereferences
ctx without checking anyway (instance->vpu.codec_type= ctx-Quoted 1 line
current_codec;).So maybe add a check in
vdec_av1_slice_init(), or ensure thatvdec_av1_slice_init()is never passed a NULL ctx.Quoted 40 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ +remote_cdf_table = mtk_vcodec_fw_map_dm_addr(ctx->dev-Quoted 1 line
fw_handler,+ (u32)vsi-
Quoted 1 line
cdf_table_addr);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +17
-0+if (IS_ERR (remote_cdf_table)) { +mtk_vcodec_err (instance,"failed to map cdf table\n" ); +return PTR_ERR (remote_cdf_table); +} + +mtk_vcodec_debug (instance,"map cdf table to 0x%p\n" , + remote_cdf_table); + +if (instance->cdf_table.va) +mtk_vcodec_mem_free (ctx, &instance->cdf_table); +instance->cdf_table.size = vsi->cdf_table_size; + +ret =mtk_vcodec_mem_alloc (ctx, &instance->cdf_table); +if (ret) +return ret; + +memcpy(instance->cdf_table.va, remote_cdf_table, vsi-Quoted 1 line
cdf_table_size);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+ +return 0 ; +} + +static int vdec_av1_slice_init_iq_table(struct
vdec_av1_slice_instance*instance)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+{ +u8 *remote_iq_table; +struct mtk_vcodec_ctx *ctx; +struct vdec_av1_slice_init_vsi *vsi; +int ret; + +ctx = instance->ctx; +vsi = instance->vpu.vsi; +if (!ctx || !vsi) { +mtk_vcodec_err(instance, "invalid ctx or vsi 0x%p0x%p\n",
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 3 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ ctx, vsi); +return -EINVAL ; +}ditto
Quoted 50 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ +remote_iq_table = mtk_vcodec_fw_map_dm_addr(ctx->dev-Quoted 1 line
fw_handler,+ (u32)vsi-
Quoted 1 line
iq_table_addr);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+if (IS_ERR (remote_iq_table)) { +mtk_vcodec_err (instance,"failed to map iq table\n" ); +return PTR_ERR (remote_iq_table); +} + +mtk_vcodec_debug(instance, "map iq table to 0x%p\n",
remote_iq_table);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+ +if (instance->iq_table.va) +mtk_vcodec_mem_free (ctx, &instance->iq_table); +instance->iq_table.size = vsi->iq_table_size; + +ret =mtk_vcodec_mem_alloc (ctx, &instance->iq_table); +if (ret) +return ret; + +memcpy(instance->iq_table.va, remote_iq_table, vsi-Quoted 1 line
iq_table_size);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+ +return 0 ; +} + +static int vdec_av1_slice_get_new_slot(struct vdec_av1_slice_vsi*vsi)
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +21
-0+{ +struct vdec_av1_slice_slot *slots = &vsi->slots; +int new_slot_idx =AV1_INVALID_IDX ; +int i; + +for (i =0 ; i <AV1_MAX_FRAME_BUF_COUNT ; i++) { +if (slots->frame_info[i].ref_count ==0 ) { +new_slot_idx = i; +break ; +} +} + +if (new_slot_idx !=AV1_INVALID_IDX ) { +slots->frame_info[new_slot_idx].ref_count++; +slots->timestamp[new_slot_idx] = vsi->frame.cur_ts; +} + +return new_slot_idx; +} + +static void vdec_av1_slice_clear_fb(structQuoted 1 line
vdec_av1_slice_frame_info*frame_info)static inline void?
Quoted 14 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+{ +memset((void *)frame_info, 0, sizeof(struct
vdec_av1_slice_frame_info));drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+} + +static void vdec_av1_slice_decrease_ref_count(struct
vdec_av1_slice_slot*slots, intfb_idx)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+{ +struct vdec_av1_slice_frame_info *frame_info = slots-Quoted 1 line
frame_info;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ +if (fb_idx <0 || fb_idx >=AV1_MAX_FRAME_BUF_COUNT ) { +mtk_v4l2_err("av1_error: %s() invalid fb_idx %d\n",
__func__,fb_idx);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 2 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+return ; +}The above if block is redundant, because - given the current shape of this
driver code - the condition is never true.This function is only called from the below
vdec_av1_slice_cleanup_slots().
Thefb_idxformal param comes from the caller'sslot_idlocal variable, whose
value is only assigned in the for loop, iterating from 0 toAV1_MAX_FRAME_BUF_COUNT- 1, inclusive. Henceslot_idis never < 0 nor >=AV1_MAX_FRAME_BUF_COUNT.Quoted 132 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+ +frame_info[fb_idx].ref_count--; +if (frame_info[fb_idx].ref_count <0 ) { +frame_info[fb_idx].ref_count =0 ; +mtk_v4l2_err("av1_error: %s() fb_idx %d decrease
ref_counterror\n",drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+ __func__, fb_idx); +} +vdec_av1_slice_clear_fb (&frame_info[fb_idx]); +} + +static void vdec_av1_slice_cleanup_slots(struct
vdec_av1_slice_slot*slots,
+ structvdec_av1_slice_frame
*frame,
+ structv4l2_ctrl_av1_frame*ctrl_fh)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+{ +int slot_id, ref_id; + +for (ref_id = 0; ref_id < V4L2_AV1_TOTAL_REFS_PER_FRAME;ref_id++)
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+frame->ref_frame_map[ref_id] =AV1_INVALID_IDX ; + +for (slot_id =0 ; slot_id <AV1_MAX_FRAME_BUF_COUNT ; slot_id++){
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+u64 timestamp = slots->timestamp[slot_id]; +bool ref_used = false; + +/* ignored unused slots */ +if (slots->frame_info[slot_id].ref_count ==0 ) +continue ; + +for (ref_id = 0; ref_id <
V4L2_AV1_TOTAL_REFS_PER_FRAME; ref_id++) {
+if (ctrl_fh->reference_frame_ts[ref_id] ==
timestamp) {drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+frame->ref_frame_map[ref_id] = slot_id; +ref_used = true; +} +} + +if (!ref_used) +vdec_av1_slice_decrease_ref_count(slots,
slot_id);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+} +} + +static void vdec_av1_slice_setup_slot(struct
vdec_av1_slice_instance*instance,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+struct vdec_av1_slice_vsi *vsi, + struct v4l2_ctrl_av1_frame
*ctrl_fh)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+{ +struct vdec_av1_slice_frame_info *cur_frame_info; +struct vdec_av1_slice_uncompressed_header *uh = &vsi->frame.uh; +int ref_id; + +memcpy (&vsi->slots, &instance->slots,sizeof (instance->slots)); +vdec_av1_slice_cleanup_slots(&vsi->slots, &vsi->frame,
ctrl_fh);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+vsi->slot_id =vdec_av1_slice_get_new_slot (vsi); + +if (vsi->slot_id ==AV1_INVALID_IDX ) { +mtk_v4l2_err ("warning:av1 get invalid index slot\n" ); +vsi->slot_id =0 ; +} +cur_frame_info = &vsi->slots.frame_info[vsi->slot_id]; +cur_frame_info->frame_type = uh->frame_type; +cur_frame_info->frame_is_intra = ((uh->frame_type ==
AV1_INTRA_ONLY_FRAME) ||
+ (uh->frame_type==AV1_KEY_FRAME));drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+cur_frame_info->order_hint = uh->order_hint; +cur_frame_info->upscaled_width = uh->upscaled_width; +cur_frame_info->pic_pitch =0 ; +cur_frame_info->frame_width = uh->frame_width; +cur_frame_info->frame_height = uh->frame_height; +cur_frame_info->mi_cols = ((uh->frame_width +7 ) >>3 ) <<1 ; +cur_frame_info->mi_rows = ((uh->frame_height +7 ) >>3 ) <<1 ; + +/* ensure current frame is properly mapped if referenced */ +for (ref_id = 0; ref_id < V4L2_AV1_TOTAL_REFS_PER_FRAME;ref_id++) {
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+u64 timestamp = vsi->slots.timestamp[vsi->slot_id]; + +if (ctrl_fh->reference_frame_ts[ref_id] == timestamp) +vsi->frame.ref_frame_map[ref_id] = vsi-Quoted 1 line
slot_id;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+} +} + +static int vdec_av1_slice_alloc_working_buffer(struct
vdec_av1_slice_instance*instance,
+ structvdec_av1_slice_vsi*vsi)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+{ +struct mtk_vcodec_ctx *ctx = instance->ctx; +struct vdec_av1_slice_work_buffer *work_buffer = vsi-Quoted 1 line
work_buffer;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+enum vdec_av1_slice_resolution_level level; +u32 max_sb_w, max_sb_h, max_w, max_h, w, h; +size_t size; +int i, ret; + +w = vsi->frame.uh.frame_width; +h = vsi->frame.uh.frame_height; + +if (w > VCODEC_DEC_4K_CODED_WIDTH || h >
VCODEC_DEC_4K_CODED_HEIGHT)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +19
-0+/* 8K */ +return -EINVAL ; + +if (w >MTK_VDEC_MAX_W || h >MTK_VDEC_MAX_H ) { +/* 4K */ +level =AV1_RES_4K ; +max_w =VCODEC_DEC_4K_CODED_WIDTH ; +max_h =VCODEC_DEC_4K_CODED_HEIGHT ; +}else { +/* FHD */ +level =AV1_RES_FHD ; +max_w =MTK_VDEC_MAX_W ; +max_h =MTK_VDEC_MAX_H ; +} + +if (level == instance->level) +return 0 ; + +mtk_vcodec_debug(instance, "resolution level changed from %u to%u, %ux%u",
+instance->level, level, w, h);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +1
-0+drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+max_sb_w =DIV_ROUND_UP (max_w,128 ); +max_sb_h =DIV_ROUND_UP (max_h,128 ); +size = max_sb_w * max_sb_h *SZ_1K ; +for (i =0 ; i <AV1_MAX_FRAME_BUF_COUNT ; i++) { +if (instance->mv[i].va) +mtk_vcodec_mem_free (ctx, &instance->mv[i]); +instance->mv[i].size = size; +ret =mtk_vcodec_mem_alloc (ctx, &instance->mv[i]); +if (ret) +goto err;Please ignore this comment if this has been discussed and settled. Maybe it's just me, but I feel it is idiomatic in the kernel to undo all previous allocations if at some iteration we fail. Here a different
approach is taken: we stop iterating and return an error, and free next time
we are called. Why?Quoted 13 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +12
-0+work_buffer[i].mv_addr.buf = instance->mv[i].dma_addr; +work_buffer[i].mv_addr.size = size; > +} + +size = max_sb_w * max_sb_h *512 ; +for (i =0 ; i <AV1_MAX_FRAME_BUF_COUNT ; i++) { +if (instance->seg[i].va) +mtk_vcodec_mem_free (ctx, &instance->seg[i]); +instance->seg[i].size = size; +ret =mtk_vcodec_mem_alloc (ctx, &instance->seg[i]); +if (ret) +goto err; +work_buffer[i].segid_addr.buf = instance-Quoted 1 line
seg[i].dma_addr;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 4 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+work_buffer[i].segid_addr.size = size; +} + +size =16384 ;#define a named constant for this magic number?
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 11 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+for (i =0 ; i <AV1_MAX_FRAME_BUF_COUNT ; i++) { +if (instance->cdf[i].va) +mtk_vcodec_mem_free (ctx, &instance->cdf[i]); +instance->cdf[i].size = size; +ret =mtk_vcodec_mem_alloc (ctx, &instance->cdf[i]); +if (ret) +goto err; +work_buffer[i].cdf_addr.buf = instance-Quoted 1 line
cdf[i].dma_addr;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+work_buffer[i].cdf_addr.size = size; +}The 3 for loops are supposed to iterate from 0 to
AV1_MAX_FRAME_BUF_COUNT- 1,
inclusive. Is it possible to merge them?drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 9 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+if (!instance->cdf_temp.va) { +instance->cdf_temp.size = (SZ_1K *16 *100 ); +ret =mtk_vcodec_mem_alloc (ctx, &instance->cdf_temp); +if (ret) +goto err; +vsi->cdf_tmp.buf = instance->cdf_temp.dma_addr; +vsi->cdf_tmp.size = instance->cdf_temp.size; +} +size =AV1_TILE_BUF_SIZE *V4L2_AV1_MAX_TILE_COUNT ;This "size" is never changed until the end of this function. It is a compile-time constant, so there's no need to assign its value to an intermediate variable.
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 4 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ +if (instance->tile.va) +mtk_vcodec_mem_free (ctx, &instance->tile); +instance->tile.size = size;
instance->tile.size=AV1_TILE_BUF_SIZE*V4L2_AV1_MAX_TILE_COUNT;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 7 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+ +ret =mtk_vcodec_mem_alloc (ctx, &instance->tile); +if (ret) +goto err; + +vsi->tile.buf = instance->tile.dma_addr; +vsi->tile.size = size;
vsi->tile.size=instance->tile.size;and now it is clear the size in vsi is the same as the one in instance.
BTW, isvsi->tile.sizesupposed to always be equal to the one in instance?
If yes:
- Is instance available whenever we need to accessvsi->tile.size?
- What's the point of duplicating this value? Can it be stored in
one place?Quoted 11 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+ +instance->level = level; +return 0 ; + +err: +instance->level =AV1_RES_NONE ; +return ret; +} + +static void vdec_av1_slice_free_working_buffer(struct
vdec_av1_slice_instance*instance)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 7 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+{ +struct mtk_vcodec_ctx *ctx = instance->ctx; +int i; + +for (i =0 ; i <ARRAY_SIZE (instance->mv); i++) +if (instance->mv[i].va) +mtk_vcodec_mem_free (ctx, &instance->mv[i]);Perhaps
mtk_vcodec_mem_free()can properly handle the case(!instance->mv[i].va) ? This would eliminate 7 of 20 lines of code in this function.
Quoted 22 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +22
-0+ +for (i =0 ; i <ARRAY_SIZE (instance->seg); i++) +if (instance->seg[i].va) +mtk_vcodec_mem_free (ctx, &instance->seg[i]); + +for (i =0 ; i <ARRAY_SIZE (instance->cdf); i++) +if (instance->cdf[i].va) +mtk_vcodec_mem_free (ctx, &instance->cdf[i]); + +if (instance->tile.va) +mtk_vcodec_mem_free (ctx, &instance->tile); +if (instance->cdf_temp.va) +mtk_vcodec_mem_free (ctx, &instance->cdf_temp); +if (instance->cdf_table.va) +mtk_vcodec_mem_free (ctx, &instance->cdf_table); +if (instance->iq_table.va) +mtk_vcodec_mem_free (ctx, &instance->iq_table); + +instance->level =AV1_RES_NONE ; +} + +static void vdec_av1_slice_vsi_from_remote(structQuoted 3 lines
vdec_av1_slice_vsi*vsi,
+ structvdec_av1_slice_vsi*remote_vsi)static inline void?
Quoted 9 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+{ +memcpy (&vsi->trans, &remote_vsi->trans,sizeof (vsi->trans)); +memcpy (&vsi->state, &remote_vsi->state,sizeof (vsi->state)); +} + +static void vdec_av1_slice_vsi_to_remote(struct vdec_av1_slice_vsi*vsi,
+ structvdec_av1_slice_vsi*remote_vsi)static inline void?
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+{ +memcpy (remote_vsi, vsi,sizeof (*vsi)); +} + +static int vdec_av1_slice_setup_lat_from_src_buf(struct
vdec_av1_slice_instance*instance,
+ structvdec_av1_slice_vsi*vsi,
+ structvdec_lat_buf*lat_buf)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+{ +struct vb2_v4l2_buffer *src; +struct vb2_v4l2_buffer *dst; + +src =v4l2_m2m_next_src_buf (instance->ctx->m2m_ctx); +if (!src) +return -EINVAL ; + +lat_buf->src_buf_req = src->vb2_buf.req_obj.req; +dst = &lat_buf->ts_info;the "
ts_info" actually contains a structvb2_v4l2_buffer. Why such a name?Quoted 79 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+v4l2_m2m_buf_copy_metadata (src, dst, true); +vsi->frame.cur_ts = dst->vb2_buf.timestamp; + +return 0 ; +} + +static short vdec_av1_slice_resolve_divisor_32(u32 D, short*shift)
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+{ +int f; +int e; + +*shift =vdec_av1_slice_get_msb (D ); +/* e is obtained from D after resetting the most significant 1 bit. */
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+e =D - ((u32 )1 << *shift); +/* Get the most significant DIV_LUT_BITS (8) bits of e into f */
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +12
-0+if (*shift >DIV_LUT_BITS ) +f =AV1_DIV_ROUND_UP_POW2 (e, *shift -DIV_LUT_BITS ); +else +f = e << (DIV_LUT_BITS - *shift); +if (f >DIV_LUT_NUM ) +return -1 ; +*shift +=DIV_LUT_PREC_BITS ; +/* Use f as lookup into the precomputed table of multipliers */ +return div_lut[f]; +} + +static void vdec_av1_slice_get_shear_params(struct
vdec_av1_slice_gm*gm_params)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+{ +const int *mat = gm_params->wmmat; +short shift; +short y; +long long gv, dv; + +if (gm_params->wmmat[2 ] <=0 ) +return ; + +gm_params->alpha = clamp_val(mat[2] - (1 <<
WARPEDMODEL_PREC_BITS),S16_MIN,S16_MAX);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+gm_params->beta =clamp_val (mat[3 ],S16_MIN ,S16_MAX ); + +y = vdec_av1_slice_resolve_divisor_32(abs(mat[2]), &shift) *(mat[2] < 0 ? -1 : 1);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ +gv = ((long long )mat[4 ] * (1 <<WARPEDMODEL_PREC_BITS )) * y; +gm_params->gamma =clamp_val((int)AV1_DIV_ROUND_UP_POW2_SIGNED(gv, shift),
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ S16_MIN, S16_MAX); + +dv = ((long long )mat[3 ] * mat[4 ]) * y; +gm_params->delta = clamp_val(mat[5] -(int)AV1_DIV_ROUND_UP_POW2_SIGNED(dv, shift) -
+ (1 <<WARPEDMODEL_PREC_BITS),S16_MIN,S16_MAX);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ +gm_params->alpha = AV1_DIV_ROUND_UP_POW2_SIGNED(gm_params-Quoted 1 line
alpha,
WARP_PARAM_REDUCE_BITS) *+(1 <<
WARP_PARAM_REDUCE_BITS);
+gm_params->beta =AV1_DIV_ROUND_UP_POW2_SIGNED(gm_params->beta, WARP_PARAM_REDUCE_BITS)*
+ (1 <<WARP_PARAM_REDUCE_BITS);
+gm_params->gamma = AV1_DIV_ROUND_UP_POW2_SIGNED(gm_params-Quoted 1 line
gamma,
WARP_PARAM_REDUCE_BITS) *+(1 <<
WARP_PARAM_REDUCE_BITS);
+gm_params->delta = AV1_DIV_ROUND_UP_POW2_SIGNED(gm_params-Quoted 1 line
delta,
WARP_PARAM_REDUCE_BITS) *+(1 <<
WARP_PARAM_REDUCE_BITS);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+} + +static void vdec_av1_slice_setup_gm (struct vdec_av1_slice_gm *gm, + struct v4l2_av1_global_motion
*ctrl_gm)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 6 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+{ +u32 i, j; + +for (i =0 ; i <V4L2_AV1_TOTAL_REFS_PER_FRAME ; i++) { +gm[i].wmtype = ctrl_gm->type[i]; +for (j =0 ; j <6 ; j++)Maybe #define this magic 6?
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 8 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+gm[i].wmmat[j] = ctrl_gm->params[i][j]; + +gm[i].invalid = !!(ctrl_gm->invalid &BIT (i)); +gm[i].alpha =0 ; +gm[i].beta =0 ; +gm[i].gamma =0 ; +gm[i].delta =0 ; +if (gm[i].wmtype <=3 )And this 3?
Quoted 36 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+vdec_av1_slice_get_shear_params (&gm[i]); +} +} + +static void vdec_av1_slice_setup_seg(struct vdec_av1_slice_seg*seg,
+ structv4l2_av1_segmentation*ctrl_seg)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+{ +u32 i, j; + +seg->segmentation_enabled = SEGMENTATION_FLAG(ctrl_seg,ENABLED);
+seg->segmentation_update_map =SEGMENTATION_FLAG(ctrl_seg, UPDATE_MAP);
+seg->segmentation_temporal_update =SEGMENTATION_FLAG(ctrl_seg, TEMPORAL_UPDATE);
+seg->segmentation_update_data =SEGMENTATION_FLAG(ctrl_seg, UPDATE_DATA);
+seg->segid_preskip =SEGMENTATION_FLAG(ctrl_seg, SEG_ID_PRE_SKIP);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+seg->last_active_segid = ctrl_seg->last_active_seg_id; + +for (i =0 ; i <V4L2_AV1_MAX_SEGMENTS ; i++) { +seg->feature_enabled_mask[i] = ctrl_seg-Quoted 1 line
feature_enabled[i];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+for (j =0 ; j <V4L2_AV1_SEG_LVL_MAX ; j++) +seg->feature_data[i][j] = ctrl_seg-Quoted 1 line
feature_data[i][j];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+} +} + +static void vdec_av1_slice_setup_quant(struct
vdec_av1_slice_quantization*quant,
+ structv4l2_av1_quantization*ctrl_quant)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+{ +quant->base_q_idx = ctrl_quant->base_q_idx; +quant->delta_qydc = ctrl_quant->delta_q_y_dc; +quant->delta_qudc = ctrl_quant->delta_q_u_dc; +quant->delta_quac = ctrl_quant->delta_q_u_ac; +quant->delta_qvdc = ctrl_quant->delta_q_v_dc; +quant->delta_qvac = ctrl_quant->delta_q_v_ac; +quant->qm_y = ctrl_quant->qm_y; +quant->qm_u = ctrl_quant->qm_u; +quant->qm_v = ctrl_quant->qm_v;Can a common struct be introduced to hold these parameters? And then copied in one go?
Maybe there's a good reason the code is the way it is now. However, a series of "dumb" assignments (no value modifications) makes me wonder.
Quoted 90 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+quant->using_qmatrix =QUANT_FLAG (ctrl_quant,USING_QMATRIX ); +} + +static int vdec_av1_slice_get_qindex(struct
vdec_av1_slice_uncompressed_header*uh,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+ int segmentation_id) +{ +struct vdec_av1_slice_seg *seg = &uh->seg; +struct vdec_av1_slice_quantization *quant = &uh->quant; +int data =0 , qindex =0 ; + +if (seg->segmentation_enabled && + (seg->feature_enabled_mask[segmentation_id] &
BIT(SEG_LVL_ALT_Q))) {
+data = seg-Quoted 1 line
feature_data[segmentation_id][SEG_LVL_ALT_Q];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+qindex = quant->base_q_idx + data; +return clamp_val (qindex,0 ,MAXQ ); +} + +return quant->base_q_idx; +} + +static void vdec_av1_slice_setup_lr(struct vdec_av1_slice_lr *lr, + struct
v4l2_av1_loop_restoration*ctrl_lr)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+{ +int i; + +lr->use_lr =0 ; +lr->use_chroma_lr =0 ; +for (i =0 ; i <V4L2_AV1_NUM_PLANES_MAX ; i++) { +lr->frame_restoration_type[i] = ctrl_lr-Quoted 1 line
frame_restoration_type[i];
+lr->loop_restoration_size[i] = ctrl_lr-
Quoted 1 line
loop_restoration_size[i];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+if (lr->frame_restoration_type[i]) { +lr->use_lr =1 ; +if (i >0 ) +lr->use_chroma_lr =1 ; +} +} +} + +static void vdec_av1_slice_setup_lf(struct
vdec_av1_slice_loop_filter*lf,
+ structv4l2_av1_loop_filter*ctrl_lf)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +11
-0+{ +int i; + +for (i =0 ; i <ARRAY_SIZE (lf->loop_filter_level); i++) +lf->loop_filter_level[i] = ctrl_lf->level[i]; + +for (i =0 ; i <V4L2_AV1_TOTAL_REFS_PER_FRAME ; i++) +lf->loop_filter_ref_deltas[i] = ctrl_lf->ref_deltas[i]; + +for (i =0 ; i <ARRAY_SIZE (lf->loop_filter_mode_deltas); i++) +lf->loop_filter_mode_deltas[i] = ctrl_lf-Quoted 1 line
mode_deltas[i];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ +lf->loop_filter_sharpness = ctrl_lf->sharpness; +lf->loop_filter_delta_enabled = + BIT_FLAG(ctrl_lf,
V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+} + +static void vdec_av1_slice_setup_cdef(struct vdec_av1_slice_cdef*cdef,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +16
-0+ struct v4l2_av1_cdef *ctrl_cdef) +{ +int i; + +cdef->cdef_damping = ctrl_cdef->damping_minus_3 +3 ; +cdef->cdef_bits = ctrl_cdef->bits; + +for (i =0 ; i <V4L2_AV1_CDEF_MAX ; i++) { +if (ctrl_cdef->y_sec_strength[i] ==4 ) +ctrl_cdef->y_sec_strength[i] -=1 ; + +if (ctrl_cdef->uv_sec_strength[i] ==4 ) +ctrl_cdef->uv_sec_strength[i] -=1 ; + +cdef->cdef_y_strength[i] = +ctrl_cdef->y_pri_strength[i] <<
SECONDARY_FILTER_STRENGTH_NUM_BITS|drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ctrl_cdef->y_sec_strength[i]; +cdef->cdef_uv_strength[i] = +ctrl_cdef->uv_pri_strength[i] <<
SECONDARY_FILTER_STRENGTH_NUM_BITS|drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 3 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ctrl_cdef->uv_sec_strength[i]; +} +}Both
vdec_av1_slice_setup_lf()andvdec_av1_slice_setup_cdef():I'm wondering if the user of struct
vdec_av1_slice_loop_filterand structvdec_av1_slice_cdefcould work with the uAPI variants of these structs? Is there
a need for driver-specific mutations? (Maybe there is, the driver's author
should know).Quoted 210 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ +static void vdec_av1_slice_setup_seq(struct
vdec_av1_slice_seq_header*seq,
+ structv4l2_ctrl_av1_sequence*ctrl_seq)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+{ +seq->bitdepth = ctrl_seq->bit_depth; +seq->max_frame_width = ctrl_seq->max_frame_width_minus_1 +1 ; +seq->max_frame_height = ctrl_seq->max_frame_height_minus_1 +1 ; +seq->enable_superres = SEQUENCE_FLAG(ctrl_seq,
ENABLE_SUPERRES);
+seq->enable_filter_intra =SEQUENCE_FLAG(ctrl_seq, ENABLE_FILTER_INTRA); +seq->enable_intra_edge_filter =SEQUENCE_FLAG(ctrl_seq, ENABLE_INTRA_EDGE_FILTER); +seq->enable_interintra_compound =SEQUENCE_FLAG(ctrl_seq, ENABLE_INTERINTRA_COMPOUND); +seq->enable_masked_compound =SEQUENCE_FLAG(ctrl_seq, ENABLE_MASKED_COMPOUND);
+seq->enable_dual_filter =SEQUENCE_FLAG(ctrl_seq, ENABLE_DUAL_FILTER);
+seq->enable_jnt_comp =SEQUENCE_FLAG(ctrl_seq, ENABLE_JNT_COMP);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+seq->mono_chrome =SEQUENCE_FLAG (ctrl_seq,MONO_CHROME ); +seq->enable_order_hint = SEQUENCE_FLAG(ctrl_seq,
ENABLE_ORDER_HINT);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+seq->order_hint_bits = ctrl_seq->order_hint_bits; +seq->use_128x128_superblock = SEQUENCE_FLAG(ctrl_seq,
USE_128X128_SUPERBLOCK);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+seq->subsampling_x =SEQUENCE_FLAG (ctrl_seq,SUBSAMPLING_X ); +seq->subsampling_y =SEQUENCE_FLAG (ctrl_seq,SUBSAMPLING_Y ); +} + +static void vdec_av1_slice_setup_tile(struct vdec_av1_slice_frame*frame,
+ structv4l2_av1_tile_info*ctrl_tile)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+{ +struct vdec_av1_slice_seq_header *seq = &frame->seq; +struct vdec_av1_slice_tile *tile = &frame->uh.tile; +u32 mib_size_log2 = seq->use_128x128_superblock ?5 :4 ; +int i; + +tile->tile_cols = ctrl_tile->tile_cols; +tile->tile_rows = ctrl_tile->tile_rows; +tile->context_update_tile_id = ctrl_tile-Quoted 1 line
context_update_tile_id;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+tile->uniform_tile_spacing_flag = +BIT_FLAG(ctrl_tile,
V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ +for (i =0 ; i < tile->tile_cols +1 ; i++) +tile->mi_col_starts[i] = +ALIGN(ctrl_tile->mi_col_starts[i],
BIT(mib_size_log2)) >>mib_size_log2;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ +for (i =0 ; i < tile->tile_rows +1 ; i++) +tile->mi_row_starts[i] = +ALIGN(ctrl_tile->mi_row_starts[i],
BIT(mib_size_log2)) >>mib_size_log2;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+} + +static void vdec_av1_slice_setup_uh(struct vdec_av1_slice_instance*instance,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+struct vdec_av1_slice_frame *frame, + struct v4l2_ctrl_av1_frame
*ctrl_fh)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +15
-0+{ +struct vdec_av1_slice_uncompressed_header *uh = &frame->uh; +int i; + +uh->use_ref_frame_mvs =FH_FLAG (ctrl_fh,USE_REF_FRAME_MVS ); +uh->order_hint = ctrl_fh->order_hint; +vdec_av1_slice_setup_gm (uh->gm, &ctrl_fh->global_motion); +uh->upscaled_width = ctrl_fh->upscaled_width; +uh->frame_width = ctrl_fh->frame_width_minus_1 +1 ; +uh->frame_height = ctrl_fh->frame_height_minus_1 +1 ; +uh->mi_cols = ((uh->frame_width +7 ) >>3 ) <<1 ; +uh->mi_rows = ((uh->frame_height +7 ) >>3 ) <<1 ; +uh->reduced_tx_set =FH_FLAG (ctrl_fh,REDUCED_TX_SET ); +uh->tx_mode = ctrl_fh->tx_mode; +uh->uniform_tile_spacing_flag = FH_FLAG(ctrl_fh,
UNIFORM_TILE_SPACING);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+uh->interpolation_filter = ctrl_fh->interpolation_filter; +uh->allow_warped_motion = FH_FLAG(ctrl_fh,
ALLOW_WARPED_MOTION);
+uh->is_motion_mode_switchable = FH_FLAG(ctrl_fh,IS_MOTION_MODE_SWITCHABLE);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+uh->frame_type = ctrl_fh->frame_type; +uh->frame_is_intra = (uh->frame_type ==
V4L2_AV1_INTRA_ONLY_FRAME||drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+ uh->frame_type == V4L2_AV1_KEY_FRAME); + +if (!uh->frame_is_intra &&FH_FLAG (ctrl_fh,REFERENCE_SELECT )) +uh->reference_mode =AV1_REFERENCE_MODE_SELECT ; +else +uh->reference_mode =AV1_SINGLE_REFERENCE ; + +uh->allow_high_precision_mv = FH_FLAG(ctrl_fh,
ALLOW_HIGH_PRECISION_MV);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+uh->allow_intra_bc =FH_FLAG (ctrl_fh,ALLOW_INTRABC ); +uh->force_integer_mv =FH_FLAG (ctrl_fh,FORCE_INTEGER_MV ); +uh->allow_screen_content_tools = FH_FLAG(ctrl_fh,
ALLOW_SCREEN_CONTENT_TOOLS);
+uh->error_resilient_mode = FH_FLAG(ctrl_fh,ERROR_RESILIENT_MODE);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+uh->primary_ref_frame = ctrl_fh->primary_ref_frame; +uh->disable_frame_end_update_cdf = +FH_FLAG (ctrl_fh,DISABLE_FRAME_END_UPDATE_CDF ); +uh->disable_cdf_update =FH_FLAG (ctrl_fh,DISABLE_CDF_UPDATE ); +uh->skip_mode.skip_mode_present = FH_FLAG(ctrl_fh,
SKIP_MODE_PRESENT);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+uh->skip_mode.skip_mode_frame[0 ] = +ctrl_fh->skip_mode_frame[0 ] -V4L2_AV1_REF_LAST_FRAME ; +uh->skip_mode.skip_mode_frame[1 ] = +ctrl_fh->skip_mode_frame[1 ] -V4L2_AV1_REF_LAST_FRAME ; +uh->skip_mode.skip_mode_allowed = ctrl_fh->skip_mode_frame[0] ?1 : 0;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ +vdec_av1_slice_setup_seg (&uh->seg, &ctrl_fh->segmentation); +uh->delta_q_lf.delta_q_present = QUANT_FLAG(&ctrl_fh-Quoted 1 line
quantization,
DELTA_Q_PRESENT);+uh->delta_q_lf.delta_q_res = 1 << ctrl_fh-
Quoted 1 line
quantization.delta_q_res;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+uh->delta_q_lf.delta_lf_present = +BIT_FLAG(&ctrl_fh->loop_filter,
V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_PRESENT);
+uh->delta_q_lf.delta_lf_res = ctrl_fh-Quoted 1 line
loop_filter.delta_lf_res;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+uh->delta_q_lf.delta_lf_multi = +BIT_FLAG(&ctrl_fh->loop_filter,
V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_MULTI);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+vdec_av1_slice_setup_quant (&uh->quant, &ctrl_fh->quantization); + +uh->coded_loss_less =1 ; +for (i = 0; i < V4L2_AV1_MAX_SEGMENTS; i++) { +uh->quant.qindex[i] = vdec_av1_slice_get_qindex(uh, i); +uh->loss_less_array[i] = +(uh->quant.qindex[i] == 0 && uh-Quoted 1 line
quant.delta_qydc == 0 &&
+uh->quant.delta_quac == 0 && uh-
Quoted 1 line
quant.delta_qudc == 0 &&
+uh->quant.delta_qvac == 0 && uh-
Quoted 1 line
quant.delta_qvdc == 0);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+ +if (!uh->loss_less_array[i]) +uh->coded_loss_less =0 ; +} + +vdec_av1_slice_setup_lr (&uh->lr, &ctrl_fh->loop_restoration); +uh->superres_denom = ctrl_fh->superres_denom; +vdec_av1_slice_setup_lf(&uh->loop_filter, &ctrl_fh-Quoted 1 line
loop_filter);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+vdec_av1_slice_setup_cdef (&uh->cdef, &ctrl_fh->cdef); +vdec_av1_slice_setup_tile (frame, &ctrl_fh->tile_info); +} + +static int vdec_av1_slice_setup_tile_group(struct
vdec_av1_slice_instance*instance,
+ structvdec_av1_slice_vsi
*vsi)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+{ +struct v4l2_ctrl_av1_tile_group_entry *ctrl_tge; +struct vdec_av1_slice_tile_group *tile_group = &instance-Quoted 1 line
tile_group;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+struct vdec_av1_slice_uncompressed_header *uh = &vsi->frame.uh; +struct vdec_av1_slice_tile *tile = &uh->tile; +struct v4l2_ctrl *ctrl; +u32 tge_size; +int i; + +ctrl = v4l2_ctrl_find(&instance->ctx->ctrl_hdl,
V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+if (!ctrl) +return -EINVAL ; + +tge_size = ctrl->elems; +ctrl_tge = (struct v4l2_ctrl_av1_tile_group_entry *)ctrl-Quoted 1 line
p_cur.p;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+ +tile_group->num_tiles = tile->tile_cols * tile->tile_rows; + +if (tile_group->num_tiles != tge_size || + tile_group->num_tiles >V4L2_AV1_MAX_TILE_COUNT ) { +mtk_vcodec_err(instance, "invalid tge_size %d,tile_num:%d\n",
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+ tge_size, tile_group->num_tiles); +return -EINVAL ; +} + +for (i = 0; i < tge_size; i++) { +if (i != ctrl_tge[i].tile_row * vsi-Quoted 1 line
frame.uh.tile.tile_cols +
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ ctrl_tge[i].tile_col) { +mtk_vcodec_err(instance, "invalid tge info %d,%d %d %d\n",
+ i, ctrl_tge[i].tile_row,
ctrl_tge[i].tile_col,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+ vsi->frame.uh.tile.tile_rows); +return -EINVAL ; +} +tile_group->tile_size[i] = ctrl_tge[i].tile_size; +tile_group->tile_start_offset[i] =ctrl_tge[i].tile_offset;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+} + +return 0 ; +} + +static void vdec_av1_slice_setup_state(struct vdec_av1_slice_vsiQuoted 1 line
*vsi)
static inline void?
Quoted 53 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+{ +memset (&vsi->state,0 ,sizeof (vsi->state)); +} + +static void vdec_av1_slice_setup_scale_factors(struct
vdec_av1_slice_frame_refs*frame_ref,
+ structvdec_av1_slice_frame_info*ref_frame_info,
+ structvdec_av1_slice_uncompressed_header*uh)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+{ +struct vdec_av1_slice_scale_factors *scale_factors =
&frame_ref->scale_factors;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+u32 ref_upscaled_width = ref_frame_info->upscaled_width; +u32 ref_frame_height = ref_frame_info->frame_height; +u32 frame_width = uh->frame_width; +u32 frame_height = uh->frame_height; + +if (!vdec_av1_slice_need_scale(ref_upscaled_width,
ref_frame_height,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+ frame_width, frame_height)) { +scale_factors->x_scale =-1 ; +scale_factors->y_scale =-1 ; +scale_factors->is_scaled =0 ; +return ; +} + +scale_factors->x_scale = +((ref_upscaled_width << AV1_REF_SCALE_SHIFT) +(
frame_width>> 1)) /frame_width;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+scale_factors->y_scale = +((ref_frame_height << AV1_REF_SCALE_SHIFT) +(
frame_height>> 1)) /frame_height;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+scale_factors->is_scaled = +(scale_factors->x_scale !=AV1_REF_INVALID_SCALE ) && +(scale_factors->y_scale !=AV1_REF_INVALID_SCALE ) && +(scale_factors->x_scale !=AV1_REF_NO_SCALE || + scale_factors->y_scale !=AV1_REF_NO_SCALE ); +scale_factors->x_step = +AV1_DIV_ROUND_UP_POW2(scale_factors->x_scale, + AV1_REF_SCALE_SHIFT -
AV1_SCALE_SUBPEL_BITS);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+scale_factors->y_step = +AV1_DIV_ROUND_UP_POW2(scale_factors->y_scale, + AV1_REF_SCALE_SHIFT -
AV1_SCALE_SUBPEL_BITS);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+} + +static int vdec_av1_slice_get_relative_dist(int a, int b, u8
enable_order_hint, u8order_hint_bits)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+{ +int diff =0 ; +int m =0 ;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+ +if (!enable_order_hint) +return 0 ; + +diff = a - b; +m =1 << (order_hint_bits -1 ); +diff = (diff & (m -1 )) - (diff & m); + +return diff; +}This function is called in one place only, and its result needs to be interpreted at call site. Can it return the result in a form expected at call site...
Quoted 46 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ +static void vdec_av1_slice_setup_ref(struct vdec_av1_slice_pfc*pfc,
+ structv4l2_ctrl_av1_frame*ctrl_fh)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +22
-0+{ +struct vdec_av1_slice_vsi *vsi = &pfc->vsi; +struct vdec_av1_slice_frame *frame = &vsi->frame; +struct vdec_av1_slice_slot *slots = &vsi->slots; +struct vdec_av1_slice_uncompressed_header *uh = &frame->uh; +struct vdec_av1_slice_seq_header *seq = &frame->seq; +struct vdec_av1_slice_frame_info *cur_frame_info = +&slots->frame_info[vsi->slot_id]; +struct vdec_av1_slice_frame_info *frame_info; +int i, slot_id; + +if (uh->frame_is_intra) +return ; + +for (i =0 ; i <V4L2_AV1_REFS_PER_FRAME ; i++) { +int ref_idx = ctrl_fh->ref_frame_idx[i]; + +pfc->ref_idx[i] = ctrl_fh->reference_frame_ts[ref_idx]; +slot_id = frame->ref_frame_map[ref_idx]; +frame_info = &slots->frame_info[slot_id]; +if (slot_id ==AV1_INVALID_IDX ) { +mtk_v4l2_err("cannot match reference[%d]0x%llx\n", i,
+ ctrl_fh-Quoted 1 line
reference_frame_ts[ref_idx]);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+frame->order_hints[i] =0 ; +frame->ref_frame_valid[i] =0 ; +continue ; +} + +frame->frame_refs[i].ref_fb_idx = slot_id; +vdec_av1_slice_setup_scale_factors(&frame-Quoted 1 line
frame_refs[i],
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+ frame_info, uh); +if (!seq->enable_order_hint) +frame->ref_frame_sign_bias[i +1 ] =0 ; +else +frame->ref_frame_sign_bias[i +1 ] = +vdec_av1_slice_get_relative_dist(frame_
info->order_hint,
+ uh-Quoted 6 lines
Quoted 1 line
order_hint,+ seq-
Quoted 1 line
enable_order_hint,+ seq-
Quoted 1 line
order_hint_bits)+<= 0 ? 0 : 1;
... to get rid of this tri-argument operator altogether?
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 13 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+ +frame->order_hints[i] = ctrl_fh->order_hints[i +1 ]; +cur_frame_info->order_hints[i] = frame->order_hints[i]; +frame->ref_frame_valid[i] =1 ; +} +} + +static void vdec_av1_slice_get_previous(struct vdec_av1_slice_vsi*vsi)
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+{ +struct vdec_av1_slice_frame *frame = &vsi->frame; + +if (frame->uh.primary_ref_frame ==7 )#define magic number 7?
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+frame->prev_fb_idx =AV1_INVALID_IDX ; +else +frame->prev_fb_idx = frame->frame_refs[frame-Quoted 1 line
uh.primary_ref_frame].ref_fb_idx;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+} + +static void vdec_av1_slice_setup_operating_mode(struct
vdec_av1_slice_instance*instance,
+structvdec_av1_slice_frame*frame)static inline void?
Quoted 24 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+{ +frame->large_scale_tile =0 ; +} + +static int vdec_av1_slice_setup_pfc(struct vdec_av1_slice_instance*instance,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +17
-0+ struct vdec_av1_slice_pfc *pfc) +{ +struct v4l2_ctrl_av1_frame *ctrl_fh; +struct v4l2_ctrl_av1_sequence *ctrl_seq; +struct vdec_av1_slice_vsi *vsi = &pfc->vsi; +int ret =0 ; + +/* frame header */ +ctrl_fh = (struct v4l2_ctrl_av1_frame *) +vdec_av1_get_ctrl_ptr (instance->ctx, +V4L2_CID_STATELESS_AV1_FRAME ); +if (IS_ERR (ctrl_fh)) +return PTR_ERR (ctrl_fh); + +ctrl_seq = (struct v4l2_ctrl_av1_sequence *) +vdec_av1_get_ctrl_ptr (instance->ctx, + V4L2_CID_STATELESS_AV1_SEQUENCE);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 2 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+if (IS_ERR (ctrl_seq)) +return PTR_ERR (ctrl_seq);Just to make sure: I assume request api is used? If so, does vdec's framework
ensure thatv4l2_ctrl_request_setup()has been called? It influences what's
actually inctrl->p_cur.p(current or previous value), and thevdec_av1_get_ctrl_ptr()wrapper returnsctrl->p_cur.p.Quoted 82 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +18
-0+ +/* setup vsi information */ +vdec_av1_slice_setup_seq (&vsi->frame.seq, ctrl_seq); +vdec_av1_slice_setup_uh (instance, &vsi->frame, ctrl_fh); +vdec_av1_slice_setup_operating_mode (instance, &vsi->frame); + +vdec_av1_slice_setup_state (vsi); +vdec_av1_slice_setup_slot (instance, vsi, ctrl_fh); +vdec_av1_slice_setup_ref (pfc, ctrl_fh); +vdec_av1_slice_get_previous (vsi); + +pfc->seq = instance->seq; +instance->seq++; + +return ret; +} + +static void vdec_av1_slice_setup_lat_buffer(struct
vdec_av1_slice_instance*instance,
+ structvdec_av1_slice_vsi
*vsi,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+struct mtk_vcodec_mem *bs, + struct vdec_lat_buf
*lat_buf)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +12
-0+{ +struct vdec_av1_slice_work_buffer *work_buffer; +int i; + +vsi->bs.dma_addr = bs->dma_addr; +vsi->bs.size = bs->size; + +vsi->ube.dma_addr = lat_buf->ctx->msg_queue.wdma_addr.dma_addr; +vsi->ube.size = lat_buf->ctx->msg_queue.wdma_addr.size; +vsi->trans.dma_addr = lat_buf->ctx->msg_queue.wdma_wptr_addr; +/* used to store trans end */ +vsi->trans.dma_addr_end = lat_buf->ctx-Quoted 1 line
msg_queue.wdma_rptr_addr;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +14
-0+vsi->err_map.dma_addr = lat_buf->wdma_err_addr.dma_addr; +vsi->err_map.size = lat_buf->wdma_err_addr.size; +vsi->rd_mv.dma_addr = lat_buf->rd_mv_addr.dma_addr; +vsi->rd_mv.size = lat_buf->rd_mv_addr.size; + +vsi->row_info.buf =0 ; +vsi->row_info.size =0 ; + +work_buffer = vsi->work_buffer; + +for (i =0 ; i <AV1_MAX_FRAME_BUF_COUNT ; i++) { +work_buffer[i].mv_addr.buf = instance->mv[i].dma_addr; +work_buffer[i].mv_addr.size = instance->mv[i].size; +work_buffer[i].segid_addr.buf = instance-Quoted 1 line
seg[i].dma_addr;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+work_buffer[i].segid_addr.size = instance->seg[i].size; +work_buffer[i].cdf_addr.buf = instance-Quoted 1 line
cdf[i].dma_addr;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+work_buffer[i].cdf_addr.size = instance->cdf[i].size; +} + +vsi->cdf_tmp.buf = instance->cdf_temp.dma_addr; +vsi->cdf_tmp.size = instance->cdf_temp.size; + +vsi->tile.buf = instance->tile.dma_addr; +vsi->tile.size = instance->tile.size; +memcpy(lat_buf->tile_addr.va, instance->tile.va, 64 * instance-Quoted 1 line
tile_group.num_tiles);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+ +vsi->cdf_table.buf = instance->cdf_table.dma_addr; +vsi->cdf_table.size = instance->cdf_table.size; +vsi->iq_table.buf = instance->iq_table.dma_addr; +vsi->iq_table.size = instance->iq_table.size; +} + +static void vdec_av1_slice_setup_seg_buffer(struct
vdec_av1_slice_instance*instance,
+ structvdec_av1_slice_vsi
*vsi)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+{ +struct vdec_av1_slice_uncompressed_header *uh = &vsi->frame.uh; +struct mtk_vcodec_mem *buf; + +/* reset segment buffer */ +if (uh->primary_ref_frame == 7 || !uh-Quoted 1 line
Quoted 1 line
seg.segmentation_enabled) {
#define magic 7?
Quoted 245 lines
+mtk_vcodec_debug(instance, "reset seg %d\n", vsi-
Quoted 1 line
slot_id);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+if (vsi->slot_id !=AV1_INVALID_IDX ) { +buf = &instance->seg[vsi->slot_id]; +memset (buf->va,0 , buf->size); +} +} +} + +static void vdec_av1_slice_setup_tile_buffer(struct
vdec_av1_slice_instance*instance,
+ structvdec_av1_slice_vsi
*vsi,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ struct mtk_vcodec_mem *bs) +{ +struct vdec_av1_slice_tile_group *tile_group = &instance-Quoted 1 line
tile_group;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +14
-0+struct vdec_av1_slice_uncompressed_header *uh = &vsi->frame.uh; +struct vdec_av1_slice_tile *tile = &uh->tile; +u32 tile_num, tile_row, tile_col; +u32 allow_update_cdf =0 ; +u32 sb_boundary_x_m1 =0 , sb_boundary_y_m1 =0 ; +int tile_info_base; +u32 tile_buf_pa; +u32 *tile_info_buf = instance->tile.va; +u32 pa = (u32 )bs->dma_addr; + +if (uh->disable_cdf_update ==0 ) +allow_update_cdf =1 ; + +for (tile_num = 0; tile_num < tile_group->num_tiles;tile_num++) {
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+/* each uint32 takes place of 4 bytes */ +tile_info_base = (AV1_TILE_BUF_SIZE * tile_num) >>2 ; +tile_row = tile_num / tile->tile_cols; +tile_col = tile_num % tile->tile_cols; +tile_info_buf[tile_info_base + 0] = (tile_group-Quoted 1 line
tile_size[tile_num] << 3);
+tile_buf_pa = pa + tile_group-
Quoted 1 line
tile_start_offset[tile_num];
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ +tile_info_buf[tile_info_base +1 ] = (tile_buf_pa >>4 )<< 4;
+tile_info_buf[tile_info_base + 2] = (tile_buf_pa% 16) << 3;drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ +sb_boundary_x_m1 = +(tile->mi_col_starts[tile_col + 1] - tile-Quoted 1 line
mi_col_starts[tile_col] - 1) &
+0x3f;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+sb_boundary_y_m1 = +(tile->mi_row_starts[tile_row + 1] - tile-Quoted 1 line
mi_row_starts[tile_row] - 1) &
+0x1ff;
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ +tile_info_buf[tile_info_base + 3] = (sb_boundary_y_m1<< 7) |
sb_boundary_x_m1; +tile_info_buf[tile_info_base + 4] = ((allow_update_cdf<< 18) | (1 << 16));drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+ +if (tile_num == tile->context_update_tile_id && + uh->disable_frame_end_update_cdf ==0 ) +tile_info_buf[tile_info_base +4 ] |= (1 <<17 ); + +mtk_vcodec_debug(instance, "// tile buf %d pos(%dx%d)offset 0x%x\n",
+tile_num,tile_row,tile_col,tile_info_base);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +14
-0+mtk_vcodec_debug (instance,"// %08x %08x %08x %08x\n" , + tile_info_buf[tile_info_base +0 ], + tile_info_buf[tile_info_base +1 ], + tile_info_buf[tile_info_base +2 ], + tile_info_buf[tile_info_base +3 ]); +mtk_vcodec_debug (instance,"// %08x %08x %08x %08x\n" , + tile_info_buf[tile_info_base +4 ], + tile_info_buf[tile_info_base +5 ], + tile_info_buf[tile_info_base +6 ], + tile_info_buf[tile_info_base +7 ]); +} +} + +static int vdec_av1_slice_setup_lat(struct vdec_av1_slice_instance*instance,
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+struct mtk_vcodec_mem *bs, + struct vdec_lat_buf *lat_buf, + struct vdec_av1_slice_pfc *pfc) +{ +struct vdec_av1_slice_vsi *vsi = &pfc->vsi; +int ret; + +ret = vdec_av1_slice_setup_lat_from_src_buf(instance, vsi,
lat_buf);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +23
-0+if (ret) +return ret; + +ret =vdec_av1_slice_setup_pfc (instance, pfc); +if (ret) +return ret; + +ret =vdec_av1_slice_setup_tile_group (instance, vsi); +if (ret) +return ret; + +ret =vdec_av1_slice_alloc_working_buffer (instance, vsi); +if (ret) +return ret; + +vdec_av1_slice_setup_seg_buffer (instance, vsi); +vdec_av1_slice_setup_tile_buffer (instance, vsi, bs); +vdec_av1_slice_setup_lat_buffer (instance, vsi, bs, lat_buf); + +return 0 ; +} + +static int vdec_av1_slice_update_lat(struct
vdec_av1_slice_instance*instance,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+struct vdec_lat_buf *lat_buf, + struct vdec_av1_slice_pfc *pfc) +{ +struct vdec_av1_slice_vsi *vsi; + +vsi = &pfc->vsi; +mtk_vcodec_debug(instance, "frame %u LAT CRC 0x%08x, outputsize is %d\n",
+pfc->seq, vsi->state.crc[0], vsi-Quoted 1 line
state.out_size);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+ +/* buffer full, need to re-decode */ +if (vsi->state.full) { +/* buffer not enough */ +if (vsi->trans.dma_addr_end - vsi->trans.dma_addr ==
vsi->ube.size)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +12
-0+return -ENOMEM ; +return -EAGAIN ; +} + +instance->width = vsi->frame.uh.upscaled_width; +instance->height = vsi->frame.uh.frame_height; +instance->frame_type = vsi->frame.uh.frame_type; + +return 0 ; +} + +static int vdec_av1_slice_setup_core_to_dst_buf(struct
vdec_av1_slice_instance*instance,
+structvdec_lat_buf*lat_buf)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +13
-0+{ +struct vb2_v4l2_buffer *dst; + +dst =v4l2_m2m_next_dst_buf (instance->ctx->m2m_ctx); +if (!dst) +return -EINVAL ; + +v4l2_m2m_buf_copy_metadata (&lat_buf->ts_info, dst, true); + +return 0 ; +} + +static int vdec_av1_slice_setup_core_buffer(struct
vdec_av1_slice_instance*instance,
+ structvdec_av1_slice_pfc
*pfc,
+ structvdec_av1_slice_vsi
*vsi,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+struct vdec_fb *fb, + struct vdec_lat_buf
*lat_buf)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+{ +struct vb2_buffer *vb; +struct vb2_queue *vq; +int w, h, plane, size; +int i; + +plane = instance->ctx->q_data[MTK_Q_DATA_DST ].fmt->num_planes; +w = vsi->frame.uh.upscaled_width; +h = vsi->frame.uh.frame_height; +size = ALIGN(w, VCODEC_DEC_ALIGNED_64) * ALIGN(h,
VCODEC_DEC_ALIGNED_64);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+ +/* frame buffer */ +vsi->fb.y.dma_addr = fb->base_y.dma_addr; +if (plane ==1 ) +vsi->fb.c.dma_addr = fb->base_y.dma_addr + size; +else +vsi->fb.c.dma_addr = fb->base_c.dma_addr; + +/* reference buffers */ +vq = v4l2_m2m_get_vq(instance->ctx->m2m_ctx,
V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +19
-0+if (!vq) +return -EINVAL ; + +/* get current output buffer */ +vb = &v4l2_m2m_next_dst_buf (instance->ctx->m2m_ctx)->vb2_buf; +if (!vb) +return -EINVAL ; + +/* get buffer address from vb2buf */ +for (i =0 ; i <V4L2_AV1_REFS_PER_FRAME ; i++) { +struct vdec_av1_slice_fb *vref = &vsi->ref[i]; + +vb =vb2_find_buffer (vq, pfc->ref_idx[i]); +if (!vb) { +memset (vref,0 ,sizeof (*vref)); +continue ; +} + +vref->y.dma_addr = vb2_dma_contig_plane_dma_addr(vb,0);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+if (plane ==1 ) +vref->c.dma_addr = vref->y.dma_addr + size; +else +vref->c.dma_addr =
vb2_dma_contig_plane_dma_addr(vb, 1);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+} +vsi->tile.dma_addr = lat_buf->tile_addr.dma_addr; +vsi->tile.size = lat_buf->tile_addr.size; + +return 0 ; +} + +static int vdec_av1_slice_setup_core(struct
vdec_av1_slice_instance*instance,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +12
-0+struct vdec_fb *fb, + struct vdec_lat_buf *lat_buf, + struct vdec_av1_slice_pfc *pfc) +{ +struct vdec_av1_slice_vsi *vsi = &pfc->vsi; +int ret; + +ret =vdec_av1_slice_setup_core_to_dst_buf (instance, lat_buf); +if (ret) +return ret; + +ret = vdec_av1_slice_setup_core_buffer(instance, pfc, vsi, fb,
lat_buf);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+if (ret) +return ret; + +return 0 ; +} + +static int vdec_av1_slice_update_core(struct
vdec_av1_slice_instance*instance,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 6 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+struct vdec_lat_buf *lat_buf, + struct vdec_av1_slice_pfc *pfc) +{ +struct vdec_av1_slice_vsi *vsi = instance->core_vsi; + +/* TODO: Do something here, or remove this function entirely */ And?
Quoted 61 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ +mtk_vcodec_debug(instance, "frame %u Y_CRC %08x %08x %08x%08x\n",
+pfc->seq, vsi->state.crc[0], vsi-Quoted 1 line
state.crc[1],
+ vsi->state.crc[2], vsi->state.crc[3]); +mtk_vcodec_debug(instance, "frame %u
C_CRC%08x %08x %08x %08x\n",
+pfc->seq, vsi->state.crc[8], vsi-Quoted 1 line
state.crc[9],
+ vsi->state.crc[10], vsi->state.crc[11]);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +23
-0+ +return 0 ; +} + +static int vdec_av1_slice_init (struct mtk_vcodec_ctx *ctx) +{ +struct vdec_av1_slice_instance *instance; +struct vdec_av1_slice_init_vsi *vsi; +int ret; + +instance =kzalloc (sizeof (*instance),GFP_KERNEL ); +if (!instance) +return -ENOMEM ; + +instance->ctx = ctx; +instance->vpu.id =SCP_IPI_VDEC_LAT ; +instance->vpu.core_id =SCP_IPI_VDEC_CORE ; +instance->vpu.ctx = ctx; +instance->vpu.codec_type = ctx->current_codec; + +ret =vpu_dec_init (&instance->vpu); +if (ret) { +mtk_vcodec_err(instance, "failed to init vpu dec, ret%d\n", ret);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +12
-0+goto error_vpu_init; +} + +/* init vsi and global flags */ +vsi = instance->vpu.vsi; +if (!vsi) { +mtk_vcodec_err (instance,"failed to get AV1 vsi\n" ); +ret = -EINVAL ; +goto error_vsi; +} +instance->init_vsi = vsi; +instance->core_vsi = mtk_vcodec_fw_map_dm_addr(ctx->dev-Quoted 1 line
fw_handler, (u32)vsi->core_vsi);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ +if (!instance->core_vsi) { +mtk_vcodec_err(instance, "failed to get AV1 corevsi\n");
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+ret = -EINVAL ; +goto error_vsi; +} + +if (vsi->vsi_size !=sizeof (struct vdec_av1_slice_vsi )) +mtk_vcodec_err(instance, "remote vsi size 0x%xmismatch! expected: 0x%lx\n",
+vsi->vsi_size, sizeof(structvdec_av1_slice_vsi));drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 2 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ +instance->irq =1 ;Does this mean "
irq_enabled"? If so, rename?Quoted 13 lines
+instance->inneracing_mode = IS_VDEC_INNER_RACING(instance->ctx-
Quoted 1 line
dev->dec_capability);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ +mtk_vcodec_debug(instance, "vsi 0x%p core_vsi 0x%llx 0x%p,
inneracing_mode%d\n",
+ vsi,vsi->core_vsi,instance->core_vsi,instance->inneracing_mode);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+ +ret =vdec_av1_slice_init_cdf_table (instance); +if (ret) +goto error_vsi; + +ret =vdec_av1_slice_init_iq_table (instance);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 10 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+if (ret) +goto error_vsi; + +ctx->drv_handle = instance; + +return 0 ; +error_vsi: +vpu_dec_deinit (&instance->vpu); +error_vpu_init: +kfree (instance);newline?
Quoted 29 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +13
-0+return ret; +} + +static void vdec_av1_slice_deinit (void *h_vdec) +{ +struct vdec_av1_slice_instance *instance = h_vdec; + +if (!instance) +return ; +mtk_vcodec_debug (instance,"h_vdec 0x%p\n" , h_vdec); +vpu_dec_deinit (&instance->vpu); +vdec_av1_slice_free_working_buffer (instance); +vdec_msg_queue_deinit(&instance->ctx->msg_queue, instance-Quoted 1 line
ctx);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+kfree (instance); +} + +static int vdec_av1_slice_flush(void *h_vdec, struct
mtk_vcodec_mem*bs,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +9
-0+struct vdec_fb *fb, bool *res_chg) +{ +struct vdec_av1_slice_instance *instance = h_vdec; +int i; + +mtk_vcodec_debug (instance,"flush ...\n" ); + +for (i = 0; i < AV1_MAX_FRAME_BUF_COUNT; i++) +vdec_av1_slice_clear_fb(&instance-Quoted 1 line
slots.frame_info[i]);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
Quoted 2 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ +vdec_msg_queue_wait_lat_buf_full (&instance->ctx->msg_queue);newline?
Quoted 26 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+return vpu_dec_reset (&instance->vpu); +} + +static void vdec_av1_slice_get_pic_info(struct
vdec_av1_slice_instance*instance)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+{ +struct mtk_vcodec_ctx *ctx = instance->ctx; +u32 data[3 ]; + +mtk_vcodec_debug(instance, "w %u h %u\n", ctx->picinfo.pic_w,
ctx->picinfo.pic_h);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+ +data[0 ] = ctx->picinfo.pic_w; +data[1 ] = ctx->picinfo.pic_h; +data[2 ] = ctx->capture_fourcc; +vpu_dec_get_param (&instance->vpu, data,3 ,GET_PARAM_PIC_INFO ); + +ctx->picinfo.buf_w = ALIGN(ctx->picinfo.pic_w,
VCODEC_DEC_ALIGNED_64);
+ctx->picinfo.buf_h = ALIGN(ctx->picinfo.pic_h,VCODEC_DEC_ALIGNED_64);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+ctx->picinfo.fb_sz[0 ] = instance->vpu.fb_sz[0 ]; +ctx->picinfo.fb_sz[1 ] = instance->vpu.fb_sz[1 ]; +} + +static void vdec_av1_slice_get_dpb_size(structQuoted 1 line
vdec_av1_slice_instance*instance, u32*dpb_sz)static inline void?
Quoted 75 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+{ +/* refer av1 specification */ +*dpb_sz =V4L2_AV1_TOTAL_REFS_PER_FRAME +1 ; +} + +static void vdec_av1_slice_get_crop_info(struct
vdec_av1_slice_instance*instance,
+ structv4l2_rect*cr)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +13
-0+{ +struct mtk_vcodec_ctx *ctx = instance->ctx; + +cr->left =0 ; +cr->top =0 ; +cr->width = ctx->picinfo.pic_w; +cr->height = ctx->picinfo.pic_h; + +mtk_vcodec_debug (instance,"l=%d, t=%d, w=%d, h=%d\n" , + cr->left, cr->top, cr->width, cr->height); +} + +static int vdec_av1_slice_get_param(void *h_vdec, enum
vdec_get_param_typetype, void *out)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +15
-0+{ +struct vdec_av1_slice_instance *instance = h_vdec; + +switch (type) { +case GET_PARAM_PIC_INFO : +vdec_av1_slice_get_pic_info (instance); +break ; +case GET_PARAM_DPB_SIZE : +vdec_av1_slice_get_dpb_size (instance, out); +break ; +case GET_PARAM_CROP_INFO : +vdec_av1_slice_get_crop_info (instance, out); +break ; +default : +mtk_vcodec_err(instance, "invalid get parametertype=%d\n", type);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+return -EINVAL ; +} + +return 0 ; +} + +static int vdec_av1_slice_lat_decode(void *h_vdec, struct
mtk_vcodec_mem*bs,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +16
-0+ struct vdec_fb *fb, bool *res_chg) +{ +struct vdec_av1_slice_instance *instance = h_vdec; +struct vdec_lat_buf *lat_buf; +struct vdec_av1_slice_pfc *pfc; +struct vdec_av1_slice_vsi *vsi; +struct mtk_vcodec_ctx *ctx; +int ret; + +if (!instance || !instance->ctx) +return -EINVAL ; + +ctx = instance->ctx; +/* init msgQ for the first time */ +if (vdec_msg_queue_init(&ctx->msg_queue, ctx, +vdec_av1_slice_core_decode,
sizeof(*pfc))) {
+mtk_vcodec_err(instance, "failed to init AV1 msg
queue\n");drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+return -ENOMEM ; +} + +/* bs NULL means flush decoder */ +if (!bs) +return vdec_av1_slice_flush (h_vdec, bs, fb, res_chg); + +lat_buf =vdec_msg_queue_dqbuf (&ctx->msg_queue.lat_ctx); +if (!lat_buf) { +mtk_vcodec_err(instance, "failed to get AV1 latQuoted 1 line
buf\n");
there exists
vdec_msg_queue_deinit(). Should it be called in this (and subsequent) error recovery path(s)?Quoted 289 lines
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +12
-0+return -EBUSY ; +} +pfc = (struct vdec_av1_slice_pfc *)lat_buf->private_data; +if (!pfc) { +ret = -EINVAL ; +goto err_free_fb_out; +} +vsi = &pfc->vsi; + +ret =vdec_av1_slice_setup_lat (instance, bs, lat_buf, pfc); +if (ret) { +mtk_vcodec_err(instance, "failed to setup AV1 lat ret%d\n", ret);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+goto err_free_fb_out; +} + +vdec_av1_slice_vsi_to_remote (vsi, instance->vsi); +ret =vpu_dec_start (&instance->vpu,NULL ,0 ); +if (ret) { +mtk_vcodec_err(instance, "failed to dec AV1 ret %d\n",ret);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+goto err_free_fb_out; +} +if (instance->inneracing_mode) +vdec_msg_queue_qbuf(&ctx->dev->msg_queue_core_ctx,
lat_buf);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ +if (instance->irq) { +ret = mtk_vcodec_wait_for_done_ctx(ctx,
MTK_INST_IRQ_RECEIVED,
+WAIT_INTR_TIMEOUT_MS
,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ MTK_VDEC_LAT0); +/* update remote vsi if decode timeout */ +if (ret) { +mtk_vcodec_err(instance, "AV1 Frame %d decodetimeout %d\n",
pfc->seq, ret);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +11
-0+WRITE_ONCE (instance->vsi->state.timeout,1 ); +} +vpu_dec_end (&instance->vpu); +} + +vdec_av1_slice_vsi_from_remote (vsi, instance->vsi); +ret =vdec_av1_slice_update_lat (instance, lat_buf, pfc); + +/* LAT trans full, re-decode */ +if (ret == -EAGAIN ) { +mtk_vcodec_err(instance, "AV1 Frame %d trans full\n",
pfc->seq);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+if (!instance->inneracing_mode) +vdec_msg_queue_qbuf(&ctx->msg_queue.lat_ctx,
lat_buf);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+return 0 ; +} + +/* LAT trans full, no more UBE or decode timeout */ +if (ret == -ENOMEM || vsi->state.timeout) { +mtk_vcodec_err(instance, "AV1 Frame %d insufficientbuffer or timeout\n",
pfc->seq);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+if (!instance->inneracing_mode) +vdec_msg_queue_qbuf(&ctx->msg_queue.lat_ctx,
lat_buf);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +5
-0+return -EBUSY ; +} +vsi->trans.dma_addr_end += ctx->msg_queue.wdma_addr.dma_addr; +mtk_vcodec_debug(instance, "lat dma 1 0x%llx 0x%llx\n", + pfc->vsi.trans.dma_addr, pfc-Quoted 1 line
vsi.trans.dma_addr_end);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ +vdec_msg_queue_update_ube_wptr(&ctx->msg_queue, vsi-Quoted 1 line
trans.dma_addr_end);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ +if (!instance->inneracing_mode) +vdec_msg_queue_qbuf(&ctx->dev->msg_queue_core_ctx,
lat_buf);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +7
-0+memcpy (&instance->slots, &vsi->slots,sizeof (instance->slots)); + +return 0 ; + +err_free_fb_out: +vdec_msg_queue_qbuf (&ctx->msg_queue.lat_ctx, lat_buf); +mtk_vcodec_err(instance, "slice dec number: %d err: %d", pfc-Quoted 1 line
seq, ret);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+return ret; +} + +static int vdec_av1_slice_core_decode(struct vdec_lat_buf
*lat_buf)drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +28
-0+{ +struct vdec_av1_slice_instance *instance; +struct vdec_av1_slice_pfc *pfc; +struct mtk_vcodec_ctx *ctx =NULL ; +struct vdec_fb *fb =NULL ; +int ret = -EINVAL ; + +if (!lat_buf) +return -EINVAL ; + +pfc = lat_buf->private_data; +ctx = lat_buf->ctx; +if (!pfc || !ctx) +return -EINVAL ; + +instance = ctx->drv_handle; +if (!instance) +goto err; + +fb = ctx->dev->vdec_pdata->get_cap_buffer (ctx); +if (!fb) { +ret = -EBUSY ; +goto err; +} + +ret =vdec_av1_slice_setup_core (instance, fb, lat_buf, pfc); +if (ret) { +mtk_vcodec_err(instance,"vdec_av1_slice_setup_core\n");
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +11
-0+goto err; +} +vdec_av1_slice_vsi_to_remote (&pfc->vsi, instance->core_vsi); +ret =vpu_dec_core (&instance->vpu); +if (ret) { +mtk_vcodec_err (instance,"vpu_dec_core\n" ); +goto err; +} + +if (instance->irq) { +ret = mtk_vcodec_wait_for_done_ctx(ctx,
MTK_INST_IRQ_RECEIVED,
+WAIT_INTR_TIMEOUT_MS
,drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +4
-0+ MTK_VDEC_CORE); +/* update remote vsi if decode timeout */ +if (ret) { +mtk_vcodec_err(instance, "AV1 frame %d coretimeout\n",
pfc->seq);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +8
-0+WRITE_ONCE (instance->vsi->state.timeout,1 ); +} +vpu_dec_core_end (&instance->vpu); +} + +ret =vdec_av1_slice_update_core (instance, lat_buf, pfc); +if (ret) { +mtk_vcodec_err(instance,"vdec_av1_slice_update_core\n");
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+goto err; +} + +mtk_vcodec_debug (instance,"core dma_addr_end 0x%llx\n" , + instance->core_vsi->trans.dma_addr_end); +vdec_msg_queue_update_ube_rptr(&ctx->msg_queue, instance-Quoted 1 line
core_vsi->trans.dma_addr_end);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +2
-0+ +ctx->dev->vdec_pdata->cap_to_disp(ctx, 0, lat_buf-Quoted 1 line
src_buf_req);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +6
-0+ +return 0 ; + +err: +/* always update read pointer */ +vdec_msg_queue_update_ube_rptr(&ctx->msg_queue, pfc-Quoted 1 line
vsi.trans.dma_addr_end);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +3
-0+ +if (fb) +ctx->dev->vdec_pdata->cap_to_disp(ctx, 1, lat_buf-Quoted 1 line
src_buf_req);drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +10
-0+ +return ret; +} + +const struct vdec_common_if vdec_av1_slice_lat_if = { +.init= vdec_av1_slice_init, +.decode= vdec_av1_slice_lat_decode, +.get_param= vdec_av1_slice_get_param, +.deinit= vdec_av1_slice_deinit, +};drivers/media/platform/mediatek/vcodec/vdec_drv_if.c +4
-0@@ -49,6 +49,10 @@ int vdec_if_init(struct mtk_vcodec_ctx *ctx, unsigned int fourcc) ctx->dec_if = &vdec_vp9_slice_lat_if; ctx->hw_id =IS_VDEC_LAT_ARCH (hw_arch) ?MTK_VDEC_LAT0 :MTK_VDEC_CORE ;break ; +case V4L2_PIX_FMT_AV1_FRAME : +ctx->dec_if = &vdec_av1_slice_lat_if; +ctx->hw_id =MTK_VDEC_LAT0 ; +break ;default :return -EINVAL; }drivers/media/platform/mediatek/vcodec/vdec_drv_if.h +1
-0@@ -61,6 +61,7 @@ extern const struct vdec_common_if vdec_vp8_if;extern const struct vdec_common_if vdec_vp8_slice_if;extern const struct vdec_common_if vdec_vp9_if;extern const struct vdec_common_if vdec_vp9_slice_lat_if; +extern const struct vdec_common_if vdec_av1_slice_lat_if;/** * vdec_if_init() - initialize decode driver diff --git
a/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.cb/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.cindexae500980ad45c..05b54b0e3f2d2100644drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c +3
-0@@ -20,6 +20,9 @@/* the size used to store avc error information */ #define VDEC_ERR_MAP_SZ_AVC (17 * SZ_1K) +#define VDEC_RD_MV_BUFFER_SZ (((SZ_4K * 2304 >> 4) + SZ_1K) << 1) +#define VDEC_LAT_TILE_SZ (64 * SZ_4K) +/* core will read the trans buffer which decoded by lat to decode again.
* The trans buffer size of FHD and 4K bitstreams are different. */drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c +8
-0@@ -194,6 +197,14 @@ void vdec_msg_queue_deinit(struct vdec_msg_queue *msg_queue, if (mem->va)mtk_vcodec_mem_free (ctx, mem); +mem = &lat_buf->rd_mv_addr; +if (mem->va) +mtk_vcodec_mem_free (ctx, mem); + +mem = &lat_buf->tile_addr; +if (mem->va) +mtk_vcodec_mem_free (ctx, mem); +kfree (lat_buf->private_data); }}drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c +5
-0@@ -270,6 +281,22 @@ int vdec_msg_queue_init(struct vdec_msg_queue *msg_queue, goto mem_alloc_err; } +if (ctx->current_codec ==V4L2_PIX_FMT_AV1_FRAME ) { +lat_buf->rd_mv_addr.size =VDEC_RD_MV_BUFFER_SZ ; +err =mtk_vcodec_mem_alloc (ctx, &lat_buf- >rd_mv_addr); +if (err) { +mtk_v4l2_err("failed to allocate
rd_mv_addrbuf[%d]", i);drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c +5
-0+return -ENOMEM ; +} + +lat_buf->tile_addr.size =VDEC_LAT_TILE_SZ ; +err = mtk_vcodec_mem_alloc(ctx, &lat_buf-Quoted 1 line
tile_addr);drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c +2
-0+if (err) { +mtk_v4l2_err("failed to allocate
tile_addrbuf[%d]", i);drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c +4
-0+return -ENOMEM ; +} +} + lat_buf->private_data = kzalloc(private_size,
GFP_KERNEL);
if (!lat_buf->private_data) {
err =-ENOMEM;
diff --gita/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.hb/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.hindexc43d427f5f544..525170e411ee0100644drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h +0
-0@@ -42,6 +42,8 @@ struct vdec_msg_queue_ctx {* struct vdec_lat_buf - lat buffer message used to store lat info for core decode
* @wdma_err_addr: wdma error address used for lat hardware
* @slice_bc_addr: slice bc address used for lat hardware
+ * @rd_mv_addr:mv addr for av1 lat hardware output, core hardware input
+ * @tile_addr:tile buffer for av1 core input
* @ts_info: need to set timestamp from output to capture
* @src_buf_req: output buffer media request object *drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h +0
-0@@ -54,6 +56,8 @@ struct vdec_msg_queue_ctx {Quoted 10 lines
drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h struct vdec_msg_queue_ctx { · line 63
Quoted 8 lines
drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h +2
-0struct vdec_lat_buf {struct mtk_vcodec_mem wdma_err_addr;struct mtk_vcodec_mem slice_bc_addr; +struct mtk_vcodec_mem rd_mv_addr; +struct mtk_vcodec_mem tile_addr;struct vb2_v4l2_buffer ts_info;struct media_request *src_buf_req;************* MEDIATEK Confidentiality Notice
********************
The information contained in this e-mail message (including any attachments) may be confidential, proprietary, privileged, or otherwise exempt from disclosure under applicable laws. It is intended to be conveyed only to the designated recipient(s). Any use, dissemination, distribution, printing, retaining or copying of this e-mail (including its attachments) by unintended recipient(s) is strictly prohibited and may be unlawful. If you are not an intended recipient of this e-mail, or believethat you have received this e-mail in error, please notify the sender immediately (by replying to this e-mail), delete any and all copies of this e-mail (including any attachments) from your system, and do not disclose the content of this e-mail to any other person. Thank you!