Re: [PATCH 1/4] drm: Plumb modifiers through plane init

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

 



Hi Ben,

[auto build test ERROR on drm/drm-next]
[also build test ERROR on v4.13-rc2 next-20170724]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Ben-Widawsky/drm-Plumb-modifiers-through-plane-init/20170725-062539
base:   git://people.freedesktop.org/~airlied/linux.git drm-next
config: arm-sunxi_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All error/warnings (new ones prefixed by >>):

   drivers/gpu/drm/sun4i/sun8i_layer.c: In function 'sun8i_layer_init_one':
>> drivers/gpu/drm/sun4i/sun8i_layer.c:93:12: error: incompatible type for argument 7 of 'drm_universal_plane_init'
               plane->type, NULL);
               ^~~~~
   In file included from include/drm/drm_crtc.h:45:0,
                    from include/drm/drm_atomic_helper.h:31,
                    from drivers/gpu/drm/sun4i/sun8i_layer.c:16:
   include/drm/drm_plane.h:550:5: note: expected 'const uint64_t * {aka const long long unsigned int *}' but argument is of type 'const enum drm_plane_type'
    int drm_universal_plane_init(struct drm_device *dev,
        ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/uapi/linux/posix_types.h:4:0,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/mod_devicetable.h:11,
                    from include/linux/i2c.h:29,
                    from include/drm/drm_crtc.h:28,
                    from include/drm/drm_atomic_helper.h:31,
                    from drivers/gpu/drm/sun4i/sun8i_layer.c:16:
>> include/linux/stddef.h:7:14: error: incompatible type for argument 8 of 'drm_universal_plane_init'
    #define NULL ((void *)0)
                 ^
>> drivers/gpu/drm/sun4i/sun8i_layer.c:93:25: note: in expansion of macro 'NULL'
               plane->type, NULL);
                            ^~~~
   In file included from include/drm/drm_crtc.h:45:0,
                    from include/drm/drm_atomic_helper.h:31,
                    from drivers/gpu/drm/sun4i/sun8i_layer.c:16:
   include/drm/drm_plane.h:550:5: note: expected 'enum drm_plane_type' but argument is of type 'void *'
    int drm_universal_plane_init(struct drm_device *dev,
        ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/sun4i/sun8i_layer.c:90:8: error: too few arguments to function 'drm_universal_plane_init'
     ret = drm_universal_plane_init(drm, &layer->plane, 0,
           ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drm_crtc.h:45:0,
                    from include/drm/drm_atomic_helper.h:31,
                    from drivers/gpu/drm/sun4i/sun8i_layer.c:16:
   include/drm/drm_plane.h:550:5: note: declared here
    int drm_universal_plane_init(struct drm_device *dev,
        ^~~~~~~~~~~~~~~~~~~~~~~~
--
   drivers/gpu//drm/sun4i/sun8i_layer.c: In function 'sun8i_layer_init_one':
   drivers/gpu//drm/sun4i/sun8i_layer.c:93:12: error: incompatible type for argument 7 of 'drm_universal_plane_init'
               plane->type, NULL);
               ^~~~~
   In file included from include/drm/drm_crtc.h:45:0,
                    from include/drm/drm_atomic_helper.h:31,
                    from drivers/gpu//drm/sun4i/sun8i_layer.c:16:
   include/drm/drm_plane.h:550:5: note: expected 'const uint64_t * {aka const long long unsigned int *}' but argument is of type 'const enum drm_plane_type'
    int drm_universal_plane_init(struct drm_device *dev,
        ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/uapi/linux/posix_types.h:4:0,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/mod_devicetable.h:11,
                    from include/linux/i2c.h:29,
                    from include/drm/drm_crtc.h:28,
                    from include/drm/drm_atomic_helper.h:31,
                    from drivers/gpu//drm/sun4i/sun8i_layer.c:16:
>> include/linux/stddef.h:7:14: error: incompatible type for argument 8 of 'drm_universal_plane_init'
    #define NULL ((void *)0)
                 ^
   drivers/gpu//drm/sun4i/sun8i_layer.c:93:25: note: in expansion of macro 'NULL'
               plane->type, NULL);
                            ^~~~
   In file included from include/drm/drm_crtc.h:45:0,
                    from include/drm/drm_atomic_helper.h:31,
                    from drivers/gpu//drm/sun4i/sun8i_layer.c:16:
   include/drm/drm_plane.h:550:5: note: expected 'enum drm_plane_type' but argument is of type 'void *'
    int drm_universal_plane_init(struct drm_device *dev,
        ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu//drm/sun4i/sun8i_layer.c:90:8: error: too few arguments to function 'drm_universal_plane_init'
     ret = drm_universal_plane_init(drm, &layer->plane, 0,
           ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drm_crtc.h:45:0,
                    from include/drm/drm_atomic_helper.h:31,
                    from drivers/gpu//drm/sun4i/sun8i_layer.c:16:
   include/drm/drm_plane.h:550:5: note: declared here
    int drm_universal_plane_init(struct drm_device *dev,
        ^~~~~~~~~~~~~~~~~~~~~~~~

vim +/drm_universal_plane_init +93 drivers/gpu/drm/sun4i/sun8i_layer.c

9d75b8c0 Icenowy Zheng 2017-05-17  @16  #include <drm/drm_atomic_helper.h>
9d75b8c0 Icenowy Zheng 2017-05-17   17  #include <drm/drm_plane_helper.h>
9d75b8c0 Icenowy Zheng 2017-05-17   18  #include <drm/drmP.h>
9d75b8c0 Icenowy Zheng 2017-05-17   19  
9d75b8c0 Icenowy Zheng 2017-05-17   20  #include "sun8i_layer.h"
9d75b8c0 Icenowy Zheng 2017-05-17   21  #include "sun8i_mixer.h"
9d75b8c0 Icenowy Zheng 2017-05-17   22  
9d75b8c0 Icenowy Zheng 2017-05-17   23  struct sun8i_plane_desc {
9d75b8c0 Icenowy Zheng 2017-05-17   24  	       enum drm_plane_type     type;
9d75b8c0 Icenowy Zheng 2017-05-17   25  	       const uint32_t          *formats;
9d75b8c0 Icenowy Zheng 2017-05-17   26  	       uint32_t                nformats;
9d75b8c0 Icenowy Zheng 2017-05-17   27  };
9d75b8c0 Icenowy Zheng 2017-05-17   28  
9d75b8c0 Icenowy Zheng 2017-05-17   29  static void sun8i_mixer_layer_atomic_disable(struct drm_plane *plane,
9d75b8c0 Icenowy Zheng 2017-05-17   30  					       struct drm_plane_state *old_state)
9d75b8c0 Icenowy Zheng 2017-05-17   31  {
9d75b8c0 Icenowy Zheng 2017-05-17   32  	struct sun8i_layer *layer = plane_to_sun8i_layer(plane);
9d75b8c0 Icenowy Zheng 2017-05-17   33  	struct sun8i_mixer *mixer = layer->mixer;
9d75b8c0 Icenowy Zheng 2017-05-17   34  
9d75b8c0 Icenowy Zheng 2017-05-17   35  	sun8i_mixer_layer_enable(mixer, layer->id, false);
9d75b8c0 Icenowy Zheng 2017-05-17   36  }
9d75b8c0 Icenowy Zheng 2017-05-17   37  
9d75b8c0 Icenowy Zheng 2017-05-17   38  static void sun8i_mixer_layer_atomic_update(struct drm_plane *plane,
9d75b8c0 Icenowy Zheng 2017-05-17   39  					      struct drm_plane_state *old_state)
9d75b8c0 Icenowy Zheng 2017-05-17   40  {
9d75b8c0 Icenowy Zheng 2017-05-17   41  	struct sun8i_layer *layer = plane_to_sun8i_layer(plane);
9d75b8c0 Icenowy Zheng 2017-05-17   42  	struct sun8i_mixer *mixer = layer->mixer;
9d75b8c0 Icenowy Zheng 2017-05-17   43  
9d75b8c0 Icenowy Zheng 2017-05-17   44  	sun8i_mixer_update_layer_coord(mixer, layer->id, plane);
9d75b8c0 Icenowy Zheng 2017-05-17   45  	sun8i_mixer_update_layer_formats(mixer, layer->id, plane);
9d75b8c0 Icenowy Zheng 2017-05-17   46  	sun8i_mixer_update_layer_buffer(mixer, layer->id, plane);
9d75b8c0 Icenowy Zheng 2017-05-17   47  	sun8i_mixer_layer_enable(mixer, layer->id, true);
9d75b8c0 Icenowy Zheng 2017-05-17   48  }
9d75b8c0 Icenowy Zheng 2017-05-17   49  
9d75b8c0 Icenowy Zheng 2017-05-17   50  static struct drm_plane_helper_funcs sun8i_mixer_layer_helper_funcs = {
9d75b8c0 Icenowy Zheng 2017-05-17   51  	.atomic_disable	= sun8i_mixer_layer_atomic_disable,
9d75b8c0 Icenowy Zheng 2017-05-17   52  	.atomic_update	= sun8i_mixer_layer_atomic_update,
9d75b8c0 Icenowy Zheng 2017-05-17   53  };
9d75b8c0 Icenowy Zheng 2017-05-17   54  
9d75b8c0 Icenowy Zheng 2017-05-17   55  static const struct drm_plane_funcs sun8i_mixer_layer_funcs = {
9d75b8c0 Icenowy Zheng 2017-05-17   56  	.atomic_destroy_state	= drm_atomic_helper_plane_destroy_state,
9d75b8c0 Icenowy Zheng 2017-05-17   57  	.atomic_duplicate_state	= drm_atomic_helper_plane_duplicate_state,
9d75b8c0 Icenowy Zheng 2017-05-17   58  	.destroy		= drm_plane_cleanup,
9d75b8c0 Icenowy Zheng 2017-05-17   59  	.disable_plane		= drm_atomic_helper_disable_plane,
9d75b8c0 Icenowy Zheng 2017-05-17   60  	.reset			= drm_atomic_helper_plane_reset,
9d75b8c0 Icenowy Zheng 2017-05-17   61  	.update_plane		= drm_atomic_helper_update_plane,
9d75b8c0 Icenowy Zheng 2017-05-17   62  };
9d75b8c0 Icenowy Zheng 2017-05-17   63  
9d75b8c0 Icenowy Zheng 2017-05-17   64  static const uint32_t sun8i_mixer_layer_formats[] = {
9d75b8c0 Icenowy Zheng 2017-05-17   65  	DRM_FORMAT_RGB888,
9d75b8c0 Icenowy Zheng 2017-05-17   66  	DRM_FORMAT_ARGB8888,
9d75b8c0 Icenowy Zheng 2017-05-17   67  	DRM_FORMAT_XRGB8888,
9d75b8c0 Icenowy Zheng 2017-05-17   68  };
9d75b8c0 Icenowy Zheng 2017-05-17   69  
9d75b8c0 Icenowy Zheng 2017-05-17   70  static const struct sun8i_plane_desc sun8i_mixer_planes[] = {
9d75b8c0 Icenowy Zheng 2017-05-17   71  	{
9d75b8c0 Icenowy Zheng 2017-05-17   72  		.type = DRM_PLANE_TYPE_PRIMARY,
9d75b8c0 Icenowy Zheng 2017-05-17   73  		.formats = sun8i_mixer_layer_formats,
9d75b8c0 Icenowy Zheng 2017-05-17   74  		.nformats = ARRAY_SIZE(sun8i_mixer_layer_formats),
9d75b8c0 Icenowy Zheng 2017-05-17   75  	},
9d75b8c0 Icenowy Zheng 2017-05-17   76  };
9d75b8c0 Icenowy Zheng 2017-05-17   77  
9d75b8c0 Icenowy Zheng 2017-05-17   78  static struct sun8i_layer *sun8i_layer_init_one(struct drm_device *drm,
9d75b8c0 Icenowy Zheng 2017-05-17   79  						struct sun8i_mixer *mixer,
9d75b8c0 Icenowy Zheng 2017-05-17   80  						const struct sun8i_plane_desc *plane)
9d75b8c0 Icenowy Zheng 2017-05-17   81  {
9d75b8c0 Icenowy Zheng 2017-05-17   82  	struct sun8i_layer *layer;
9d75b8c0 Icenowy Zheng 2017-05-17   83  	int ret;
9d75b8c0 Icenowy Zheng 2017-05-17   84  
9d75b8c0 Icenowy Zheng 2017-05-17   85  	layer = devm_kzalloc(drm->dev, sizeof(*layer), GFP_KERNEL);
9d75b8c0 Icenowy Zheng 2017-05-17   86  	if (!layer)
9d75b8c0 Icenowy Zheng 2017-05-17   87  		return ERR_PTR(-ENOMEM);
9d75b8c0 Icenowy Zheng 2017-05-17   88  
9d75b8c0 Icenowy Zheng 2017-05-17   89  	/* possible crtcs are set later */
9d75b8c0 Icenowy Zheng 2017-05-17  @90  	ret = drm_universal_plane_init(drm, &layer->plane, 0,
9d75b8c0 Icenowy Zheng 2017-05-17   91  				       &sun8i_mixer_layer_funcs,
9d75b8c0 Icenowy Zheng 2017-05-17   92  				       plane->formats, plane->nformats,
9d75b8c0 Icenowy Zheng 2017-05-17  @93  				       plane->type, NULL);
9d75b8c0 Icenowy Zheng 2017-05-17   94  	if (ret) {
9d75b8c0 Icenowy Zheng 2017-05-17   95  		dev_err(drm->dev, "Couldn't initialize layer\n");
9d75b8c0 Icenowy Zheng 2017-05-17   96  		return ERR_PTR(ret);
9d75b8c0 Icenowy Zheng 2017-05-17   97  	}
9d75b8c0 Icenowy Zheng 2017-05-17   98  
9d75b8c0 Icenowy Zheng 2017-05-17   99  	drm_plane_helper_add(&layer->plane,
9d75b8c0 Icenowy Zheng 2017-05-17  100  			     &sun8i_mixer_layer_helper_funcs);
9d75b8c0 Icenowy Zheng 2017-05-17  101  	layer->mixer = mixer;
9d75b8c0 Icenowy Zheng 2017-05-17  102  
9d75b8c0 Icenowy Zheng 2017-05-17  103  	return layer;
9d75b8c0 Icenowy Zheng 2017-05-17  104  }
9d75b8c0 Icenowy Zheng 2017-05-17  105  

:::::: The code at line 93 was first introduced by commit
:::::: 9d75b8c0b999663d85cddda2791bb15b5f4a8f4a drm/sun4i: add support for Allwinner DE2 mixers

:::::: TO: Icenowy Zheng <icenowy@xxxxxxx>
:::::: CC: Maxime Ripard <maxime.ripard@xxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux