[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202212200426.f80D0BZG-lkp@intel.com>
Date: Tue, 20 Dec 2022 04:47:12 +0800
From: kernel test robot <lkp@...el.com>
To: Benjamin Gaignard <benjamin.gaignard@...labora.com>,
ezequiel@...guardiasur.com.ar, p.zabel@...gutronix.de,
mchehab@...nel.org, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, heiko@...ech.de,
daniel.almeida@...labora.com, nicolas.dufresne@...labora.co.uk
Cc: oe-kbuild-all@...ts.linux.dev, linux-media@...r.kernel.org,
linux-rockchip@...ts.infradead.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
kernel@...labora.com,
Benjamin Gaignard <benjamin.gaignard@...labora.com>
Subject: Re: [PATCH v1 8/9] media: verisilicon: Add film grain feature to AV1
driver
Hi Benjamin,
I love your patch! Yet something to improve:
[auto build test ERROR on media-tree/master]
[also build test ERROR on rockchip/for-next linus/master v6.1 next-20221219]
[cannot apply to pza/reset/next pza/imx-drm/next]
[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/Benjamin-Gaignard/AV1-stateless-decoder-for-RK3588/20221220-000013
base: git://linuxtv.org/media_tree.git master
patch link: https://lore.kernel.org/r/20221219155616.848690-9-benjamin.gaignard%40collabora.com
patch subject: [PATCH v1 8/9] media: verisilicon: Add film grain feature to AV1 driver
config: sh-allmodconfig
compiler: sh4-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/1b1eef6495c773e2dc6d46bd255d81b43ede61df
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Benjamin-Gaignard/AV1-stateless-decoder-for-RK3588/20221220-000013
git checkout 1b1eef6495c773e2dc6d46bd255d81b43ede61df
# 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=sh olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash drivers/media/platform/verisilicon/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
1103 | loop_filter->ref_deltas[7]);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1105:45: error: invalid use of undefined type 'const struct v4l2_av1_loop_filter'
1105 | loop_filter->mode_deltas[0]);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1107:45: error: invalid use of undefined type 'const struct v4l2_av1_loop_filter'
1107 | loop_filter->mode_deltas[1]);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c: In function 'rockchip_vpu981_av1_dec_update_prob':
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1130:45: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_frame'
1130 | bool frame_is_intra = IS_INTRA(frame->frame_type);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:46:26: note: in definition of macro 'IS_INTRA'
46 | #define IS_INTRA(type) ((type == V4L2_AV1_KEY_FRAME) || (type == V4L2_AV1_INTRA_ONLY_FRAME))
| ^~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:46:34: error: 'V4L2_AV1_KEY_FRAME' undeclared (first use in this function)
46 | #define IS_INTRA(type) ((type == V4L2_AV1_KEY_FRAME) || (type == V4L2_AV1_INTRA_ONLY_FRAME))
| ^~~~~~~~~~~~~~~~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1130:31: note: in expansion of macro 'IS_INTRA'
1130 | bool frame_is_intra = IS_INTRA(frame->frame_type);
| ^~~~~~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1130:45: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_frame'
1130 | bool frame_is_intra = IS_INTRA(frame->frame_type);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:46:58: note: in definition of macro 'IS_INTRA'
46 | #define IS_INTRA(type) ((type == V4L2_AV1_KEY_FRAME) || (type == V4L2_AV1_INTRA_ONLY_FRAME))
| ^~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:46:66: error: 'V4L2_AV1_INTRA_ONLY_FRAME' undeclared (first use in this function)
46 | #define IS_INTRA(type) ((type == V4L2_AV1_KEY_FRAME) || (type == V4L2_AV1_INTRA_ONLY_FRAME))
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1130:31: note: in expansion of macro 'IS_INTRA'
1130 | bool frame_is_intra = IS_INTRA(frame->frame_type);
| ^~~~~~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1134:18: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_frame'
1134 | if (frame->flags & V4L2_AV1_FRAME_FLAG_DISABLE_FRAME_END_UPDATE_CDF)
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1134:28: error: 'V4L2_AV1_FRAME_FLAG_DISABLE_FRAME_END_UPDATE_CDF' undeclared (first use in this function)
1134 | if (frame->flags & V4L2_AV1_FRAME_FLAG_DISABLE_FRAME_END_UPDATE_CDF)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1138:26: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_frame'
1138 | if (frame->refresh_frame_flags & (1 << i)) {
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1149:54: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_frame'
1149 | frame->refresh_frame_flags);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c: At top level:
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1155:6: warning: no previous prototype for 'rockchip_vpu981_av1_dec_done' [-Wmissing-prototypes]
1155 | void rockchip_vpu981_av1_dec_done(struct hantro_ctx *ctx)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c: In function 'rockchip_vpu981_av1_dec_set_prob':
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1165:66: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_frame'
1165 | const struct v4l2_av1_quantization *quantization = &frame->quantization;
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1168:21: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_frame'
1168 | !!(frame->flags & V4L2_AV1_FRAME_FLAG_ERROR_RESILIENT_MODE);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1168:31: error: 'V4L2_AV1_FRAME_FLAG_ERROR_RESILIENT_MODE' undeclared (first use in this function); did you mean 'V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT'?
1168 | !!(frame->flags & V4L2_AV1_FRAME_FLAG_ERROR_RESILIENT_MODE);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1169:45: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_frame'
1169 | bool frame_is_intra = IS_INTRA(frame->frame_type);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:46:26: note: in definition of macro 'IS_INTRA'
46 | #define IS_INTRA(type) ((type == V4L2_AV1_KEY_FRAME) || (type == V4L2_AV1_INTRA_ONLY_FRAME))
| ^~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:46:34: error: 'V4L2_AV1_KEY_FRAME' undeclared (first use in this function)
46 | #define IS_INTRA(type) ((type == V4L2_AV1_KEY_FRAME) || (type == V4L2_AV1_INTRA_ONLY_FRAME))
| ^~~~~~~~~~~~~~~~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1169:31: note: in expansion of macro 'IS_INTRA'
1169 | bool frame_is_intra = IS_INTRA(frame->frame_type);
| ^~~~~~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1169:45: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_frame'
1169 | bool frame_is_intra = IS_INTRA(frame->frame_type);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:46:58: note: in definition of macro 'IS_INTRA'
46 | #define IS_INTRA(type) ((type == V4L2_AV1_KEY_FRAME) || (type == V4L2_AV1_INTRA_ONLY_FRAME))
| ^~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:46:66: error: 'V4L2_AV1_INTRA_ONLY_FRAME' undeclared (first use in this function)
46 | #define IS_INTRA(type) ((type == V4L2_AV1_KEY_FRAME) || (type == V4L2_AV1_INTRA_ONLY_FRAME))
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1169:31: note: in expansion of macro 'IS_INTRA'
1169 | bool frame_is_intra = IS_INTRA(frame->frame_type);
| ^~~~~~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1172:21: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_frame'
1172 | || frame->primary_ref_frame == AV1_PRIMARY_REF_NONE) {
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1175:62: error: invalid use of undefined type 'const struct v4l2_av1_quantization'
1175 | rockchip_av1_default_coeff_probs(quantization->base_q_idx,
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1178:49: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_frame'
1178 | rockchip_av1_get_cdfs(ctx, frame->ref_frame_idx[frame->primary_ref_frame]);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1178:70: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_frame'
1178 | rockchip_av1_get_cdfs(ctx, frame->ref_frame_idx[frame->primary_ref_frame]);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1180:43: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_frame'
1180 | rockchip_av1_store_cdfs(ctx, frame->refresh_frame_flags);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c: In function 'rockchip_vpu981_av1_dec_set_fgs':
>> drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1247:25: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1247 | if (!(film_grain->flags & V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN)) {
| ^~
>> drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1247:35: error: 'V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN' undeclared (first use in this function)
1247 | if (!(film_grain->flags & V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1282:36: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1282 | film_grain->num_y_points > 0);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1284:36: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1284 | film_grain->num_cb_points > 0);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1286:36: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1286 | film_grain->num_cr_points > 0);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1288:36: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1288 | film_grain->grain_scaling_minus_8 + 8);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1290:25: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1290 | if (!(film_grain->flags & V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA)) {
| ^~
>> drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1290:35: error: 'V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA' undeclared (first use in this function)
1290 | if (!(film_grain->flags & V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1291:63: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1291 | hantro_reg_write(vpu, &av1_cb_mult, film_grain->cb_mult - 128);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1292:68: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1292 | hantro_reg_write(vpu, &av1_cb_luma_mult, film_grain->cb_luma_mult - 128);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1293:65: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1293 | hantro_reg_write(vpu, &av1_cb_offset, film_grain->cb_offset - 256);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1294:63: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1294 | hantro_reg_write(vpu, &av1_cr_mult, film_grain->cr_mult - 128);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1295:68: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1295 | hantro_reg_write(vpu, &av1_cr_luma_mult, film_grain->cr_luma_mult - 128);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1296:65: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1296 | hantro_reg_write(vpu, &av1_cr_offset, film_grain->cr_offset - 256);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1307:39: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1307 | !!(film_grain->flags & V4L2_AV1_FILM_GRAIN_FLAG_OVERLAP));
| ^~
>> drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1307:49: error: 'V4L2_AV1_FILM_GRAIN_FLAG_OVERLAP' undeclared (first use in this function)
1307 | !!(film_grain->flags & V4L2_AV1_FILM_GRAIN_FLAG_OVERLAP));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1309:39: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1309 | !!(film_grain->flags & V4L2_AV1_FILM_GRAIN_FLAG_CLIP_TO_RESTRICTED_RANGE));
| ^~
>> drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1309:49: error: 'V4L2_AV1_FILM_GRAIN_FLAG_CLIP_TO_RESTRICTED_RANGE' undeclared (first use in this function)
1309 | !!(film_grain->flags & V4L2_AV1_FILM_GRAIN_FLAG_CLIP_TO_RESTRICTED_RANGE));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1311:39: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1311 | !!(film_grain->flags & V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA));
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1312:59: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1312 | hantro_reg_write(vpu, &av1_random_seed, film_grain->grain_seed);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1314:65: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1314 | rockchip_vpu981_av1_dec_init_scaling_function(film_grain->point_y_value,
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1315:65: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1315 | film_grain->point_y_scaling,
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1316:65: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1316 | film_grain->num_y_points,
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1319:23: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1319 | if (film_grain->flags &
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1327:32: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1327 | (film_grain->point_cb_value, film_grain->point_cb_scaling,
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1327:60: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1327 | (film_grain->point_cb_value, film_grain->point_cb_scaling,
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1328:32: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1328 | film_grain->num_cb_points, fgmem->scaling_lut_cb);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1330:32: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1330 | (film_grain->point_cr_value, film_grain->point_cr_scaling,
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1330:60: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1330 | (film_grain->point_cr_value, film_grain->point_cr_scaling,
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1331:32: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1331 | film_grain->num_cr_points, fgmem->scaling_lut_cr);
| ^~
>> drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1334:25: error: 'V4L2_AV1_MAX_NUM_POS_LUMA' undeclared (first use in this function)
1334 | for (i = 0; i < V4L2_AV1_MAX_NUM_POS_LUMA; i++) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1336:55: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1336 | (*ar_coeffs_y)[i] = film_grain->ar_coeffs_y_plus_128[i] - 128;
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1337:48: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1337 | (*ar_coeffs_cb)[i] = film_grain->ar_coeffs_cb_plus_128[i] - 128;
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1338:48: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1338 | (*ar_coeffs_cr)[i] = film_grain->ar_coeffs_cr_plus_128[i] - 128;
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1341:34: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1341 | ar_coeff_lag = film_grain->ar_coeff_lag;
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1342:36: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1342 | ar_coeff_shift = film_grain->ar_coeff_shift_minus_6 + 6;
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1343:39: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1343 | grain_scale_shift = film_grain->grain_scale_shift;
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1350:42: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1350 | film_grain->num_y_points, grain_scale_shift,
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1353:42: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1353 | film_grain->grain_seed);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1357:44: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1357 | film_grain->num_y_points,
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1358:44: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1358 | film_grain->num_cb_points,
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1359:44: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1359 | film_grain->num_cr_points,
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1363:47: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1363 | !!(film_grain->flags
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1365:44: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_film_grain'
1365 | film_grain->grain_seed);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c: In function 'rockchip_vpu981_av1_dec_set_cdef':
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1398:50: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_frame'
1398 | const struct v4l2_av1_cdef *cdef = &frame->cdef;
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1406:51: error: invalid use of undefined type 'const struct v4l2_av1_cdef'
1406 | hantro_reg_write(vpu, &av1_cdef_bits, cdef->bits);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1407:54: error: invalid use of undefined type 'const struct v4l2_av1_cdef'
1407 | hantro_reg_write(vpu, &av1_cdef_damping, cdef->damping_minus_3);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1409:35: error: invalid use of undefined type 'const struct v4l2_av1_cdef'
1409 | for (i = 0; i < (1 << cdef->bits); i++) {
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1410:42: error: invalid use of undefined type 'const struct v4l2_av1_cdef'
1410 | luma_pri_strength |= cdef->y_pri_strength[i] << (i * 4);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1411:25: error: invalid use of undefined type 'const struct v4l2_av1_cdef'
1411 | if (cdef->y_sec_strength[i] == 4)
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1414:50: error: invalid use of undefined type 'const struct v4l2_av1_cdef'
1414 | luma_sec_strength |= cdef->y_sec_strength[i] << (i * 2);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1416:44: error: invalid use of undefined type 'const struct v4l2_av1_cdef'
1416 | chroma_pri_strength |= cdef->uv_pri_strength[i] << (i * 4);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1417:25: error: invalid use of undefined type 'const struct v4l2_av1_cdef'
1417 | if (cdef->uv_sec_strength[i] == 4)
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1420:52: error: invalid use of undefined type 'const struct v4l2_av1_cdef'
1420 | chroma_sec_strength |= cdef->uv_sec_strength[i] << (i * 2);
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c: In function 'rockchip_vpu981_av1_dec_set_lr':
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1441:19: error: invalid use of undefined type 'const struct v4l2_ctrl_av1_frame'
1441 | &frame->loop_restoration;
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1444:39: error: 'V4L2_AV1_NUM_PLANES_MAX' undeclared (first use in this function)
1444 | uint8_t restoration_unit_size[V4L2_AV1_NUM_PLANES_MAX] = { 3, 3, 3 };
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1447:29: error: invalid use of undefined type 'const struct v4l2_av1_loop_restoration'
1447 | if (loop_restoration->flags & V4L2_AV1_LOOP_RESTORATION_FLAG_USES_LR) {
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1447:39: error: 'V4L2_AV1_LOOP_RESTORATION_FLAG_USES_LR' undeclared (first use in this function)
1447 | if (loop_restoration->flags & V4L2_AV1_LOOP_RESTORATION_FLAG_USES_LR) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1448:64: error: invalid use of undefined type 'const struct v4l2_av1_loop_restoration'
1448 | restoration_unit_size[0] = 1 + loop_restoration->lr_unit_shift;
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1450:41: error: invalid use of undefined type 'const struct v4l2_av1_loop_restoration'
1450 | 1 + loop_restoration->lr_unit_shift - loop_restoration->lr_uv_shift;
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1450:75: error: invalid use of undefined type 'const struct v4l2_av1_loop_restoration'
1450 | 1 + loop_restoration->lr_unit_shift - loop_restoration->lr_uv_shift;
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1452:41: error: invalid use of undefined type 'const struct v4l2_av1_loop_restoration'
1452 | 1 + loop_restoration->lr_unit_shift - loop_restoration->lr_uv_shift;
| ^~
drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1452:75: error: invalid use of undefined type 'const struct v4l2_av1_loop_restoration'
1452 | 1 + loop_restoration->lr_unit_shift - loop_restoration->lr_uv_shift;
| ^~
vim +1247 drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c
1226
1227 static void rockchip_vpu981_av1_dec_set_fgs(struct hantro_ctx *ctx)
1228 {
1229 struct hantro_av1_dec_hw_ctx *av1_dec = &ctx->av1_dec;
1230 struct hantro_av1_dec_ctrls *ctrls = &av1_dec->ctrls;
1231 const struct v4l2_ctrl_av1_film_grain *film_grain = ctrls->film_grain;
1232 struct rockchip_av1_film_grain *fgmem = av1_dec->film_grain.cpu;
1233 struct hantro_dev *vpu = ctx->dev;
1234 int32_t (*ar_coeffs_y)[24];
1235 int32_t (*ar_coeffs_cb)[25];
1236 int32_t (*ar_coeffs_cr)[25];
1237 int32_t (*luma_grain_block)[73][82];
1238 int32_t (*cb_grain_block)[38][44];
1239 int32_t (*cr_grain_block)[38][44];
1240 int32_t ar_coeff_lag, ar_coeff_shift;
1241 int32_t grain_scale_shift, bitdepth;
1242 int32_t grain_center, grain_min, grain_max;
1243 int i, j;
1244
1245 hantro_reg_write(vpu, &av1_apply_grain, 0);
1246
> 1247 if (!(film_grain->flags & V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN)) {
1248 hantro_reg_write(vpu, &av1_num_y_points_b, 0);
1249 hantro_reg_write(vpu, &av1_num_cb_points_b, 0);
1250 hantro_reg_write(vpu, &av1_num_cr_points_b, 0);
1251 hantro_reg_write(vpu, &av1_scaling_shift, 0);
1252 hantro_reg_write(vpu, &av1_cb_mult, 0);
1253 hantro_reg_write(vpu, &av1_cb_luma_mult, 0);
1254 hantro_reg_write(vpu, &av1_cb_offset, 0);
1255 hantro_reg_write(vpu, &av1_cr_mult, 0);
1256 hantro_reg_write(vpu, &av1_cr_luma_mult, 0);
1257 hantro_reg_write(vpu, &av1_cr_offset, 0);
1258 hantro_reg_write(vpu, &av1_overlap_flag, 0);
1259 hantro_reg_write(vpu, &av1_clip_to_restricted_range, 0);
1260 hantro_reg_write(vpu, &av1_chroma_scaling_from_luma, 0);
1261 hantro_reg_write(vpu, &av1_random_seed, 0);
1262 hantro_write_addr(vpu, AV1_FILM_GRAIN, 0);
1263 return;
1264 }
1265
1266 ar_coeffs_y = kzalloc(sizeof(int32_t) * 24, GFP_KERNEL);
1267 ar_coeffs_cb = kzalloc(sizeof(int32_t) * 25, GFP_KERNEL);
1268 ar_coeffs_cr = kzalloc(sizeof(int32_t) * 25, GFP_KERNEL);
1269 luma_grain_block = kzalloc(sizeof(int32_t) * 73 * 82, GFP_KERNEL);
1270 cb_grain_block = kzalloc(sizeof(int32_t) * 38 * 44, GFP_KERNEL);
1271 cr_grain_block = kzalloc(sizeof(int32_t) * 38 * 44, GFP_KERNEL);
1272
1273 if (!ar_coeffs_y || !ar_coeffs_cb || !ar_coeffs_cr
1274 || !luma_grain_block || !cb_grain_block || !cr_grain_block) {
1275 pr_warn("Fail allocating memory for film grain parameters\n");
1276 goto alloc_fail;
1277 }
1278
1279 hantro_reg_write(vpu, &av1_apply_grain, 1);
1280
1281 hantro_reg_write(vpu, &av1_num_y_points_b,
1282 film_grain->num_y_points > 0);
1283 hantro_reg_write(vpu, &av1_num_cb_points_b,
1284 film_grain->num_cb_points > 0);
1285 hantro_reg_write(vpu, &av1_num_cr_points_b,
1286 film_grain->num_cr_points > 0);
1287 hantro_reg_write(vpu, &av1_scaling_shift,
1288 film_grain->grain_scaling_minus_8 + 8);
1289
> 1290 if (!(film_grain->flags & V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA)) {
1291 hantro_reg_write(vpu, &av1_cb_mult, film_grain->cb_mult - 128);
1292 hantro_reg_write(vpu, &av1_cb_luma_mult, film_grain->cb_luma_mult - 128);
1293 hantro_reg_write(vpu, &av1_cb_offset, film_grain->cb_offset - 256);
1294 hantro_reg_write(vpu, &av1_cr_mult, film_grain->cr_mult - 128);
1295 hantro_reg_write(vpu, &av1_cr_luma_mult, film_grain->cr_luma_mult - 128);
1296 hantro_reg_write(vpu, &av1_cr_offset, film_grain->cr_offset - 256);
1297 } else {
1298 hantro_reg_write(vpu, &av1_cb_mult, 0);
1299 hantro_reg_write(vpu, &av1_cb_luma_mult, 0);
1300 hantro_reg_write(vpu, &av1_cb_offset, 0);
1301 hantro_reg_write(vpu, &av1_cr_mult, 0);
1302 hantro_reg_write(vpu, &av1_cr_luma_mult, 0);
1303 hantro_reg_write(vpu, &av1_cr_offset, 0);
1304 }
1305
1306 hantro_reg_write(vpu, &av1_overlap_flag,
> 1307 !!(film_grain->flags & V4L2_AV1_FILM_GRAIN_FLAG_OVERLAP));
1308 hantro_reg_write(vpu, &av1_clip_to_restricted_range,
> 1309 !!(film_grain->flags & V4L2_AV1_FILM_GRAIN_FLAG_CLIP_TO_RESTRICTED_RANGE));
1310 hantro_reg_write(vpu, &av1_chroma_scaling_from_luma,
1311 !!(film_grain->flags & V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA));
1312 hantro_reg_write(vpu, &av1_random_seed, film_grain->grain_seed);
1313
1314 rockchip_vpu981_av1_dec_init_scaling_function(film_grain->point_y_value,
1315 film_grain->point_y_scaling,
1316 film_grain->num_y_points,
1317 fgmem->scaling_lut_y);
1318
1319 if (film_grain->flags &
1320 V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA) {
1321 memcpy(fgmem->scaling_lut_cb, fgmem->scaling_lut_y,
1322 sizeof(*fgmem->scaling_lut_y) * 256);
1323 memcpy(fgmem->scaling_lut_cr, fgmem->scaling_lut_y,
1324 sizeof(*fgmem->scaling_lut_y) * 256);
1325 } else {
1326 rockchip_vpu981_av1_dec_init_scaling_function
1327 (film_grain->point_cb_value, film_grain->point_cb_scaling,
1328 film_grain->num_cb_points, fgmem->scaling_lut_cb);
1329 rockchip_vpu981_av1_dec_init_scaling_function
1330 (film_grain->point_cr_value, film_grain->point_cr_scaling,
1331 film_grain->num_cr_points, fgmem->scaling_lut_cr);
1332 }
1333
> 1334 for (i = 0; i < V4L2_AV1_MAX_NUM_POS_LUMA; i++) {
1335 if (i < 24)
1336 (*ar_coeffs_y)[i] = film_grain->ar_coeffs_y_plus_128[i] - 128;
1337 (*ar_coeffs_cb)[i] = film_grain->ar_coeffs_cb_plus_128[i] - 128;
1338 (*ar_coeffs_cr)[i] = film_grain->ar_coeffs_cr_plus_128[i] - 128;
1339 }
1340
1341 ar_coeff_lag = film_grain->ar_coeff_lag;
1342 ar_coeff_shift = film_grain->ar_coeff_shift_minus_6 + 6;
1343 grain_scale_shift = film_grain->grain_scale_shift;
1344 bitdepth = ctx->bit_depth;
1345 grain_center = 128 << (bitdepth - 8);
1346 grain_min = 0 - grain_center;
1347 grain_max = (256 << (bitdepth - 8)) - 1 - grain_center;
1348
1349 rockchip_av1_generate_luma_grain_block(luma_grain_block, bitdepth,
1350 film_grain->num_y_points, grain_scale_shift,
1351 ar_coeff_lag, ar_coeffs_y, ar_coeff_shift,
1352 grain_min, grain_max,
1353 film_grain->grain_seed);
1354
1355 rockchip_av1_generate_chroma_grain_block(luma_grain_block, cb_grain_block,
1356 cr_grain_block, bitdepth,
1357 film_grain->num_y_points,
1358 film_grain->num_cb_points,
1359 film_grain->num_cr_points,
1360 grain_scale_shift, ar_coeff_lag, ar_coeffs_cb,
1361 ar_coeffs_cr, ar_coeff_shift, grain_min,
1362 grain_max,
1363 !!(film_grain->flags
1364 & V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA),
1365 film_grain->grain_seed);
1366
1367 for (i = 0; i < 64; i++) {
1368 for (j = 0; j < 64; j++)
1369 fgmem->cropped_luma_grain_block[i * 64 + j] =
1370 (*luma_grain_block)[i + 9][j + 9];
1371 }
1372
1373 for (i = 0; i < 32; i++) {
1374 for (j = 0; j < 32; j++) {
1375 fgmem->cropped_chroma_grain_block[i * 64 + 2 * j] =
1376 (*cb_grain_block)[i + 6][j + 6];
1377 fgmem->cropped_chroma_grain_block[i * 64 + 2 * j + 1] =
1378 (*cr_grain_block)[i + 6][j + 6];
1379 }
1380 }
1381
1382 hantro_write_addr(vpu, AV1_FILM_GRAIN, av1_dec->film_grain.dma);
1383
1384 alloc_fail:
1385 kfree(ar_coeffs_y);
1386 kfree(ar_coeffs_cb);
1387 kfree(ar_coeffs_cr);
1388 kfree(luma_grain_block);
1389 kfree(cb_grain_block);
1390 kfree(cr_grain_block);
1391 }
1392
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (244361 bytes)
Powered by blists - more mailing lists