All of lore.kernel.org
 help / color / mirror / Atom feed
* [agd5f:drm-next 153/169] drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:737:6: warning: no previous prototype for 'gfx_v9_0_rlcg_wreg'
@ 2021-04-02  1:46 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-04-02  1:46 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3571 bytes --]

tree:   https://gitlab.freedesktop.org/agd5f/linux.git drm-next
head:   3c7245ee576ad699c0803c04be2c7e181f86d04c
commit: e28982eb3a1714bd2e4b311c3d326335df8db785 [153/169] drm/amdgpu: indirect register access for nv12 sriov
config: microblaze-randconfig-r036-20210401 (attached as .config)
compiler: microblaze-linux-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
        git remote add agd5f https://gitlab.freedesktop.org/agd5f/linux.git
        git fetch --no-tags agd5f drm-next
        git checkout e28982eb3a1714bd2e4b311c3d326335df8db785
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze 

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

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:737:6: warning: no previous prototype for 'gfx_v9_0_rlcg_wreg' [-Wmissing-prototypes]
     737 | void gfx_v9_0_rlcg_wreg(struct amdgpu_device *adev, u32 offset, u32 v, u32 flag)
         |      ^~~~~~~~~~~~~~~~~~


vim +/gfx_v9_0_rlcg_wreg +737 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

   736	
 > 737	void gfx_v9_0_rlcg_wreg(struct amdgpu_device *adev, u32 offset, u32 v, u32 flag)
   738	{
   739		static void *scratch_reg0;
   740		static void *scratch_reg1;
   741		static void *scratch_reg2;
   742		static void *scratch_reg3;
   743		static void *spare_int;
   744		static uint32_t grbm_cntl;
   745		static uint32_t grbm_idx;
   746	
   747		scratch_reg0 = adev->rmmio + (adev->reg_offset[GC_HWIP][0][mmSCRATCH_REG0_BASE_IDX] + mmSCRATCH_REG0)*4;
   748		scratch_reg1 = adev->rmmio + (adev->reg_offset[GC_HWIP][0][mmSCRATCH_REG1_BASE_IDX] + mmSCRATCH_REG1)*4;
   749		scratch_reg2 = adev->rmmio + (adev->reg_offset[GC_HWIP][0][mmSCRATCH_REG1_BASE_IDX] + mmSCRATCH_REG2)*4;
   750		scratch_reg3 = adev->rmmio + (adev->reg_offset[GC_HWIP][0][mmSCRATCH_REG1_BASE_IDX] + mmSCRATCH_REG3)*4;
   751		spare_int = adev->rmmio + (adev->reg_offset[GC_HWIP][0][mmRLC_SPARE_INT_BASE_IDX] + mmRLC_SPARE_INT)*4;
   752	
   753		grbm_cntl = adev->reg_offset[GC_HWIP][0][mmGRBM_GFX_CNTL_BASE_IDX] + mmGRBM_GFX_CNTL;
   754		grbm_idx = adev->reg_offset[GC_HWIP][0][mmGRBM_GFX_INDEX_BASE_IDX] + mmGRBM_GFX_INDEX;
   755	
   756		if (amdgpu_sriov_runtime(adev)) {
   757			pr_err("shouldn't call rlcg write register during runtime\n");
   758			return;
   759		}
   760	
   761		if (offset == grbm_cntl || offset == grbm_idx) {
   762			if (offset  == grbm_cntl)
   763				writel(v, scratch_reg2);
   764			else if (offset == grbm_idx)
   765				writel(v, scratch_reg3);
   766	
   767			writel(v, ((void __iomem *)adev->rmmio) + (offset * 4));
   768		} else {
   769			uint32_t i = 0;
   770			uint32_t retries = 50000;
   771	
   772			writel(v, scratch_reg0);
   773			writel(offset | 0x80000000, scratch_reg1);
   774			writel(1, spare_int);
   775			for (i = 0; i < retries; i++) {
   776				u32 tmp;
   777	
   778				tmp = readl(scratch_reg1);
   779				if (!(tmp & 0x80000000))
   780					break;
   781	
   782				udelay(10);
   783			}
   784			if (i >= retries)
   785				pr_err("timeout: rlcg program reg:0x%05x failed !\n", offset);
   786		}
   787	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 28062 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-02  1:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-02  1:46 [agd5f:drm-next 153/169] drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:737:6: warning: no previous prototype for 'gfx_v9_0_rlcg_wreg' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.