Re: [PATCH 4/4] drm/crtc: add drmm_crtc_alloc_with_planes()

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

 



Hi Philipp,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip linus/master v5.9-rc2 next-20200826]
[cannot apply to tegra-drm/drm/tegra/for-next drm-exynos/exynos-drm-next drm/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]

url:    https://github.com/0day-ci/linux/commits/Philipp-Zabel/drm-add-drmm_encoder_alloc/20200826-203629
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: arm-randconfig-r001-20200826 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

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

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/drm_crtc.c: In function '__drm_crtc_init_with_planes':
>> drivers/gpu/drm/drm_crtc.c:267:3: warning: function '__drm_crtc_init_with_planes' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
     267 |   crtc->name = kvasprintf(GFP_KERNEL, name, ap);
         |   ^~~~

# https://github.com/0day-ci/linux/commit/236b7bc44ae0fdecc8e80c5aba0655ca14fdfb23
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Philipp-Zabel/drm-add-drmm_encoder_alloc/20200826-203629
git checkout 236b7bc44ae0fdecc8e80c5aba0655ca14fdfb23
vim +267 drivers/gpu/drm/drm_crtc.c

35f8cc3b9a92c66 Gustavo Padovan     2016-12-06  207  
e954f77f6330028 Simon Ser           2020-05-21  208  /**
e954f77f6330028 Simon Ser           2020-05-21  209   * DOC: standard CRTC properties
e954f77f6330028 Simon Ser           2020-05-21  210   *
e954f77f6330028 Simon Ser           2020-05-21  211   * DRM CRTCs have a few standardized properties:
e954f77f6330028 Simon Ser           2020-05-21  212   *
e954f77f6330028 Simon Ser           2020-05-21  213   * ACTIVE:
e954f77f6330028 Simon Ser           2020-05-21  214   * 	Atomic property for setting the power state of the CRTC. When set to 1
e954f77f6330028 Simon Ser           2020-05-21  215   * 	the CRTC will actively display content. When set to 0 the CRTC will be
e954f77f6330028 Simon Ser           2020-05-21  216   * 	powered off. There is no expectation that user-space will reset CRTC
e954f77f6330028 Simon Ser           2020-05-21  217   * 	resources like the mode and planes when setting ACTIVE to 0.
e954f77f6330028 Simon Ser           2020-05-21  218   *
e954f77f6330028 Simon Ser           2020-05-21  219   * 	User-space can rely on an ACTIVE change to 1 to never fail an atomic
e954f77f6330028 Simon Ser           2020-05-21  220   * 	test as long as no other property has changed. If a change to ACTIVE
e954f77f6330028 Simon Ser           2020-05-21  221   * 	fails an atomic test, this is a driver bug. For this reason setting
e954f77f6330028 Simon Ser           2020-05-21  222   * 	ACTIVE to 0 must not release internal resources (like reserved memory
e954f77f6330028 Simon Ser           2020-05-21  223   * 	bandwidth or clock generators).
e954f77f6330028 Simon Ser           2020-05-21  224   *
e954f77f6330028 Simon Ser           2020-05-21  225   * 	Note that the legacy DPMS property on connectors is internally routed
e954f77f6330028 Simon Ser           2020-05-21  226   * 	to control this property for atomic drivers.
e954f77f6330028 Simon Ser           2020-05-21  227   * MODE_ID:
e954f77f6330028 Simon Ser           2020-05-21  228   * 	Atomic property for setting the CRTC display timings. The value is the
e954f77f6330028 Simon Ser           2020-05-21  229   * 	ID of a blob containing the DRM mode info. To disable the CRTC,
e954f77f6330028 Simon Ser           2020-05-21  230   * 	user-space must set this property to 0.
e954f77f6330028 Simon Ser           2020-05-21  231   *
e954f77f6330028 Simon Ser           2020-05-21  232   * 	Setting MODE_ID to 0 will release reserved resources for the CRTC.
e954f77f6330028 Simon Ser           2020-05-21  233   */
e954f77f6330028 Simon Ser           2020-05-21  234  
236b7bc44ae0fde Philipp Zabel       2020-08-26  235  static int __drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc,
e13161af80c185e Matt Roper          2014-04-01  236  				       struct drm_plane *primary,
fc1d3e44ef7c1db Matt Roper          2014-06-10  237  				       struct drm_plane *cursor,
f98828769c8838f Ville Syrjälä       2015-12-09  238  				       const struct drm_crtc_funcs *funcs,
236b7bc44ae0fde Philipp Zabel       2020-08-26  239  				       const char *name, va_list ap)
f453ba0460742ad Dave Airlie         2008-11-07  240  {
51fd371bbaf9401 Rob Clark           2013-11-19  241  	struct drm_mode_config *config = &dev->mode_config;
6bfc56aa89f963b Ville Syrjälä       2012-03-13  242  	int ret;
6bfc56aa89f963b Ville Syrjälä       2012-03-13  243  
522cf91f30cb010 Benjamin Gaignard   2015-03-17  244  	WARN_ON(primary && primary->type != DRM_PLANE_TYPE_PRIMARY);
522cf91f30cb010 Benjamin Gaignard   2015-03-17  245  	WARN_ON(cursor && cursor->type != DRM_PLANE_TYPE_CURSOR);
522cf91f30cb010 Benjamin Gaignard   2015-03-17  246  
2a8d3eac3d6e116 Ville Syrjälä       2018-01-25  247  	/* crtc index is used with 32bit bitmasks */
2a8d3eac3d6e116 Ville Syrjälä       2018-01-25  248  	if (WARN_ON(config->num_crtc >= 32))
2a8d3eac3d6e116 Ville Syrjälä       2018-01-25  249  		return -EINVAL;
2a8d3eac3d6e116 Ville Syrjälä       2018-01-25  250  
ba1f665f161ce11 Haneen Mohammed     2018-05-25  251  	WARN_ON(drm_drv_uses_atomic_modeset(dev) &&
ba1f665f161ce11 Haneen Mohammed     2018-05-25  252  		(!funcs->atomic_destroy_state ||
ba1f665f161ce11 Haneen Mohammed     2018-05-25  253  		 !funcs->atomic_duplicate_state));
ba1f665f161ce11 Haneen Mohammed     2018-05-25  254  
f453ba0460742ad Dave Airlie         2008-11-07  255  	crtc->dev = dev;
f453ba0460742ad Dave Airlie         2008-11-07  256  	crtc->funcs = funcs;
f453ba0460742ad Dave Airlie         2008-11-07  257  
3b24f7d67581659 Daniel Vetter       2016-06-08  258  	INIT_LIST_HEAD(&crtc->commit_list);
3b24f7d67581659 Daniel Vetter       2016-06-08  259  	spin_lock_init(&crtc->commit_lock);
3b24f7d67581659 Daniel Vetter       2016-06-08  260  
51fd371bbaf9401 Rob Clark           2013-11-19  261  	drm_modeset_lock_init(&crtc->mutex);
2135ea7aafa26b6 Thierry Reding      2017-02-28  262  	ret = drm_mode_object_add(dev, &crtc->base, DRM_MODE_OBJECT_CRTC);
6bfc56aa89f963b Ville Syrjälä       2012-03-13  263  	if (ret)
baf698b0496e93f Daniel Vetter       2014-11-12  264  		return ret;
f453ba0460742ad Dave Airlie         2008-11-07  265  
fa3ab4c2113c74a Ville Syrjälä       2015-12-08  266  	if (name) {
fa3ab4c2113c74a Ville Syrjälä       2015-12-08 @267  		crtc->name = kvasprintf(GFP_KERNEL, name, ap);
fa3ab4c2113c74a Ville Syrjälä       2015-12-08  268  	} else {
fa3ab4c2113c74a Ville Syrjälä       2015-12-08  269  		crtc->name = kasprintf(GFP_KERNEL, "crtc-%d",
fa3ab4c2113c74a Ville Syrjälä       2015-12-08  270  				       drm_num_crtcs(dev));
fa3ab4c2113c74a Ville Syrjälä       2015-12-08  271  	}
fa3ab4c2113c74a Ville Syrjälä       2015-12-08  272  	if (!crtc->name) {
7c8f6d2577c7565 Dave Airlie         2016-04-15  273  		drm_mode_object_unregister(dev, &crtc->base);
fa3ab4c2113c74a Ville Syrjälä       2015-12-08  274  		return -ENOMEM;
fa3ab4c2113c74a Ville Syrjälä       2015-12-08  275  	}
fa3ab4c2113c74a Ville Syrjälä       2015-12-08  276  
6d6003c4b613c93 Gustavo Padovan     2016-11-15  277  	crtc->fence_context = dma_fence_context_alloc(1);
6d6003c4b613c93 Gustavo Padovan     2016-11-15  278  	spin_lock_init(&crtc->fence_lock);
6d6003c4b613c93 Gustavo Padovan     2016-11-15  279  	snprintf(crtc->timeline_name, sizeof(crtc->timeline_name),
6d6003c4b613c93 Gustavo Padovan     2016-11-15  280  		 "CRTC:%d-%s", crtc->base.id, crtc->name);
6d6003c4b613c93 Gustavo Padovan     2016-11-15  281  
bffd9de02977025 Paulo Zanoni        2012-05-15  282  	crtc->base.properties = &crtc->properties;
bffd9de02977025 Paulo Zanoni        2012-05-15  283  
51fd371bbaf9401 Rob Clark           2013-11-19  284  	list_add_tail(&crtc->head, &config->crtc_list);
490d3d1b91201fd Chris Wilson        2016-05-27  285  	crtc->index = config->num_crtc++;
6bfc56aa89f963b Ville Syrjälä       2012-03-13  286  
e13161af80c185e Matt Roper          2014-04-01  287  	crtc->primary = primary;
fc1d3e44ef7c1db Matt Roper          2014-06-10  288  	crtc->cursor = cursor;
7abc7d47510c75d Rob Clark           2016-11-05  289  	if (primary && !primary->possible_crtcs)
6a52193bd0dd683 Ville Syrjälä       2018-06-26  290  		primary->possible_crtcs = drm_crtc_mask(crtc);
7abc7d47510c75d Rob Clark           2016-11-05  291  	if (cursor && !cursor->possible_crtcs)
6a52193bd0dd683 Ville Syrjälä       2018-06-26  292  		cursor->possible_crtcs = drm_crtc_mask(crtc);
e13161af80c185e Matt Roper          2014-04-01  293  
9edbf1fa600a2ef Tomeu Vizoso        2016-10-06  294  	ret = drm_crtc_crc_init(crtc);
9edbf1fa600a2ef Tomeu Vizoso        2016-10-06  295  	if (ret) {
9edbf1fa600a2ef Tomeu Vizoso        2016-10-06  296  		drm_mode_object_unregister(dev, &crtc->base);
9edbf1fa600a2ef Tomeu Vizoso        2016-10-06  297  		return ret;
9edbf1fa600a2ef Tomeu Vizoso        2016-10-06  298  	}
9edbf1fa600a2ef Tomeu Vizoso        2016-10-06  299  
eab3bbeffd15212 Daniel Vetter       2015-01-22  300  	if (drm_core_check_feature(dev, DRIVER_ATOMIC)) {
eab3bbeffd15212 Daniel Vetter       2015-01-22  301  		drm_object_attach_property(&crtc->base, config->prop_active, 0);
955f3c334f0fb2b Daniel Stone        2015-05-25  302  		drm_object_attach_property(&crtc->base, config->prop_mode_id, 0);
beaf5af48034c9e Gustavo Padovan     2016-11-16  303  		drm_object_attach_property(&crtc->base,
beaf5af48034c9e Gustavo Padovan     2016-11-16  304  					   config->prop_out_fence_ptr, 0);
1398958cfd8d331 Nicholas Kazlauskas 2018-10-04  305  		drm_object_attach_property(&crtc->base,
1398958cfd8d331 Nicholas Kazlauskas 2018-10-04  306  					   config->prop_vrr_enabled, 0);
eab3bbeffd15212 Daniel Vetter       2015-01-22  307  	}
eab3bbeffd15212 Daniel Vetter       2015-01-22  308  
baf698b0496e93f Daniel Vetter       2014-11-12  309  	return 0;
f453ba0460742ad Dave Airlie         2008-11-07  310  }
236b7bc44ae0fde Philipp Zabel       2020-08-26  311  

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux