[linux-next:master 6193/6424] drivers/gpu/drm/amd/amdgpu/ih_v7_0.c:392: warning: Function parameter or struct member 'ih' not described in 'ih_v7_0_get_wptr'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   46d4e2eb58e14c8935fa0e27d16d4c62ef82849a
commit: 12443fc53e7d7fad52cb4b534dea6be525d05d62 [6193/6424] drm/amdgpu: Add ih v7_0 ip block support
config: arm-randconfig-001-20240213 (https://download.01.org/0day-ci/archive/20240213/202402131939.ajKHyCog-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240213/202402131939.ajKHyCog-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402131939.ajKHyCog-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/ih_v7_0.c:392: warning: Function parameter or struct member 'ih' not described in 'ih_v7_0_get_wptr'
>> drivers/gpu/drm/amd/amdgpu/ih_v7_0.c:432: warning: Function parameter or struct member 'ih' not described in 'ih_v7_0_irq_rearm'
>> drivers/gpu/drm/amd/amdgpu/ih_v7_0.c:458: warning: Function parameter or struct member 'ih' not described in 'ih_v7_0_set_rptr'


vim +392 drivers/gpu/drm/amd/amdgpu/ih_v7_0.c

   379	
   380	/**
   381	 * ih_v7_0_get_wptr - get the IH ring buffer wptr
   382	 *
   383	 * @adev: amdgpu_device pointer
   384	 *
   385	 * Get the IH ring buffer wptr from either the register
   386	 * or the writeback memory buffer.  Also check for
   387	 * ring buffer overflow and deal with it.
   388	 * Returns the value of the wptr.
   389	 */
   390	static u32 ih_v7_0_get_wptr(struct amdgpu_device *adev,
   391				      struct amdgpu_ih_ring *ih)
 > 392	{
   393		u32 wptr, tmp;
   394		struct amdgpu_ih_regs *ih_regs;
   395	
   396		wptr = le32_to_cpu(*ih->wptr_cpu);
   397		ih_regs = &ih->ih_regs;
   398	
   399		if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
   400			goto out;
   401	
   402		wptr = RREG32_NO_KIQ(ih_regs->ih_rb_wptr);
   403		if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
   404			goto out;
   405		wptr = REG_SET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW, 0);
   406	
   407		/* When a ring buffer overflow happen start parsing interrupt
   408		 * from the last not overwritten vector (wptr + 32). Hopefully
   409		 * this should allow us to catch up.
   410		 */
   411		tmp = (wptr + 32) & ih->ptr_mask;
   412		dev_warn(adev->dev, "IH ring buffer overflow "
   413			 "(0x%08X, 0x%08X, 0x%08X)\n",
   414			 wptr, ih->rptr, tmp);
   415		ih->rptr = tmp;
   416	
   417		tmp = RREG32_NO_KIQ(ih_regs->ih_rb_cntl);
   418		tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, WPTR_OVERFLOW_CLEAR, 1);
   419		WREG32_NO_KIQ(ih_regs->ih_rb_cntl, tmp);
   420	out:
   421		return (wptr & ih->ptr_mask);
   422	}
   423	
   424	/**
   425	 * ih_v7_0_irq_rearm - rearm IRQ if lost
   426	 *
   427	 * @adev: amdgpu_device pointer
   428	 *
   429	 */
   430	static void ih_v7_0_irq_rearm(struct amdgpu_device *adev,
   431				       struct amdgpu_ih_ring *ih)
 > 432	{
   433		uint32_t v = 0;
   434		uint32_t i = 0;
   435		struct amdgpu_ih_regs *ih_regs;
   436	
   437		ih_regs = &ih->ih_regs;
   438	
   439		/* Rearm IRQ / re-write doorbell if doorbell write is lost */
   440		for (i = 0; i < MAX_REARM_RETRY; i++) {
   441			v = RREG32_NO_KIQ(ih_regs->ih_rb_rptr);
   442			if ((v < ih->ring_size) && (v != ih->rptr))
   443				WDOORBELL32(ih->doorbell_index, ih->rptr);
   444			else
   445				break;
   446		}
   447	}
   448	
   449	/**
   450	 * ih_v7_0_set_rptr - set the IH ring buffer rptr
   451	 *
   452	 * @adev: amdgpu_device pointer
   453	 *
   454	 * Set the IH ring buffer rptr.
   455	 */
   456	static void ih_v7_0_set_rptr(struct amdgpu_device *adev,
   457				       struct amdgpu_ih_ring *ih)
 > 458	{
   459		struct amdgpu_ih_regs *ih_regs;
   460	
   461		if (ih->use_doorbell) {
   462			/* XXX check if swapping is necessary on BE */
   463			*ih->rptr_cpu = ih->rptr;
   464			WDOORBELL32(ih->doorbell_index, ih->rptr);
   465	
   466			if (amdgpu_sriov_vf(adev))
   467				ih_v7_0_irq_rearm(adev, ih);
   468		} else {
   469			ih_regs = &ih->ih_regs;
   470			WREG32(ih_regs->ih_rb_rptr, ih->rptr);
   471		}
   472	}
   473	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux