All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ben Hoff <hoff.benjamin.k@gmail.com>, linux-media@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	mchehab@kernel.org, hverkuil+cisco@kernel.org,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v6] media: pci: add AVMatrix HWS capture driver
Date: Thu, 14 May 2026 18:15:39 +0800	[thread overview]
Message-ID: <202605141850.c6zw6nTk-lkp@intel.com> (raw)
In-Reply-To: <20260506192618.35384-1-hoff.benjamin.k@gmail.com>

Hi Ben,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 74fe02ce122a6103f207d29fafc8b3a53de6abaf]

url:    https://github.com/intel-lab-lkp/linux/commits/Ben-Hoff/media-pci-add-AVMatrix-HWS-capture-driver/20260514-065339
base:   74fe02ce122a6103f207d29fafc8b3a53de6abaf
patch link:    https://lore.kernel.org/r/20260506192618.35384-1-hoff.benjamin.k%40gmail.com
patch subject: [PATCH v6] media: pci: add AVMatrix HWS capture driver
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20260514/202605141850.c6zw6nTk-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260514/202605141850.c6zw6nTk-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605141850.c6zw6nTk-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/media/pci/hws/hws_v4l2_ioctl.c:280:5: warning: no previous prototype for 'hws_vidioc_query_dv_timings' [-Wmissing-prototypes]
     280 | int hws_vidioc_query_dv_timings(struct file *file, void *fh,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/pci/hws/hws_v4l2_ioctl.c: In function 'hws_vidioc_query_dv_timings':
   drivers/media/pci/hws/hws_v4l2_ioctl.c:286:25: warning: variable 'live_ok' set but not used [-Wunused-but-set-variable]
     286 |         bool interlace, live_ok;
         |                         ^~~~~~~
   drivers/media/pci/hws/hws_v4l2_ioctl.c: At top level:
>> drivers/media/pci/hws/hws_v4l2_ioctl.c:309:5: warning: no previous prototype for 'hws_vidioc_enum_dv_timings' [-Wmissing-prototypes]
     309 | int hws_vidioc_enum_dv_timings(struct file *file, void *fh,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/pci/hws/hws_v4l2_ioctl.c:326:5: warning: no previous prototype for 'hws_vidioc_g_dv_timings' [-Wmissing-prototypes]
     326 | int hws_vidioc_g_dv_timings(struct file *file, void *fh,
         |     ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/pci/hws/hws_v4l2_ioctl.c:352:5: warning: no previous prototype for 'hws_vidioc_s_dv_timings' [-Wmissing-prototypes]
     352 | int hws_vidioc_s_dv_timings(struct file *file, void *fh,
         |     ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/pci/hws/hws_v4l2_ioctl.c:412:5: warning: no previous prototype for 'hws_vidioc_dv_timings_cap' [-Wmissing-prototypes]
     412 | int hws_vidioc_dv_timings_cap(struct file *file, void *fh,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/pci/hws/hws_v4l2_ioctl.c:504:5: warning: no previous prototype for 'hws_vidioc_querycap' [-Wmissing-prototypes]
     504 | int hws_vidioc_querycap(struct file *file, void *priv, struct v4l2_capability *cap)
         |     ^~~~~~~~~~~~~~~~~~~
>> drivers/media/pci/hws/hws_v4l2_ioctl.c:520:5: warning: no previous prototype for 'hws_vidioc_enum_fmt_vid_cap' [-Wmissing-prototypes]
     520 | int hws_vidioc_enum_fmt_vid_cap(struct file *file, void *priv_fh, struct v4l2_fmtdesc *f)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/pci/hws/hws_v4l2_ioctl.c:529:5: warning: no previous prototype for 'hws_vidioc_g_fmt_vid_cap' [-Wmissing-prototypes]
     529 | int hws_vidioc_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/pci/hws/hws_v4l2_ioctl.c:556:5: warning: no previous prototype for 'hws_vidioc_try_fmt_vid_cap' [-Wmissing-prototypes]
     556 | int hws_vidioc_try_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/pci/hws/hws_v4l2_ioctl.c:633:5: warning: no previous prototype for 'hws_vidioc_s_fmt_vid_cap' [-Wmissing-prototypes]
     633 | int hws_vidioc_s_fmt_vid_cap(struct file *file, void *priv, struct v4l2_format *f)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/pci/hws/hws_v4l2_ioctl.c:690:5: warning: no previous prototype for 'hws_vidioc_g_parm' [-Wmissing-prototypes]
     690 | int hws_vidioc_g_parm(struct file *file, void *fh, struct v4l2_streamparm *param)
         |     ^~~~~~~~~~~~~~~~~
>> drivers/media/pci/hws/hws_v4l2_ioctl.c:711:5: warning: no previous prototype for 'hws_vidioc_enum_input' [-Wmissing-prototypes]
     711 | int hws_vidioc_enum_input(struct file *file, void *priv,
         |     ^~~~~~~~~~~~~~~~~~~~~
>> drivers/media/pci/hws/hws_v4l2_ioctl.c:724:5: warning: no previous prototype for 'hws_vidioc_g_input' [-Wmissing-prototypes]
     724 | int hws_vidioc_g_input(struct file *file, void *priv, unsigned int *index)
         |     ^~~~~~~~~~~~~~~~~~
>> drivers/media/pci/hws/hws_v4l2_ioctl.c:730:5: warning: no previous prototype for 'hws_vidioc_s_input' [-Wmissing-prototypes]
     730 | int hws_vidioc_s_input(struct file *file, void *priv, unsigned int i)
         |     ^~~~~~~~~~~~~~~~~~
>> drivers/media/pci/hws/hws_v4l2_ioctl.c:735:5: warning: no previous prototype for 'hws_vidioc_s_parm' [-Wmissing-prototypes]
     735 | int hws_vidioc_s_parm(struct file *file, void *fh, struct v4l2_streamparm *param)
         |     ^~~~~~~~~~~~~~~~~


vim +/hws_vidioc_query_dv_timings +280 drivers/media/pci/hws/hws_v4l2_ioctl.c

   275	
   276	/* Query the *current detected* DV timings on the input.
   277	 * If you have a real hardware detector, call it here; otherwise we
   278	 * derive from the cached pix state and map to the closest supported DV mode.
   279	 */
 > 280	int hws_vidioc_query_dv_timings(struct file *file, void *fh,
   281					struct v4l2_dv_timings *timings)
   282	{
   283		struct hws_video *vid = video_drvdata(file);
   284		const struct hws_dv_mode *m;
   285		u32 w, h;
   286		bool interlace, live_ok;
   287	
   288		if (!timings)
   289			return -EINVAL;
   290	
   291		w = vid->pix.width;
   292		h = vid->pix.height;
   293		interlace = vid->pix.interlaced;
   294		live_ok = hws_get_live_dv_geometry(vid, &w, &h, &interlace);
   295		/* Map current (live if available, otherwise cached) WxH/interlace
   296		 * to one of our supported modes.
   297		 */
   298		m = hws_find_dv_by_wh(w, h, !!interlace);
   299		if (!m)
   300			return -ENOLINK;
   301	
   302		*timings = m->timings;
   303		vid->cur_dv_timings = m->timings;
   304		vid->current_fps = m->refresh_hz;
   305		return 0;
   306	}
   307	
   308	/* Enumerate the Nth supported DV timings from our static table. */
 > 309	int hws_vidioc_enum_dv_timings(struct file *file, void *fh,
   310				       struct v4l2_enum_dv_timings *edv)
   311	{
   312		if (!edv)
   313			return -EINVAL;
   314	
   315		if (edv->pad)
   316			return -EINVAL;
   317	
   318		if (edv->index >= hws_dv_modes_cnt)
   319			return -EINVAL;
   320	
   321		edv->timings = hws_dv_modes[edv->index].timings;
   322		return 0;
   323	}
   324	
   325	/* Get the *currently configured* DV timings. */
 > 326	int hws_vidioc_g_dv_timings(struct file *file, void *fh,
   327				    struct v4l2_dv_timings *timings)
   328	{
   329		struct hws_video *vid = video_drvdata(file);
   330	
   331		if (!timings)
   332			return -EINVAL;
   333	
   334		*timings = vid->cur_dv_timings;
   335		return 0;
   336	}
   337	
   338	static inline void hws_set_colorimetry_state(struct hws_pix_state *p)
   339	{
   340		bool sd = p->height <= 576;
   341	
   342		p->colorspace   = sd ? V4L2_COLORSPACE_SMPTE170M : V4L2_COLORSPACE_REC709;
   343		p->ycbcr_enc    = V4L2_YCBCR_ENC_DEFAULT;
   344		p->quantization = V4L2_QUANTIZATION_FULL_RANGE;
   345		p->xfer_func    = V4L2_XFER_FUNC_DEFAULT;
   346	}
   347	
   348	/* Set DV timings: must match one of our supported modes.
   349	 * If buffers are queued and this implies a size change, we reject with -EBUSY.
   350	 * Otherwise we update pix state and (optionally) reprogram the HW.
   351	 */
 > 352	int hws_vidioc_s_dv_timings(struct file *file, void *fh,
   353				    struct v4l2_dv_timings *timings)
   354	{
   355		struct hws_video *vid = video_drvdata(file);
   356		const struct hws_dv_mode *m;
   357		const struct v4l2_bt_timings *bt;
   358		u32 new_w, new_h;
   359		bool interlaced;
   360		int ret = 0;
   361		unsigned long was_busy;
   362	
   363		if (!timings)
   364			return -EINVAL;
   365	
   366		m = hws_match_supported_dv(timings);
   367		if (!m)
   368			return -EINVAL;
   369	
   370		bt = &m->timings.bt;
   371		if (bt->interlaced)
   372			return -EINVAL; /* only progressive modes are advertised */
   373		new_w = bt->width;
   374		new_h = bt->height;
   375		interlaced = false;
   376	
   377		lockdep_assert_held(&vid->state_lock);
   378	
   379		/* If vb2 has active buffers and size would change, reject. */
   380		was_busy = vb2_is_busy(&vid->buffer_queue);
   381		if (was_busy &&
   382		    (new_w != vid->pix.width || new_h != vid->pix.height ||
   383		     interlaced != vid->pix.interlaced)) {
   384			ret = -EBUSY;
   385			return ret;
   386		}
   387	
   388		/* Update software pixel state (and recalc sizes) */
   389		vid->pix.width      = new_w;
   390		vid->pix.height     = new_h;
   391		vid->pix.field      = interlaced ? V4L2_FIELD_INTERLACED
   392						 : V4L2_FIELD_NONE;
   393		vid->pix.interlaced = interlaced;
   394		vid->pix.fourcc     = V4L2_PIX_FMT_YUYV;
   395	
   396		hws_set_colorimetry_state(&vid->pix);
   397	
   398		/* Recompute stride/sizeimage/half_size using your helper */
   399		vid->pix.bytesperline = hws_calc_bpl_yuyv(new_w);
   400		vid->pix.sizeimage    = hws_calc_size_yuyv(new_w, new_h);
   401		vid->pix.half_size    = hws_calc_half_size(vid->pix.sizeimage);
   402		vid->cur_dv_timings   = m->timings;
   403		vid->current_fps      = m->refresh_hz;
   404		if (!was_busy)
   405			vid->alloc_sizeimage = vid->pix.sizeimage;
   406		return ret;
   407	}
   408	
   409	/* Report DV timings capability: advertise BT.656/1120 with
   410	 * the min/max WxH derived from our table and basic progressive support.
   411	 */
 > 412	int hws_vidioc_dv_timings_cap(struct file *file, void *fh,
   413				      struct v4l2_dv_timings_cap *cap)
   414	{
   415		u32 min_w = ~0U, min_h = ~0U;
   416		u32 max_w = 0,       max_h = 0;
   417		size_t i, n = 0;
   418	
   419		if (!cap)
   420			return -EINVAL;
   421	
   422		memset(cap, 0, sizeof(*cap));
   423		cap->type = V4L2_DV_BT_656_1120;
   424	
   425		for (i = 0; i < ARRAY_SIZE(hws_dv_modes); i++) {
   426			const struct v4l2_bt_timings *bt = &hws_dv_modes[i].timings.bt;
   427	
   428			if (hws_dv_modes[i].timings.type != V4L2_DV_BT_656_1120)
   429				continue;
   430			n++;
   431	
   432			if (bt->width  < min_w)
   433				min_w = bt->width;
   434			if (bt->height < min_h)
   435				min_h = bt->height;
   436			if (bt->width  > max_w)
   437				max_w = bt->width;
   438			if (bt->height > max_h)
   439				max_h = bt->height;
   440		}
   441	
   442		/* If the table was empty, fail gracefully. */
   443		if (!n || min_w == U32_MAX)
   444			return -ENODATA;
   445	
   446		cap->bt.min_width  = min_w;
   447		cap->bt.max_width  = max_w;
   448		cap->bt.min_height = min_h;
   449		cap->bt.max_height = max_h;
   450	
   451		/* We support both CEA-861- and VESA-style modes in the list. */
   452		cap->bt.standards =
   453			V4L2_DV_BT_STD_CEA861 | V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT;
   454	
   455		/* Progressive only, unless your table includes interlaced entries. */
   456		cap->bt.capabilities = V4L2_DV_BT_CAP_PROGRESSIVE;
   457	
   458		/* Leave pixelclock/porch limits unconstrained (0) for now. */
   459		return 0;
   460	}
   461	

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

      parent reply	other threads:[~2026-05-14 10:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-06 19:26 [PATCH v6] media: pci: add AVMatrix HWS capture driver Ben Hoff
2026-05-14  5:56 ` kernel test robot
2026-05-14 10:15 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202605141850.c6zw6nTk-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hoff.benjamin.k@gmail.com \
    --cc=hverkuil+cisco@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.