[radeon-alex:amd-20.45 2392/2427] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9376:5: warning: no previous prototype for 'amdgpu_dm_dp_mst_add_affected_dsc_crtcs'

kernel test robot lkp at intel.com
Tue Dec 15 07:25:09 UTC 2020


tree:   git://people.freedesktop.org/~agd5f/linux.git amd-20.45
head:   a3950d94b046fb206e58fd3ec717f071c0203ba3
commit: 5dcf8eb3991298ab764be6f83eaa48f75d49e77a [2392/2427] drm/amd/display: add copy of drm_dp_mst_add_affected_dsc_crtc()
config: i386-randconfig-r022-20201214 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        git remote add radeon-alex git://people.freedesktop.org/~agd5f/linux.git
        git fetch --no-tags radeon-alex amd-20.45
        git checkout 5dcf8eb3991298ab764be6f83eaa48f75d49e77a
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

All warnings (new ones prefixed by >>):

                    from include/kcl/backport/kcl_fence_backport.h:4,
                    from drivers/gpu/drm/amd/backport/backport.h:13,
                    from <command-line>:
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'get_fb_info':
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3979:44: warning: passing argument 1 of 'drm_gem_fb_get_obj' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
    3979 |  rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
         |                                            ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:986:26: note: in definition of macro 'container_of'
     986 |  void *__mptr = (void *)(ptr);     \
         |                          ^~~
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3979:8: note: in expansion of macro 'gem_to_amdgpu_bo'
    3979 |  rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
         |        ^~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/amd/backport/include/kcl/kcl_amdgpu_drm_fb_helper.h:6,
                    from drivers/gpu/drm/amd/backport/backport.h:62,
                    from <command-line>:
   include/drm/drm_gem_framebuffer_helper.h:15:24: note: expected 'struct drm_framebuffer *' but argument is of type 'const struct drm_framebuffer *'
      15 | struct drm_gem_object *drm_gem_fb_get_obj(struct drm_framebuffer *fb,
         |                        ^~~~~~~~~~~~~~~~~~
   In file included from include/linux/rcupdate.h:24,
                    from include/kcl/kcl_rcupdate.h:5,
                    from include/kcl/kcl_fence.h:6,
                    from include/kcl/backport/kcl_fence_backport.h:4,
                    from drivers/gpu/drm/amd/backport/backport.h:13,
                    from <command-line>:
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3979:44: warning: passing argument 1 of 'drm_gem_fb_get_obj' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
    3979 |  rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
         |                                            ^~~~~~~~~~~~~~~~
   include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
     330 |   if (!(condition))     \
         |         ^~~~~~~~~
   include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
     350 |  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:987:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     987 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |  ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:987:20: note: in expansion of macro '__same_type'
     987 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                    ^~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h:34:32: note: in expansion of macro 'container_of'
      34 | #define gem_to_amdgpu_bo(gobj) container_of((gobj), struct amdgpu_bo, tbo.base)
         |                                ^~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3979:8: note: in expansion of macro 'gem_to_amdgpu_bo'
    3979 |  rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
         |        ^~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/amd/backport/include/kcl/kcl_amdgpu_drm_fb_helper.h:6,
                    from drivers/gpu/drm/amd/backport/backport.h:62,
                    from <command-line>:
   include/drm/drm_gem_framebuffer_helper.h:15:24: note: expected 'struct drm_framebuffer *' but argument is of type 'const struct drm_framebuffer *'
      15 | struct drm_gem_object *drm_gem_fb_get_obj(struct drm_framebuffer *fb,
         |                        ^~~~~~~~~~~~~~~~~~
   In file included from include/linux/rcupdate.h:24,
                    from include/kcl/kcl_rcupdate.h:5,
                    from include/kcl/kcl_fence.h:6,
                    from include/kcl/backport/kcl_fence_backport.h:4,
                    from drivers/gpu/drm/amd/backport/backport.h:13,
                    from <command-line>:
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3979:44: warning: passing argument 1 of 'drm_gem_fb_get_obj' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
    3979 |  rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
         |                                            ^~~~~~~~~~~~~~~~
   include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
     330 |   if (!(condition))     \
         |         ^~~~~~~~~
   include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
     350 |  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:987:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     987 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |  ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:988:6: note: in expansion of macro '__same_type'
     988 |     !__same_type(*(ptr), void),   \
         |      ^~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h:34:32: note: in expansion of macro 'container_of'
      34 | #define gem_to_amdgpu_bo(gobj) container_of((gobj), struct amdgpu_bo, tbo.base)
         |                                ^~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3979:8: note: in expansion of macro 'gem_to_amdgpu_bo'
    3979 |  rbo = gem_to_amdgpu_bo(drm_gem_fb_get_obj(&amdgpu_fb->base, 0));
         |        ^~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/amd/backport/include/kcl/kcl_amdgpu_drm_fb_helper.h:6,
                    from drivers/gpu/drm/amd/backport/backport.h:62,
                    from <command-line>:
   include/drm/drm_gem_framebuffer_helper.h:15:24: note: expected 'struct drm_framebuffer *' but argument is of type 'const struct drm_framebuffer *'
      15 | struct drm_gem_object *drm_gem_fb_get_obj(struct drm_framebuffer *fb,
         |                        ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'dm_update_mst_vcpi_slots_for_dsc':
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6227:46: warning: variable 'old_con_state' set but not used [-Wunused-but-set-variable]
    6227 |  struct drm_connector_state *new_con_state, *old_con_state;
         |                                              ^~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_commit_cursors':
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7697:44: warning: variable 'new_plane_state' set but not used [-Wunused-but-set-variable]
    7697 |  struct drm_plane_state *old_plane_state, *new_plane_state;
         |                                            ^~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: At top level:
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9376:5: warning: no previous prototype for 'amdgpu_dm_dp_mst_add_affected_dsc_crtcs' [-Wmissing-prototypes]
    9376 | int amdgpu_dm_dp_mst_add_affected_dsc_crtcs(struct drm_atomic_state *state, struct drm_dp_mst_topology_mgr *mgr)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_atomic_check':
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9544:25: warning: unused variable 'dm_old_crtc_state' [-Wunused-variable]
    9544 |   struct dm_crtc_state *dm_old_crtc_state  = to_dm_crtc_state(old_crtc_state);
         |                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9543:25: warning: unused variable 'dm_new_crtc_state' [-Wunused-variable]
    9543 |   struct dm_crtc_state *dm_new_crtc_state = to_dm_crtc_state(new_crtc_state);
         |                         ^~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:93:
   At top level:
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:208:29: warning: 'FUSE_BASE' defined but not used [-Wunused-const-variable=]
     208 | static const struct IP_BASE FUSE_BASE   = { { { { 0x00017400, 0, 0, 0, 0 } },
         |                             ^~~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:203:29: warning: 'CLK_BASE' defined but not used [-Wunused-const-variable=]
     203 | static const struct IP_BASE CLK_BASE   = { { { { 0x00016C00, 0, 0, 0, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:198:29: warning: 'PWR_BASE' defined but not used [-Wunused-const-variable=]
     198 | static const struct IP_BASE PWR_BASE   = { { { { 0x00016A00, 0, 0, 0, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:193:29: warning: 'SMUIO_BASE' defined but not used [-Wunused-const-variable=]
     193 | static const struct IP_BASE SMUIO_BASE   = { { { { 0x00016800, 0, 0, 0, 0 } },
         |                             ^~~~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:188:29: warning: 'THM_BASE' defined but not used [-Wunused-const-variable=]
     188 | static const struct IP_BASE THM_BASE   = { { { { 0x00016600, 0, 0, 0, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:183:29: warning: 'UMC_BASE' defined but not used [-Wunused-const-variable=]
     183 | static const struct IP_BASE UMC_BASE   = { { { { 0x00014000, 0, 0, 0, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:178:29: warning: 'XDMA_BASE' defined but not used [-Wunused-const-variable=]
     178 | static const struct IP_BASE XDMA_BASE   = { { { { 0x00003400, 0, 0, 0, 0 } },
         |                             ^~~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:173:29: warning: 'SDMA1_BASE' defined but not used [-Wunused-const-variable=]
     173 | static const struct IP_BASE SDMA1_BASE   = { { { { 0x00001460, 0, 0, 0, 0 } },
         |                             ^~~~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:168:29: warning: 'SDMA0_BASE' defined but not used [-Wunused-const-variable=]
     168 | static const struct IP_BASE SDMA0_BASE   = { { { { 0x00001260, 0, 0, 0, 0 } },
         |                             ^~~~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:163:29: warning: 'OSSSYS_BASE' defined but not used [-Wunused-const-variable=]
     163 | static const struct IP_BASE OSSSYS_BASE  = { { { { 0x000010A0, 0, 0, 0, 0 } },
         |                             ^~~~~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:158:29: warning: 'HDP_BASE' defined but not used [-Wunused-const-variable=]
     158 | static const struct IP_BASE HDP_BASE   = { { { { 0x00000F20, 0, 0, 0, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:153:29: warning: 'RSMU_BASE' defined but not used [-Wunused-const-variable=]
     153 | static const struct IP_BASE RSMU_BASE   = { { { { 0x00012000, 0, 0, 0, 0 } },
         |                             ^~~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:148:29: warning: 'MMHUB_BASE' defined but not used [-Wunused-const-variable=]
     148 | static const struct IP_BASE MMHUB_BASE   = { { { { 0x0001A000, 0, 0, 0, 0 } },
         |                             ^~~~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:143:29: warning: 'GC_BASE' defined but not used [-Wunused-const-variable=]
     143 | static const struct IP_BASE GC_BASE   = { { { { 0x00002000, 0x0000A000, 0, 0, 0 } },
         |                             ^~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:138:29: warning: 'VCE_BASE' defined but not used [-Wunused-const-variable=]
     138 | static const struct IP_BASE VCE_BASE   = { { { { 0x00007E00, 0x00048800, 0, 0, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:133:29: warning: 'ATHUB_BASE' defined but not used [-Wunused-const-variable=]
     133 | static const struct IP_BASE ATHUB_BASE   = { { { { 0x00000C20, 0, 0, 0, 0 } },
         |                             ^~~~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:128:29: warning: 'IOHC_BASE' defined but not used [-Wunused-const-variable=]
     128 | static const struct IP_BASE IOHC_BASE   = { { { { 0x00010000, 0, 0, 0, 0 } },
         |                             ^~~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:123:29: warning: 'L2IMU_BASE' defined but not used [-Wunused-const-variable=]
     123 | static const struct IP_BASE L2IMU_BASE   = { { { { 0x00007DC0, 0, 0, 0, 0 } },
         |                             ^~~~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:118:29: warning: 'SYSTEMHUB_BASE' defined but not used [-Wunused-const-variable=]
     118 | static const struct IP_BASE SYSTEMHUB_BASE  = { { { { 0x00000EA0, 0, 0, 0, 0 } },
         |                             ^~~~~~~~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:113:29: warning: 'ISP_BASE' defined but not used [-Wunused-const-variable=]
     113 | static const struct IP_BASE ISP_BASE   = { { { { 0x00018000, 0, 0, 0, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:108:29: warning: 'DFX_BASE' defined but not used [-Wunused-const-variable=]
     108 | static const struct IP_BASE DFX_BASE   = { { { { 0x00000580, 0, 0, 0, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:103:29: warning: 'DFX_DAP_BASE' defined but not used [-Wunused-const-variable=]
     103 | static const struct IP_BASE DFX_DAP_BASE  = { { { { 0x000005A0, 0, 0, 0, 0 } },
         |                             ^~~~~~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:98:29: warning: 'DBGU_IO_BASE' defined but not used [-Wunused-const-variable=]
      98 | static const struct IP_BASE DBGU_IO_BASE  = { { { { 0x000001E0, 0, 0, 0, 0 } },
         |                             ^~~~~~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:93:29: warning: 'DBGU_NBIO_BASE' defined but not used [-Wunused-const-variable=]
      93 | static const struct IP_BASE DBGU_NBIO_BASE  = { { { { 0x000001C0, 0, 0, 0, 0 } },
         |                             ^~~~~~~~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:88:29: warning: 'DBGU_BASE' defined but not used [-Wunused-const-variable=]
      88 | static const struct IP_BASE DBGU_BASE   = { { { { 0x00000180, 0x000001A0, 0, 0, 0 } },
         |                             ^~~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:83:29: warning: 'VCN_BASE' defined but not used [-Wunused-const-variable=]
      83 | static const struct IP_BASE VCN_BASE   = { { { { 0x00007800, 0x00007E00, 0, 0, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:78:29: warning: 'UVD_BASE' defined but not used [-Wunused-const-variable=]
      78 | static const struct IP_BASE UVD_BASE   = { { { { 0x00007800, 0x00007E00, 0, 0, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:73:29: warning: 'DF_BASE' defined but not used [-Wunused-const-variable=]
      73 | static const struct IP_BASE DF_BASE   = { { { { 0x00007000, 0, 0, 0, 0 } },
         |                             ^~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:68:29: warning: 'MP2_BASE' defined but not used [-Wunused-const-variable=]
      68 | static const struct IP_BASE MP2_BASE   = { { { { 0x00016000, 0, 0, 0, 0 } },
         |                             ^~~~~~~~
   drivers/gpu/drm/amd/include/vega10_ip_offset.h:63:29: warning: 'MP1_BASE' defined but not used [-Wunused-const-variable=]
      63 | static const struct IP_BASE MP1_BASE   = { { { { 0x00016000, 0, 0, 0, 0 } },

vim +/amdgpu_dm_dp_mst_add_affected_dsc_crtcs +9376 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c

  9374	
  9375	#if defined(HAVE_DRM_DP_MST_ADD_AFFECTED_DSC_CRTCS)
> 9376	int amdgpu_dm_dp_mst_add_affected_dsc_crtcs(struct drm_atomic_state *state, struct drm_dp_mst_topology_mgr *mgr)
  9377	{
  9378		struct drm_dp_mst_topology_state *mst_state;
  9379		struct drm_dp_vcpi_allocation *pos;
  9380		struct drm_connector *connector;
  9381		struct drm_connector_state *conn_state;
  9382		struct drm_crtc *crtc;
  9383		struct drm_crtc_state *crtc_state;
  9384	
  9385		mst_state = drm_atomic_get_mst_topology_state(state, mgr);
  9386	
  9387		if (IS_ERR(mst_state))
  9388			return -EINVAL;
  9389	
  9390		list_for_each_entry(pos, &mst_state->vcpis, next) {
  9391	
  9392			connector = pos->port->connector;
  9393	
  9394			if (!connector)
  9395				return -EINVAL;
  9396	
  9397			conn_state = drm_atomic_get_connector_state(state, connector);
  9398	
  9399			if (IS_ERR(conn_state))
  9400				return PTR_ERR(conn_state);
  9401	
  9402			crtc = conn_state->crtc;
  9403	
  9404			if (!crtc)
  9405				continue;
  9406	
  9407			if (!drm_dp_mst_dsc_aux_for_port(pos->port))
  9408				continue;
  9409	
  9410			crtc_state = drm_atomic_get_crtc_state(mst_state->base.state, crtc);
  9411	
  9412			if (IS_ERR(crtc_state))
  9413				return PTR_ERR(crtc_state);
  9414	
  9415			DRM_DEBUG_ATOMIC("[MST MGR:%p] Setting mode_changed flag on CRTC %p\n",
  9416					 mgr, crtc);
  9417	
  9418			crtc_state->mode_changed = true;
  9419		}
  9420		return 0;
  9421	}
  9422	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 39791 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20201215/81daa8c5/attachment-0001.gz>


More information about the dri-devel mailing list