Re: [PATCH v3 7/7] media: subdev: rename v4l2_subdev_pad_config.try_* fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tomi,

I love your patch! Yet something to improve:

[auto build test ERROR on media-tree/master]
[also build test ERROR on tegra/for-next v5.17-rc3]
[cannot apply to next-20220207]
[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]

url:    https://github.com/0day-ci/linux/commits/Tomi-Valkeinen/v4l-subdev-active-state/20220208-002350
base:   git://linuxtv.org/media_tree.git master
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20220208/202202081223.gzH6LYK9-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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/0day-ci/linux/commit/8283dea08111c6a813e9340d735c158df3fcbe5f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Tomi-Valkeinen/v4l-subdev-active-state/20220208-002350
        git checkout 8283dea08111c6a813e9340d735c158df3fcbe5f
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/staging/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers/staging/media/tegra-video/vi.c: In function '__tegra_channel_try_format':
>> drivers/staging/media/tegra-video/vi.c:544:39: error: 'struct v4l2_subdev_pad_config' has no member named 'try_crop'
     544 |                         sd_state->pads->try_crop.width = 0;
         |                                       ^~
   drivers/staging/media/tegra-video/vi.c:545:39: error: 'struct v4l2_subdev_pad_config' has no member named 'try_crop'
     545 |                         sd_state->pads->try_crop.height = 0;
         |                                       ^~
   drivers/staging/media/tegra-video/vi.c:552:39: error: 'struct v4l2_subdev_pad_config' has no member named 'try_crop'
     552 |                         sd_state->pads->try_crop.width = sdsel.r.width;
         |                                       ^~
   drivers/staging/media/tegra-video/vi.c:553:39: error: 'struct v4l2_subdev_pad_config' has no member named 'try_crop'
     553 |                         sd_state->pads->try_crop.height = sdsel.r.height;
         |                                       ^~
   drivers/staging/media/tegra-video/vi.c:556:31: error: 'struct v4l2_subdev_pad_config' has no member named 'try_crop'
     556 |                 sd_state->pads->try_crop.width = fse.max_width;
         |                               ^~
   drivers/staging/media/tegra-video/vi.c:557:31: error: 'struct v4l2_subdev_pad_config' has no member named 'try_crop'
     557 |                 sd_state->pads->try_crop.height = fse.max_height;
         |                               ^~


vim +544 drivers/staging/media/tegra-video/vi.c

