Re: [PATCH v10 5/5] media: iris: Add BUF_ROIMB_DELTAQP metadata buffer for ROI delta QP

From: kernel test robot

Date: Sun Oct 18 2026 - 10:52:18 EST


Hi Deepa,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 64f76d5d9fd17a5661d7e5eab2aa99218db60d0b]

url: https://github.com/intel-lab-lkp/linux/commits/Deepa-Guthyappa-Madivalara/media-v4l2-core-add-new-control-type-V4L2_CTRL_TYPE_S8/20261016-160032
base: 64f76d5d9fd17a5661d7e5eab2aa99218db60d0b
patch link: https://lore.kernel.org/r/20261016-enc_roi_enable-v10-5-bc5bd37b6f3e%40oss.qualcomm.com
patch subject: [PATCH v10 5/5] media: iris: Add BUF_ROIMB_DELTAQP metadata buffer for ROI delta QP
config: hexagon-randconfig-1001-20261017 (https://download.01.org/0day-ci/archive/20261018/202610182259.q2CvO4TK-lkp@xxxxxxxxx/config)
compiler: clang version 21.1.8 (https://github.com/llvm/llvm-project 2078da43e25a4623cab2d0d60decddf709aaea28)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261018/202610182259.q2CvO4TK-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610182259.q2CvO4TK-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/media/platform/qcom/iris/iris_buffer.c:955:22: warning: unused variable 'f' [-Wunused-variable]
955 | struct v4l2_format *f = inst->fmt_src;
| ^
1 warning generated.


vim +/f +955 drivers/media/platform/qcom/iris/iris_buffer.c

947
948 static int iris_fill_roi_data(struct iris_inst *inst, struct iris_buffer *buffer)
949 {
950 s8 *p_array = (s8 *)inst->fw_caps[ROI_PARAMS].p_array;
951 u32 payload_offset, lcu_width, lcu_height, row_size;
952 u32 array_size = inst->fw_caps[ROI_PARAMS].elems;
953 struct metabuf_header *mbuf_hdr = buffer->kvaddr;
954 struct metapayload_header *mbuf_payload_hdr;
> 955 struct v4l2_format *f = inst->fmt_src;
956 s16 *p_16, *p_temp;
957
958 memset(mbuf_hdr, 0, sizeof(struct metabuf_header) +
959 sizeof(struct metapayload_header));
960 mbuf_hdr->count = 1;
961 mbuf_hdr->size = sizeof(struct metabuf_header) +
962 sizeof(struct metapayload_header);
963 mbuf_hdr->version = BIT(16);
964 mbuf_hdr++;
965 mbuf_payload_hdr = (struct metapayload_header *)(mbuf_hdr);
966 payload_offset = sizeof(struct metabuf_header) +
967 sizeof(struct metapayload_header);
968
969 mbuf_payload_hdr->type = HFI_PROP_ROI_INFO;
970 mbuf_payload_hdr->version = BIT(16);
971 mbuf_payload_hdr->offset = ALIGN(payload_offset, 256);
972
973 if (inst->codec == V4L2_PIX_FMT_HEVC) {
974 lcu_width = DIV_ROUND_UP(inst->enc_raw_width, 32);
975 lcu_height = DIV_ROUND_UP(inst->enc_raw_height, 32);
976 } else {
977 lcu_width = DIV_ROUND_UP(inst->enc_raw_width, 16);
978 lcu_height = DIV_ROUND_UP(inst->enc_raw_height, 16);
979 }
980 /* Firmware expects each row to align to 8 LCU */
981 row_size = ALIGN(lcu_width, 8);
982 mbuf_payload_hdr->size = row_size * lcu_height * sizeof(s16) + 256;
983
984 if (array_size != (lcu_width * lcu_height))
985 return -EINVAL;
986
987 /* Firmware expects 2bytes of delta_Qp, int16_t */
988 p_16 = buffer->kvaddr + mbuf_payload_hdr->offset;
989 for (int j = 0; j < lcu_height; j++) {
990 p_temp = p_16 + j * row_size;
991 for (int i = 0; i < lcu_width; i++)
992 *p_temp++ = BIT(11) | ((p_array[j * lcu_width + i]
993 & 0x3F) << 4);
994 }
995
996 return 0;
997 }
998

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki