Message ID | 20230103071551.17775-2-ming.qian@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/3] media: venus: adapt headers only flag for V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE | expand |
Hi Ming, I love your patch! Yet something to improve: [auto build test ERROR on media-tree/master] [also build test ERROR on linus/master v6.2-rc2 next-20221226] [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/Ming-Qian/media-s5p-mfc-adapt-headers-only-flag-for-V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE/20230103-151825 base: git://linuxtv.org/media_tree.git master patch link: https://lore.kernel.org/r/20230103071551.17775-2-ming.qian%40nxp.com patch subject: [PATCH 2/3] media: s5p-mfc: adapt headers only flag for V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE config: arc-randconfig-r043-20230102 compiler: arceb-elf-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/36584b25e27f6400628921dc984c6f1780e27743 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Ming-Qian/media-s5p-mfc-adapt-headers-only-flag-for-V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE/20230103-151825 git checkout 36584b25e27f6400628921dc984c6f1780e27743 # 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=arc olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/media/platform/mediatek/vcodec/ drivers/media/platform/samsung/s5p-mfc/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c: In function 'enc_post_seq_start': >> drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c:1164:45: error: 'V4L2_BUF_FLAG_HEADERS_ONLY' undeclared (first use in this function); did you mean 'V4L2_CTRL_FLAG_READ_ONLY'? 1164 | dst_mb->b->flags |= V4L2_BUF_FLAG_HEADERS_ONLY; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | V4L2_CTRL_FLAG_READ_ONLY drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c:1164:45: note: each undeclared identifier is reported only once for each function it appears in vim +1164 drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c 1147 1148 static int enc_post_seq_start(struct s5p_mfc_ctx *ctx) 1149 { 1150 struct s5p_mfc_dev *dev = ctx->dev; 1151 struct s5p_mfc_enc_params *p = &ctx->enc_params; 1152 struct s5p_mfc_buf *dst_mb; 1153 unsigned int enc_pb_count; 1154 1155 if (p->seq_hdr_mode == V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE) { 1156 if (!list_empty(&ctx->dst_queue)) { 1157 dst_mb = list_entry(ctx->dst_queue.next, 1158 struct s5p_mfc_buf, list); 1159 list_del(&dst_mb->list); 1160 ctx->dst_queue_cnt--; 1161 vb2_set_plane_payload(&dst_mb->b->vb2_buf, 0, 1162 s5p_mfc_hw_call(dev->mfc_ops, get_enc_strm_size, 1163 dev)); > 1164 dst_mb->b->flags |= V4L2_BUF_FLAG_HEADERS_ONLY; 1165 vb2_buffer_done(&dst_mb->b->vb2_buf, 1166 VB2_BUF_STATE_DONE); 1167 } 1168 } 1169 1170 if (!IS_MFCV6_PLUS(dev)) { 1171 ctx->state = MFCINST_RUNNING; 1172 if (s5p_mfc_ctx_ready(ctx)) 1173 set_work_bit_irqsave(ctx); 1174 s5p_mfc_hw_call(dev->mfc_ops, try_run, dev); 1175 } else { 1176 enc_pb_count = s5p_mfc_hw_call(dev->mfc_ops, 1177 get_enc_dpb_count, dev); 1178 if (ctx->pb_count < enc_pb_count) 1179 ctx->pb_count = enc_pb_count; 1180 if (FW_HAS_E_MIN_SCRATCH_BUF(dev)) { 1181 ctx->scratch_buf_size = s5p_mfc_hw_call(dev->mfc_ops, 1182 get_e_min_scratch_buf_size, dev); 1183 ctx->bank1.size += ctx->scratch_buf_size; 1184 } 1185 ctx->state = MFCINST_HEAD_PRODUCED; 1186 } 1187 1188 return 0; 1189 } 1190
diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c index f62703cebb77..ca990833753c 100644 --- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c +++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c @@ -1161,6 +1161,7 @@ static int enc_post_seq_start(struct s5p_mfc_ctx *ctx) vb2_set_plane_payload(&dst_mb->b->vb2_buf, 0, s5p_mfc_hw_call(dev->mfc_ops, get_enc_strm_size, dev)); + dst_mb->b->flags |= V4L2_BUF_FLAG_HEADERS_ONLY; vb2_buffer_done(&dst_mb->b->vb2_buf, VB2_BUF_STATE_DONE); }
when V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE is chosen, the first buffer only contains stream header, so apply the flag V4L2_BUF_FLAG_HEADERS_ONLY Signed-off-by: Ming Qian <ming.qian@nxp.com> --- drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c | 1 + 1 file changed, 1 insertion(+)