[linux-next:master 4231/4465] drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1955: warning: Function parameter or struct member 'gsp' not described in 'nvkm_gsp_radix3_sg'

[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:   ac139fc7db67968e5061715508b5fc4aa7c40c56
commit: 34e659f34a7559ecfd9c1f5b24d4c291f3f54711 [4231/4465] drm/nouveau: nvkm_gsp_radix3_sg() should use nvkm_gsp_mem_ctor()
config: parisc-defconfig (https://download.01.org/0day-ci/archive/20240206/202402062106.cfArbjsv-lkp@xxxxxxxxx/config)
compiler: hppa-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240206/202402062106.cfArbjsv-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/202402062106.cfArbjsv-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1442: warning: Function parameter or struct member 'priv' not described in 'r535_gsp_msg_run_cpu_sequencer'
   drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1442: warning: Function parameter or struct member 'fn' not described in 'r535_gsp_msg_run_cpu_sequencer'
   drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1442: warning: Function parameter or struct member 'repv' not described in 'r535_gsp_msg_run_cpu_sequencer'
   drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1442: warning: Function parameter or struct member 'repc' not described in 'r535_gsp_msg_run_cpu_sequencer'
   drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1815: warning: Function parameter or struct member 'gsp' not described in 'r535_gsp_libos_init'
>> drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1955: warning: Function parameter or struct member 'gsp' not described in 'nvkm_gsp_radix3_sg'
   drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1955: warning: Function parameter or struct member 'sgt' not described in 'nvkm_gsp_radix3_sg'
   drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1955: warning: Function parameter or struct member 'size' not described in 'nvkm_gsp_radix3_sg'
   drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1955: warning: Function parameter or struct member 'rx3' not described in 'nvkm_gsp_radix3_sg'


vim +1955 drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c

176fdcbddfd288 Ben Skeggs 2023-09-19  1922  
88a2b4d34a64bb Timur Tabi 2023-11-22  1923  /**
88a2b4d34a64bb Timur Tabi 2023-11-22  1924   * nvkm_gsp_radix3_sg - build a radix3 table from a S/G list
88a2b4d34a64bb Timur Tabi 2023-11-22  1925   *
88a2b4d34a64bb Timur Tabi 2023-11-22  1926   * The GSP uses a three-level page table, called radix3, to map the firmware.
88a2b4d34a64bb Timur Tabi 2023-11-22  1927   * Each 64-bit "pointer" in the table is either the bus address of an entry in
88a2b4d34a64bb Timur Tabi 2023-11-22  1928   * the next table (for levels 0 and 1) or the bus address of the next page in
88a2b4d34a64bb Timur Tabi 2023-11-22  1929   * the GSP firmware image itself.
88a2b4d34a64bb Timur Tabi 2023-11-22  1930   *
88a2b4d34a64bb Timur Tabi 2023-11-22  1931   * Level 0 contains a single entry in one page that points to the first page
88a2b4d34a64bb Timur Tabi 2023-11-22  1932   * of level 1.
88a2b4d34a64bb Timur Tabi 2023-11-22  1933   *
88a2b4d34a64bb Timur Tabi 2023-11-22  1934   * Level 1, since it's also only one page in size, contains up to 512 entries,
88a2b4d34a64bb Timur Tabi 2023-11-22  1935   * one for each page in Level 2.
88a2b4d34a64bb Timur Tabi 2023-11-22  1936   *
88a2b4d34a64bb Timur Tabi 2023-11-22  1937   * Level 2 can be up to 512 pages in size, and each of those entries points to
88a2b4d34a64bb Timur Tabi 2023-11-22  1938   * the next page of the firmware image.  Since there can be up to 512*512
88a2b4d34a64bb Timur Tabi 2023-11-22  1939   * pages, that limits the size of the firmware to 512*512*GSP_PAGE_SIZE = 1GB.
88a2b4d34a64bb Timur Tabi 2023-11-22  1940   *
88a2b4d34a64bb Timur Tabi 2023-11-22  1941   * Internally, the GSP has its window into system memory, but the base
88a2b4d34a64bb Timur Tabi 2023-11-22  1942   * physical address of the aperture is not 0.  In fact, it varies depending on
88a2b4d34a64bb Timur Tabi 2023-11-22  1943   * the GPU architecture.  Since the GPU is a PCI device, this window is
88a2b4d34a64bb Timur Tabi 2023-11-22  1944   * accessed via DMA and is therefore bound by IOMMU translation.  The end
88a2b4d34a64bb Timur Tabi 2023-11-22  1945   * result is that GSP-RM must translate the bus addresses in the table to GSP
88a2b4d34a64bb Timur Tabi 2023-11-22  1946   * physical addresses.  All this should happen transparently.
88a2b4d34a64bb Timur Tabi 2023-11-22  1947   *
88a2b4d34a64bb Timur Tabi 2023-11-22  1948   * Returns 0 on success, or negative error code
88a2b4d34a64bb Timur Tabi 2023-11-22  1949   *
88a2b4d34a64bb Timur Tabi 2023-11-22  1950   * See kgspCreateRadix3_IMPL
88a2b4d34a64bb Timur Tabi 2023-11-22  1951   */
176fdcbddfd288 Ben Skeggs 2023-09-19  1952  static int
34e659f34a7559 Timur Tabi 2024-02-02  1953  nvkm_gsp_radix3_sg(struct nvkm_gsp *gsp, struct sg_table *sgt, u64 size,
176fdcbddfd288 Ben Skeggs 2023-09-19  1954  		   struct nvkm_gsp_radix3 *rx3)
176fdcbddfd288 Ben Skeggs 2023-09-19 @1955  {
176fdcbddfd288 Ben Skeggs 2023-09-19  1956  	u64 addr;
176fdcbddfd288 Ben Skeggs 2023-09-19  1957  
176fdcbddfd288 Ben Skeggs 2023-09-19  1958  	for (int i = ARRAY_SIZE(rx3->mem) - 1; i >= 0; i--) {
176fdcbddfd288 Ben Skeggs 2023-09-19  1959  		u64 *ptes;
34e659f34a7559 Timur Tabi 2024-02-02  1960  		size_t bufsize;
34e659f34a7559 Timur Tabi 2024-02-02  1961  		int ret, idx;
176fdcbddfd288 Ben Skeggs 2023-09-19  1962  
34e659f34a7559 Timur Tabi 2024-02-02  1963  		bufsize = ALIGN((size / GSP_PAGE_SIZE) * sizeof(u64), GSP_PAGE_SIZE);
34e659f34a7559 Timur Tabi 2024-02-02  1964  		ret = nvkm_gsp_mem_ctor(gsp, bufsize, &rx3->mem[i]);
34e659f34a7559 Timur Tabi 2024-02-02  1965  		if (ret)
34e659f34a7559 Timur Tabi 2024-02-02  1966  			return ret;
176fdcbddfd288 Ben Skeggs 2023-09-19  1967  
176fdcbddfd288 Ben Skeggs 2023-09-19  1968  		ptes = rx3->mem[i].data;
176fdcbddfd288 Ben Skeggs 2023-09-19  1969  		if (i == 2) {
176fdcbddfd288 Ben Skeggs 2023-09-19  1970  			struct scatterlist *sgl;
176fdcbddfd288 Ben Skeggs 2023-09-19  1971  
176fdcbddfd288 Ben Skeggs 2023-09-19  1972  			for_each_sgtable_dma_sg(sgt, sgl, idx) {
176fdcbddfd288 Ben Skeggs 2023-09-19  1973  				for (int j = 0; j < sg_dma_len(sgl) / GSP_PAGE_SIZE; j++)
176fdcbddfd288 Ben Skeggs 2023-09-19  1974  					*ptes++ = sg_dma_address(sgl) + (GSP_PAGE_SIZE * j);
176fdcbddfd288 Ben Skeggs 2023-09-19  1975  			}
176fdcbddfd288 Ben Skeggs 2023-09-19  1976  		} else {
176fdcbddfd288 Ben Skeggs 2023-09-19  1977  			for (int j = 0; j < size / GSP_PAGE_SIZE; j++)
176fdcbddfd288 Ben Skeggs 2023-09-19  1978  				*ptes++ = addr + GSP_PAGE_SIZE * j;
176fdcbddfd288 Ben Skeggs 2023-09-19  1979  		}
176fdcbddfd288 Ben Skeggs 2023-09-19  1980  
176fdcbddfd288 Ben Skeggs 2023-09-19  1981  		size = rx3->mem[i].size;
176fdcbddfd288 Ben Skeggs 2023-09-19  1982  		addr = rx3->mem[i].addr;
176fdcbddfd288 Ben Skeggs 2023-09-19  1983  	}
176fdcbddfd288 Ben Skeggs 2023-09-19  1984  
176fdcbddfd288 Ben Skeggs 2023-09-19  1985  	return 0;
176fdcbddfd288 Ben Skeggs 2023-09-19  1986  }
176fdcbddfd288 Ben Skeggs 2023-09-19  1987  

:::::: The code at line 1955 was first introduced by commit
:::::: 176fdcbddfd288408ce8571c1760ad618d962096 drm/nouveau/gsp/r535: add support for booting GSP-RM

:::::: TO: Ben Skeggs <bskeggs@xxxxxxxxxx>
:::::: CC: Dave Airlie <airlied@xxxxxxxxxx>

-- 
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