3d8a97eabef088 Sowjanya Komatineni 2020-05-04  489  
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  490  static int __tegra_channel_try_format(struct tegra_vi_channel *chan,
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  491  				      struct v4l2_pix_format *pix)
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  492  {
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  493  	const struct tegra_video_format *fmtinfo;
d156949c999153 Tomi Valkeinen      2022-02-07  494  	static struct lock_class_key key;
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  495  	struct v4l2_subdev *subdev;
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  496  	struct v4l2_subdev_format fmt;
0d346d2a6f54f0 Tomi Valkeinen      2021-06-10  497  	struct v4l2_subdev_state *sd_state;
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  498  	struct v4l2_subdev_frame_size_enum fse = {
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  499  		.which = V4L2_SUBDEV_FORMAT_TRY,
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  500  	};
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  501  	struct v4l2_subdev_selection sdsel = {
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  502  		.which = V4L2_SUBDEV_FORMAT_ACTIVE,
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  503  		.target = V4L2_SEL_TGT_CROP_BOUNDS,
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  504  	};
1ebaeb09830f36 Sowjanya Komatineni 2020-08-12  505  	int ret;
1ebaeb09830f36 Sowjanya Komatineni 2020-08-12  506  
1ebaeb09830f36 Sowjanya Komatineni 2020-08-12  507  	subdev = tegra_channel_get_remote_source_subdev(chan);
1ebaeb09830f36 Sowjanya Komatineni 2020-08-12  508  	if (!subdev)
1ebaeb09830f36 Sowjanya Komatineni 2020-08-12  509  		return -ENODEV;
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  510  
d156949c999153 Tomi Valkeinen      2022-02-07  511  	/*
d156949c999153 Tomi Valkeinen      2022-02-07  512  	 * FIXME: Drop this call, drivers are not supposed to use
d156949c999153 Tomi Valkeinen      2022-02-07  513  	 * __v4l2_subdev_state_alloc().
d156949c999153 Tomi Valkeinen      2022-02-07  514  	 */
d156949c999153 Tomi Valkeinen      2022-02-07  515  	sd_state = __v4l2_subdev_state_alloc(subdev, "tegra:state->lock",
d156949c999153 Tomi Valkeinen      2022-02-07  516  					     &key);
ba7a93e507f883 Dan Carpenter       2021-06-22  517  	if (IS_ERR(sd_state))
ba7a93e507f883 Dan Carpenter       2021-06-22  518  		return PTR_ERR(sd_state);
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  519  	/*
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  520  	 * Retrieve the format information and if requested format isn't
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  521  	 * supported, keep the current format.
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  522  	 */
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  523  	fmtinfo = tegra_get_format_by_fourcc(chan->vi, pix->pixelformat);
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  524  	if (!fmtinfo) {
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  525  		pix->pixelformat = chan->format.pixelformat;
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  526  		pix->colorspace = chan->format.colorspace;
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  527  		fmtinfo = tegra_get_format_by_fourcc(chan->vi,
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  528  						     pix->pixelformat);
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  529  	}
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  530  
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  531  	pix->field = V4L2_FIELD_NONE;
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  532  	fmt.which = V4L2_SUBDEV_FORMAT_TRY;
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  533  	fmt.pad = 0;
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  534  	v4l2_fill_mbus_format(&fmt.format, pix, fmtinfo->code);
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  535  
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  536  	/*
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  537  	 * Attempt to obtain the format size from subdev.
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  538  	 * If not available, try to get crop boundary from subdev.
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  539  	 */
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  540  	fse.code = fmtinfo->code;
0d346d2a6f54f0 Tomi Valkeinen      2021-06-10  541  	ret = v4l2_subdev_call(subdev, pad, enum_frame_size, sd_state, &fse);
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  542  	if (ret) {
56f64b82356b74 Sowjanya Komatineni 2020-12-11  543  		if (!v4l2_subdev_has_op(subdev, pad, get_selection)) {
0d346d2a6f54f0 Tomi Valkeinen      2021-06-10 @544  			sd_state->pads->try_crop.width = 0;
0d346d2a6f54f0 Tomi Valkeinen      2021-06-10  545  			sd_state->pads->try_crop.height = 0;
56f64b82356b74 Sowjanya Komatineni 2020-12-11  546  		} else {
56f64b82356b74 Sowjanya Komatineni 2020-12-11  547  			ret = v4l2_subdev_call(subdev, pad, get_selection,
56f64b82356b74 Sowjanya Komatineni 2020-12-11  548  					       NULL, &sdsel);
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  549  			if (ret)
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  550  				return -EINVAL;
56f64b82356b74 Sowjanya Komatineni 2020-12-11  551  
0d346d2a6f54f0 Tomi Valkeinen      2021-06-10  552  			sd_state->pads->try_crop.width = sdsel.r.width;
0d346d2a6f54f0 Tomi Valkeinen      2021-06-10  553  			sd_state->pads->try_crop.height = sdsel.r.height;
56f64b82356b74 Sowjanya Komatineni 2020-12-11  554  		}
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  555  	} else {
0d346d2a6f54f0 Tomi Valkeinen      2021-06-10  556  		sd_state->pads->try_crop.width = fse.max_width;
0d346d2a6f54f0 Tomi Valkeinen      2021-06-10  557  		sd_state->pads->try_crop.height = fse.max_height;
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  558  	}
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12  559  
0d346d2a6f54f0 Tomi Valkeinen      2021-06-10  560  	ret = v4l2_subdev_call(subdev, pad, set_fmt, sd_state, &fmt);
1ebaeb09830f36 Sowjanya Komatineni 2020-08-12  561  	if (ret < 0)
1ebaeb09830f36 Sowjanya Komatineni 2020-08-12  562  		return ret;
1ebaeb09830f36 Sowjanya Komatineni 2020-08-12  563  
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  564  	v4l2_fill_pix_format(pix, &fmt.format);
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  565  	tegra_channel_fmt_align(chan, pix, fmtinfo->bpp);
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  566  
a702cbb5ddd2f7 Tomi Valkeinen      2022-02-07  567  	__v4l2_subdev_state_free(sd_state);
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  568  
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  569  	return 0;
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  570  }
3d8a97eabef088 Sowjanya Komatineni 2020-05-04  571  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux