[agd5f:drm-next 451/460] drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:1731:6: warning: no previous prototype for 'vcn_v3_0_dec_sw_ring_emit_fence'
From: kernel test robot
Date: Wed May 04 2022 - 19:47:40 EST
tree: https://gitlab.freedesktop.org/agd5f/linux.git drm-next
head: d6ffefccf7f04eefddc8e8aa35fb4afe05a42e0c
commit: 1218a2e39fded75543d1dea04b8ed50e59ac6cdd [451/460] drm/amdgpu: make software ring functions reuseable for newer VCN
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20220505/202205050701.Cg5K2NIK-lkp@xxxxxxxxx/config)
compiler: alpha-linux-gcc (GCC) 11.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 1218a2e39fded75543d1dea04b8ed50e59ac6cdd
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:1731:6: warning: no previous prototype for 'vcn_v3_0_dec_sw_ring_emit_fence' [-Wmissing-prototypes]
1731 | void vcn_v3_0_dec_sw_ring_emit_fence(struct amdgpu_ring *ring, u64 addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:1743:6: warning: no previous prototype for 'vcn_v3_0_dec_sw_ring_insert_end' [-Wmissing-prototypes]
1743 | void vcn_v3_0_dec_sw_ring_insert_end(struct amdgpu_ring *ring)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:1748:6: warning: no previous prototype for 'vcn_v3_0_dec_sw_ring_emit_ib' [-Wmissing-prototypes]
1748 | void vcn_v3_0_dec_sw_ring_emit_ib(struct amdgpu_ring *ring, struct amdgpu_job *job,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:1760:6: warning: no previous prototype for 'vcn_v3_0_dec_sw_ring_emit_reg_wait' [-Wmissing-prototypes]
1760 | void vcn_v3_0_dec_sw_ring_emit_reg_wait(struct amdgpu_ring *ring, uint32_t reg,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:1769:6: warning: no previous prototype for 'vcn_v3_0_dec_sw_ring_emit_vm_flush' [-Wmissing-prototypes]
1769 | void vcn_v3_0_dec_sw_ring_emit_vm_flush(struct amdgpu_ring *ring,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:1784:6: warning: no previous prototype for 'vcn_v3_0_dec_sw_ring_emit_wreg' [-Wmissing-prototypes]
1784 | void vcn_v3_0_dec_sw_ring_emit_wreg(struct amdgpu_ring *ring, uint32_t reg,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/vcn_v3_0_dec_sw_ring_emit_fence +1731 drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
1730
> 1731 void vcn_v3_0_dec_sw_ring_emit_fence(struct amdgpu_ring *ring, u64 addr,
1732 u64 seq, uint32_t flags)
1733 {
1734 WARN_ON(flags & AMDGPU_FENCE_FLAG_64BIT);
1735
1736 amdgpu_ring_write(ring, VCN_DEC_SW_CMD_FENCE);
1737 amdgpu_ring_write(ring, addr);
1738 amdgpu_ring_write(ring, upper_32_bits(addr));
1739 amdgpu_ring_write(ring, seq);
1740 amdgpu_ring_write(ring, VCN_DEC_SW_CMD_TRAP);
1741 }
1742
> 1743 void vcn_v3_0_dec_sw_ring_insert_end(struct amdgpu_ring *ring)
1744 {
1745 amdgpu_ring_write(ring, VCN_DEC_SW_CMD_END);
1746 }
1747
> 1748 void vcn_v3_0_dec_sw_ring_emit_ib(struct amdgpu_ring *ring, struct amdgpu_job *job,
1749 struct amdgpu_ib *ib, uint32_t flags)
1750 {
1751 uint32_t vmid = AMDGPU_JOB_GET_VMID(job);
1752
1753 amdgpu_ring_write(ring, VCN_DEC_SW_CMD_IB);
1754 amdgpu_ring_write(ring, vmid);
1755 amdgpu_ring_write(ring, lower_32_bits(ib->gpu_addr));
1756 amdgpu_ring_write(ring, upper_32_bits(ib->gpu_addr));
1757 amdgpu_ring_write(ring, ib->length_dw);
1758 }
1759
> 1760 void vcn_v3_0_dec_sw_ring_emit_reg_wait(struct amdgpu_ring *ring, uint32_t reg,
1761 uint32_t val, uint32_t mask)
1762 {
1763 amdgpu_ring_write(ring, VCN_DEC_SW_CMD_REG_WAIT);
1764 amdgpu_ring_write(ring, reg << 2);
1765 amdgpu_ring_write(ring, mask);
1766 amdgpu_ring_write(ring, val);
1767 }
1768
> 1769 void vcn_v3_0_dec_sw_ring_emit_vm_flush(struct amdgpu_ring *ring,
1770 uint32_t vmid, uint64_t pd_addr)
1771 {
1772 struct amdgpu_vmhub *hub = &ring->adev->vmhub[ring->funcs->vmhub];
1773 uint32_t data0, data1, mask;
1774
1775 pd_addr = amdgpu_gmc_emit_flush_gpu_tlb(ring, vmid, pd_addr);
1776
1777 /* wait for register write */
1778 data0 = hub->ctx0_ptb_addr_lo32 + vmid * hub->ctx_addr_distance;
1779 data1 = lower_32_bits(pd_addr);
1780 mask = 0xffffffff;
1781 vcn_v3_0_dec_sw_ring_emit_reg_wait(ring, data0, data1, mask);
1782 }
1783
> 1784 void vcn_v3_0_dec_sw_ring_emit_wreg(struct amdgpu_ring *ring, uint32_t reg,
1785 uint32_t val)
1786 {
1787 amdgpu_ring_write(ring, VCN_DEC_SW_CMD_REG_WRITE);
1788 amdgpu_ring_write(ring, reg << 2);
1789 amdgpu_ring_write(ring, val);
1790 }
1791
--
0-DAY CI Kernel Test Service
https://01.org/lkp