[radeon-alex:amd-19.50 1962/2687] include/kcl/kcl_drm.h:191:9: error: too few arguments to function 'drm_encoder_init'

kbuild test robot lkp at intel.com
Thu Jan 9 23:50:57 UTC 2020


Hi Yifan,

FYI, the error/warning still remains.

tree:   git://people.freedesktop.org/~agd5f/linux.git amd-19.50
head:   02692309efa6ad48d47894e40fcb3832ace49c4c
commit: 35781c0b8d19ed0d1bdb8cfa85780841ea7985ff [1962/2687] drm/amdkcl: Test whether drm_encoder_init() wants name
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        git checkout 35781c0b8d19ed0d1bdb8cfa85780841ea7985ff
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h:98:1: error: conflicting types for 'drm_fb_helper_remove_conflicting_framebuffers'
    drm_fb_helper_remove_conflicting_framebuffers(struct apertures_struct *a,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/kcl/kcl_drm.h:7:0,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_fb_helper.h:589:1: note: previous definition of 'drm_fb_helper_remove_conflicting_framebuffers' was here
    drm_fb_helper_remove_conflicting_framebuffers(struct apertures_struct *a,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h: In function 'kcl_drm_encoder_init':
>> include/kcl/kcl_drm.h:191:9: error: too few arguments to function 'drm_encoder_init'
     return drm_encoder_init(dev, encoder, funcs,
            ^~~~~~~~~~~~~~~~
   In file included from include/drm/drm_modeset_helper_vtables.h:33:0,
                    from include/drm/drm_atomic_helper.h:32,
                    from include/kcl/kcl_drm.h:10,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_encoder.h:183:5: note: declared here
    int drm_encoder_init(struct drm_device *dev,
        ^~~~~~~~~~~~~~~~

vim +/drm_encoder_init +191 include/kcl/kcl_drm.h

950c9c93299ece Junwei Zhang   2016-12-23    3  
950c9c93299ece Junwei Zhang   2016-12-23    4  #include <linux/version.h>
7e18f7a415538c Evan Quan      2019-02-18    5  #include <linux/kconfig.h>
950c9c93299ece Junwei Zhang   2016-12-23    6  #include <drm/drmP.h>
950c9c93299ece Junwei Zhang   2016-12-23   @7  #include <drm/drm_fb_helper.h>
950c9c93299ece Junwei Zhang   2016-12-23    8  #include <drm/drm_atomic.h>
950c9c93299ece Junwei Zhang   2016-12-23    9  #include <drm/drm_gem.h>
950c9c93299ece Junwei Zhang   2016-12-23   10  #include <drm/drm_atomic_helper.h>
cc3188c9ec1202 Evan Quan      2017-05-11   11  #include <drm/drm_fourcc.h>
7e18f7a415538c Evan Quan      2019-02-18   12  #include <drm/drm_rect.h>
7e18f7a415538c Evan Quan      2019-02-18   13  #include <drm/drm_modes.h>
cc3188c9ec1202 Evan Quan      2017-05-11   14  #include <linux/ctype.h>
5027d12c82b867 changzhu       2019-04-03   15  #if DRM_VERSION_CODE >= DRM_VERSION(4, 13, 0)
5027d12c82b867 changzhu       2019-04-03   16  #include <drm/drm_syncobj.h>
5027d12c82b867 changzhu       2019-04-03   17  #endif
950c9c93299ece Junwei Zhang   2016-12-23   18  
7e18f7a415538c Evan Quan      2019-02-18   19  #ifndef DRM_MODE_ROTATE_0
7e18f7a415538c Evan Quan      2019-02-18   20  #define DRM_MODE_ROTATE_0       (1<<0)
7e18f7a415538c Evan Quan      2019-02-18   21  #endif
7e18f7a415538c Evan Quan      2019-02-18   22  #ifndef DRM_MODE_ROTATE_90
7e18f7a415538c Evan Quan      2019-02-18   23  #define DRM_MODE_ROTATE_90      (1<<1)
7e18f7a415538c Evan Quan      2019-02-18   24  #endif
7e18f7a415538c Evan Quan      2019-02-18   25  #ifndef DRM_MODE_ROTATE_180
7e18f7a415538c Evan Quan      2019-02-18   26  #define DRM_MODE_ROTATE_180     (1<<2)
7e18f7a415538c Evan Quan      2019-02-18   27  #endif
7e18f7a415538c Evan Quan      2019-02-18   28  #ifndef DRM_MODE_ROTATE_270
7e18f7a415538c Evan Quan      2019-02-18   29  #define DRM_MODE_ROTATE_270     (1<<3)
7e18f7a415538c Evan Quan      2019-02-18   30  #endif
7e18f7a415538c Evan Quan      2019-02-18   31  
7e18f7a415538c Evan Quan      2019-02-18   32  #ifndef DRM_MODE_ROTATE_MASK
7e18f7a415538c Evan Quan      2019-02-18   33  #define DRM_MODE_ROTATE_MASK (\
7e18f7a415538c Evan Quan      2019-02-18   34  		DRM_MODE_ROTATE_0  | \
7e18f7a415538c Evan Quan      2019-02-18   35  		DRM_MODE_ROTATE_90  | \
7e18f7a415538c Evan Quan      2019-02-18   36  		DRM_MODE_ROTATE_180 | \
7e18f7a415538c Evan Quan      2019-02-18   37  		DRM_MODE_ROTATE_270)
7e18f7a415538c Evan Quan      2019-02-18   38  #endif
7e18f7a415538c Evan Quan      2019-02-18   39  
950c9c93299ece Junwei Zhang   2016-12-23   40  extern void (*_kcl_drm_fb_helper_set_suspend)(struct drm_fb_helper *fb_helper, int state);
950c9c93299ece Junwei Zhang   2016-12-23   41  extern void
950c9c93299ece Junwei Zhang   2016-12-23   42  (*_kcl_drm_atomic_helper_update_legacy_modeset_state)(struct drm_device *dev,
950c9c93299ece Junwei Zhang   2016-12-23   43  					      struct drm_atomic_state *old_state);
950c9c93299ece Junwei Zhang   2016-12-23   44  
e36c5eb8e827b3 Slava Grigorev 2018-06-25   45  #if !defined(HAVE_DRM_MODESET_LOCK_ALL_CTX)
7e18f7a415538c Evan Quan      2019-02-18   46  int drm_modeset_lock_all_ctx(struct drm_device *dev,
7e18f7a415538c Evan Quan      2019-02-18   47  			     struct drm_modeset_acquire_ctx *ctx);
e36c5eb8e827b3 Slava Grigorev 2018-06-25   48  #endif
e36c5eb8e827b3 Slava Grigorev 2018-06-25   49  
9f78b521bc9fc5 Slava Grigorev 2018-06-25   50  #if !defined(HAVE_DRM_ATOMIC_HELPER_DISABLE_ALL)
9f78b521bc9fc5 Slava Grigorev 2018-06-25   51  int drm_atomic_helper_disable_all(struct drm_device *dev,
9f78b521bc9fc5 Slava Grigorev 2018-06-25   52  				  struct drm_modeset_acquire_ctx *ctx);
9f78b521bc9fc5 Slava Grigorev 2018-06-25   53  #endif
9f78b521bc9fc5 Slava Grigorev 2018-06-25   54  
fb33688c00aea9 Slava Grigorev 2018-06-26   55  #if !defined(HAVE_DRM_ATOMIC_HELPER_DUPLICATE_STATE)
7e18f7a415538c Evan Quan      2019-02-18   56  struct drm_atomic_state *
7e18f7a415538c Evan Quan      2019-02-18   57  drm_atomic_helper_duplicate_state(struct drm_device *dev,
7e18f7a415538c Evan Quan      2019-02-18   58  				  struct drm_modeset_acquire_ctx *ctx);
7e18f7a415538c Evan Quan      2019-02-18   59  #endif
fb33688c00aea9 Slava Grigorev 2018-06-26   60  
92f741fc38a3f4 Slava Grigorev 2018-06-26   61  #if !defined(HAVE_DRM_ATOMIC_HELPER_SUSPEND)
92f741fc38a3f4 Slava Grigorev 2018-06-26   62  struct drm_atomic_state *drm_atomic_helper_suspend(struct drm_device *dev);
92f741fc38a3f4 Slava Grigorev 2018-06-26   63  #endif
92f741fc38a3f4 Slava Grigorev 2018-06-26   64  
9400fab1ce949b Slava Grigorev 2018-06-26   65  #if !defined(HAVE_DRM_ATOMIC_HELPER_RESUME)
7e18f7a415538c Evan Quan      2019-02-18   66  int drm_atomic_helper_resume(struct drm_device *dev,
7e18f7a415538c Evan Quan      2019-02-18   67  			     struct drm_atomic_state *state);
7e18f7a415538c Evan Quan      2019-02-18   68  #endif
7e18f7a415538c Evan Quan      2019-02-18   69  
e88cb29d12208d Slava Grigorev 2018-07-10   70  #if !defined(HAVE_DRM_CRTC_FORCE_DISABLE_ALL)
7e18f7a415538c Evan Quan      2019-02-18   71  extern int drm_crtc_force_disable_all(struct drm_device *dev);
7e18f7a415538c Evan Quan      2019-02-18   72  #endif
7e18f7a415538c Evan Quan      2019-02-18   73  
14b8fa4fd168f0 Slava Grigorev 2018-07-13   74  #if !defined(HAVE_DRM_FB_HELPER_REMOVE_CONFLICTING_FRAMEBUFFERS)
7e18f7a415538c Evan Quan      2019-02-18   75  
25c22db6ac59d5 Yifan Zhang    2019-07-12   76  #if !defined(IS_REACHABLE)
7e18f7a415538c Evan Quan      2019-02-18   77  #define __ARG_PLACEHOLDER_1 0,
7e18f7a415538c Evan Quan      2019-02-18   78  #define __take_second_arg(__ignored, val, ...) val
7e18f7a415538c Evan Quan      2019-02-18   79  
7e18f7a415538c Evan Quan      2019-02-18   80  /*
7e18f7a415538c Evan Quan      2019-02-18   81   * The use of "&&" / "||" is limited in certain expressions.
7e18f7a415538c Evan Quan      2019-02-18   82   * The followings enable to calculate "and" / "or" with macro expansion only.
7e18f7a415538c Evan Quan      2019-02-18   83   */
7e18f7a415538c Evan Quan      2019-02-18   84  #define __and(x, y)			___and(x, y)
7e18f7a415538c Evan Quan      2019-02-18   85  #define ___and(x, y)			____and(__ARG_PLACEHOLDER_##x, y)
7e18f7a415538c Evan Quan      2019-02-18   86  #define ____and(arg1_or_junk, y)	__take_second_arg(arg1_or_junk y, 0)
7e18f7a415538c Evan Quan      2019-02-18   87  
7e18f7a415538c Evan Quan      2019-02-18   88  #define __or(x, y)			___or(x, y)
7e18f7a415538c Evan Quan      2019-02-18   89  #define ___or(x, y)			____or(__ARG_PLACEHOLDER_##x, y)
7e18f7a415538c Evan Quan      2019-02-18   90  #define ____or(arg1_or_junk, y)		__take_second_arg(arg1_or_junk 1, y)
7e18f7a415538c Evan Quan      2019-02-18   91  
7e18f7a415538c Evan Quan      2019-02-18   92  #define IS_REACHABLE(option) __or(IS_BUILTIN(option), \
7e18f7a415538c Evan Quan      2019-02-18   93  				__and(IS_MODULE(option), __is_defined(MODULE)))
7e18f7a415538c Evan Quan      2019-02-18   94  #endif
7e18f7a415538c Evan Quan      2019-02-18   95  
2707e9e12e8c57 Slava Grigorev 2018-07-12   96  #if !defined(HAVE_REMOVE_CONFLICTING_FRAMEBUFFERS_RETURNS_INT)
7e18f7a415538c Evan Quan      2019-02-18   97  static inline void
7e18f7a415538c Evan Quan      2019-02-18   98  drm_fb_helper_remove_conflicting_framebuffers(struct apertures_struct *a,
7e18f7a415538c Evan Quan      2019-02-18   99  					      const char *name, bool primary)
7e18f7a415538c Evan Quan      2019-02-18  100  {
7e18f7a415538c Evan Quan      2019-02-18  101  #if IS_REACHABLE(CONFIG_FB)
7e18f7a415538c Evan Quan      2019-02-18  102  	remove_conflicting_framebuffers(a, name, primary);
7e18f7a415538c Evan Quan      2019-02-18  103  #else
7e18f7a415538c Evan Quan      2019-02-18  104  	return;
7e18f7a415538c Evan Quan      2019-02-18  105  #endif
7e18f7a415538c Evan Quan      2019-02-18  106  }
7e18f7a415538c Evan Quan      2019-02-18  107  #else
7e18f7a415538c Evan Quan      2019-02-18  108  static inline int
7e18f7a415538c Evan Quan      2019-02-18  109  drm_fb_helper_remove_conflicting_framebuffers(struct apertures_struct *a,
7e18f7a415538c Evan Quan      2019-02-18  110  					      const char *name, bool primary)
7e18f7a415538c Evan Quan      2019-02-18  111  {
7e18f7a415538c Evan Quan      2019-02-18  112  #if IS_REACHABLE(CONFIG_FB)
7e18f7a415538c Evan Quan      2019-02-18  113  	return remove_conflicting_framebuffers(a, name, primary);
7e18f7a415538c Evan Quan      2019-02-18  114  #else
7e18f7a415538c Evan Quan      2019-02-18  115  	return 0;
7e18f7a415538c Evan Quan      2019-02-18  116  #endif
7e18f7a415538c Evan Quan      2019-02-18  117  }
7e18f7a415538c Evan Quan      2019-02-18  118  #endif
7e18f7a415538c Evan Quan      2019-02-18  119  #endif
7e18f7a415538c Evan Quan      2019-02-18  120  
950c9c93299ece Junwei Zhang   2016-12-23  121  static inline void kcl_drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, int state)
950c9c93299ece Junwei Zhang   2016-12-23  122  {
950c9c93299ece Junwei Zhang   2016-12-23  123  #ifdef BUILD_AS_DKMS
950c9c93299ece Junwei Zhang   2016-12-23  124  	_kcl_drm_fb_helper_set_suspend(fb_helper, state);
950c9c93299ece Junwei Zhang   2016-12-23  125  #else
950c9c93299ece Junwei Zhang   2016-12-23  126  	drm_fb_helper_set_suspend(fb_helper, state);
950c9c93299ece Junwei Zhang   2016-12-23  127  #endif
950c9c93299ece Junwei Zhang   2016-12-23  128  }
950c9c93299ece Junwei Zhang   2016-12-23  129  
950c9c93299ece Junwei Zhang   2016-12-23  130  static inline void
950c9c93299ece Junwei Zhang   2016-12-23  131  kcl_drm_atomic_helper_update_legacy_modeset_state(struct drm_device *dev,
950c9c93299ece Junwei Zhang   2016-12-23  132  					      struct drm_atomic_state *old_state)
950c9c93299ece Junwei Zhang   2016-12-23  133  {
950c9c93299ece Junwei Zhang   2016-12-23  134  #ifdef BUILD_AS_DKMS
950c9c93299ece Junwei Zhang   2016-12-23  135  	_kcl_drm_atomic_helper_update_legacy_modeset_state(dev, old_state);
950c9c93299ece Junwei Zhang   2016-12-23  136  #else
950c9c93299ece Junwei Zhang   2016-12-23  137  	drm_atomic_helper_update_legacy_modeset_state(dev, old_state);
950c9c93299ece Junwei Zhang   2016-12-23  138  #endif
950c9c93299ece Junwei Zhang   2016-12-23  139  }
950c9c93299ece Junwei Zhang   2016-12-23  140  
950c9c93299ece Junwei Zhang   2016-12-23  141  #ifndef DRM_DEBUG_VBL
950c9c93299ece Junwei Zhang   2016-12-23  142  #define DRM_UT_VBL		0x20
950c9c93299ece Junwei Zhang   2016-12-23  143  #define DRM_DEBUG_VBL(fmt, args...)					\
950c9c93299ece Junwei Zhang   2016-12-23  144  	do {								\
950c9c93299ece Junwei Zhang   2016-12-23  145  		if (unlikely(drm_debug & DRM_UT_VBL))			\
950c9c93299ece Junwei Zhang   2016-12-23  146  			drm_ut_debug_printk(__func__, fmt, ##args);	\
950c9c93299ece Junwei Zhang   2016-12-23  147  	} while (0)
950c9c93299ece Junwei Zhang   2016-12-23  148  #endif
950c9c93299ece Junwei Zhang   2016-12-23  149  
950c9c93299ece Junwei Zhang   2016-12-23  150  static inline bool kcl_drm_arch_can_wc_memory(void)
950c9c93299ece Junwei Zhang   2016-12-23  151  {
950c9c93299ece Junwei Zhang   2016-12-23  152  #if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
950c9c93299ece Junwei Zhang   2016-12-23  153  	return false;
950c9c93299ece Junwei Zhang   2016-12-23  154  #elif defined(CONFIG_MIPS) && defined(CONFIG_CPU_LOONGSON3)
950c9c93299ece Junwei Zhang   2016-12-23  155  	return false;
950c9c93299ece Junwei Zhang   2016-12-23  156  #else
950c9c93299ece Junwei Zhang   2016-12-23  157  	return true;
950c9c93299ece Junwei Zhang   2016-12-23  158  #endif
950c9c93299ece Junwei Zhang   2016-12-23  159  }
950c9c93299ece Junwei Zhang   2016-12-23  160  
5027d12c82b867 changzhu       2019-04-03  161  #if DRM_VERSION_CODE >= DRM_VERSION(4, 13, 0)
5027d12c82b867 changzhu       2019-04-03  162  static inline int kcl_drm_syncobj_find_fence(struct drm_file *file_private,
5027d12c82b867 changzhu       2019-04-03  163  						u32 handle, u64 point, u64 flags,
5027d12c82b867 changzhu       2019-04-03  164  						struct dma_fence **fence)
5027d12c82b867 changzhu       2019-04-03  165  {
5027d12c82b867 changzhu       2019-04-03  166  #if defined(BUILD_AS_DKMS)
5027d12c82b867 changzhu       2019-04-03  167  #if DRM_VERSION_CODE < DRM_VERSION(4, 14, 0)
5027d12c82b867 changzhu       2019-04-03  168  	return drm_syncobj_fence_get(file_private, handle, fence);
5027d12c82b867 changzhu       2019-04-03  169  #elif DRM_VERSION_CODE < DRM_VERSION(4, 20, 0)
5027d12c82b867 changzhu       2019-04-03  170  	return drm_syncobj_find_fence(file_private, handle, fence);
5027d12c82b867 changzhu       2019-04-03  171  #elif DRM_VERSION_CODE < DRM_VERSION(5, 0, 0)
5027d12c82b867 changzhu       2019-04-03  172  	return drm_syncobj_find_fence(file_private, handle, point, fence);
5027d12c82b867 changzhu       2019-04-03  173  #else
5027d12c82b867 changzhu       2019-04-03  174  	return drm_syncobj_find_fence(file_private, handle, point, flags, fence);
5027d12c82b867 changzhu       2019-04-03  175  #endif
5027d12c82b867 changzhu       2019-04-03  176  #else
5027d12c82b867 changzhu       2019-04-03  177  	return drm_syncobj_find_fence(file_private, handle, point, flags, fence);
5027d12c82b867 changzhu       2019-04-03  178  #endif
5027d12c82b867 changzhu       2019-04-03  179  }
5027d12c82b867 changzhu       2019-04-03  180  #endif
5027d12c82b867 changzhu       2019-04-03  181  
950c9c93299ece Junwei Zhang   2016-12-23  182  static inline int kcl_drm_encoder_init(struct drm_device *dev,
950c9c93299ece Junwei Zhang   2016-12-23  183  		      struct drm_encoder *encoder,
950c9c93299ece Junwei Zhang   2016-12-23  184  		      const struct drm_encoder_funcs *funcs,
950c9c93299ece Junwei Zhang   2016-12-23  185  		      int encoder_type, const char *name, ...)
950c9c93299ece Junwei Zhang   2016-12-23  186  {
35781c0b8d19ed Yifan Zhang    2019-07-15  187  #if defined(HAVE_DRM_ENCODER_INIT_VALID_WITH_NAME)
950c9c93299ece Junwei Zhang   2016-12-23  188  	return drm_encoder_init(dev, encoder, funcs,
950c9c93299ece Junwei Zhang   2016-12-23  189  			 encoder_type, name);
950c9c93299ece Junwei Zhang   2016-12-23  190  #else
950c9c93299ece Junwei Zhang   2016-12-23 @191  	return drm_encoder_init(dev, encoder, funcs,
950c9c93299ece Junwei Zhang   2016-12-23  192  			 encoder_type);
950c9c93299ece Junwei Zhang   2016-12-23  193  #endif
950c9c93299ece Junwei Zhang   2016-12-23  194  }
950c9c93299ece Junwei Zhang   2016-12-23  195  

:::::: The code at line 191 was first introduced by commit
:::::: 950c9c93299eceb8cca4b12eb09a04a48d383ec6 drm/amdkcl: [4.5] fix drm encoder and plane functions

:::::: TO: Junwei Zhang <Jerry.Zhang at amd.com>
:::::: CC: Chengming Gui <Jack.Gui at amd.com>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 68191 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200110/6005ed9c/attachment-0001.gz>


More information about the dri-devel mailing list