mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: xinhui pan <xinhui.pan@amd.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König " <christian.koenig@amd.com>
Subject: drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:444: warning: Excess function parameter 'bo' description in 'amdgpu_vce_get_create_msg'
Date: Tue, 07 Apr 2026 12:03:09 +0800	[thread overview]
Message-ID: <202604070212.lkSZgVt9-lkp@intel.com> (raw)

Hi xinhui,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   591cd656a1bf5ea94a222af5ef2ee76df029c1d2
commit: cb9038aa8a4e9f4535165602fd39f90c0892bc1b drm/amdgpu: VCE avoid memory allocation during IB test
date:   4 years, 7 months ago
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20260407/202604070212.lkSZgVt9-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260407/202604070212.lkSZgVt9-lkp@intel.com/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
| Fixes: cb9038aa8a4e ("drm/amdgpu: VCE avoid memory allocation during IB test")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604070212.lkSZgVt9-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:444: warning: Excess function parameter 'bo' description in 'amdgpu_vce_get_create_msg'


vim +444 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c

d38ceaf99ed015 Alex Deucher    2015-04-20  431  
d38ceaf99ed015 Alex Deucher    2015-04-20  432  /**
d38ceaf99ed015 Alex Deucher    2015-04-20  433   * amdgpu_vce_get_create_msg - generate a VCE create msg
d38ceaf99ed015 Alex Deucher    2015-04-20  434   *
d38ceaf99ed015 Alex Deucher    2015-04-20  435   * @ring: ring we should submit the msg to
d38ceaf99ed015 Alex Deucher    2015-04-20  436   * @handle: VCE session handle to use
184b762d5b75e3 Lee Jones       2020-11-24  437   * @bo: amdgpu object for which we query the offset
d38ceaf99ed015 Alex Deucher    2015-04-20  438   * @fence: optional fence to return
d38ceaf99ed015 Alex Deucher    2015-04-20  439   *
d38ceaf99ed015 Alex Deucher    2015-04-20  440   * Open up a stream for HW test
d38ceaf99ed015 Alex Deucher    2015-04-20  441   */
17523bd00c4723 Alex Deucher    2019-10-17  442  static int amdgpu_vce_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
f54d1867005c33 Chris Wilson    2016-10-25  443  				     struct dma_fence **fence)
d38ceaf99ed015 Alex Deucher    2015-04-20 @444  {
d38ceaf99ed015 Alex Deucher    2015-04-20  445  	const unsigned ib_size_dw = 1024;
d71518b5aa7c9c Christian König 2016-02-01  446  	struct amdgpu_job *job;
d71518b5aa7c9c Christian König 2016-02-01  447  	struct amdgpu_ib *ib;
cb9038aa8a4e9f xinhui pan      2021-09-10  448  	struct amdgpu_ib ib_msg;
f54d1867005c33 Chris Wilson    2016-10-25  449  	struct dma_fence *f = NULL;
569557e524d8ca Alex Deucher    2019-10-17  450  	uint64_t addr;
d38ceaf99ed015 Alex Deucher    2015-04-20  451  	int i, r;
d38ceaf99ed015 Alex Deucher    2015-04-20  452  
c8e42d57859d50 xinhui pan      2020-03-26  453  	r = amdgpu_job_alloc_with_ib(ring->adev, ib_size_dw * 4,
c8e42d57859d50 xinhui pan      2020-03-26  454  				     AMDGPU_IB_POOL_DIRECT, &job);
d71518b5aa7c9c Christian König 2016-02-01  455  	if (r)
d38ceaf99ed015 Alex Deucher    2015-04-20  456  		return r;
d71518b5aa7c9c Christian König 2016-02-01  457  
cb9038aa8a4e9f xinhui pan      2021-09-10  458  	memset(&ib_msg, 0, sizeof(ib_msg));
cb9038aa8a4e9f xinhui pan      2021-09-10  459  	/* only one gpu page is needed, alloc +1 page to make addr aligned. */
cb9038aa8a4e9f xinhui pan      2021-09-10  460  	r = amdgpu_ib_get(ring->adev, NULL, AMDGPU_GPU_PAGE_SIZE * 2,
cb9038aa8a4e9f xinhui pan      2021-09-10  461  			  AMDGPU_IB_POOL_DIRECT,
cb9038aa8a4e9f xinhui pan      2021-09-10  462  			  &ib_msg);
cb9038aa8a4e9f xinhui pan      2021-09-10  463  	if (r)
cb9038aa8a4e9f xinhui pan      2021-09-10  464  		goto err;
d38ceaf99ed015 Alex Deucher    2015-04-20  465  
cb9038aa8a4e9f xinhui pan      2021-09-10  466  	ib = &job->ibs[0];
cb9038aa8a4e9f xinhui pan      2021-09-10  467  	/* let addr point to page boundary */
cb9038aa8a4e9f xinhui pan      2021-09-10  468  	addr = AMDGPU_GPU_PAGE_ALIGN(ib_msg.gpu_addr);
d38ceaf99ed015 Alex Deucher    2015-04-20  469  
d38ceaf99ed015 Alex Deucher    2015-04-20  470  	/* stitch together an VCE create msg */
8128765ce5fb68 Chunming Zhou   2015-07-03  471  	ib->length_dw = 0;
8128765ce5fb68 Chunming Zhou   2015-07-03  472  	ib->ptr[ib->length_dw++] = 0x0000000c; /* len */
8128765ce5fb68 Chunming Zhou   2015-07-03  473  	ib->ptr[ib->length_dw++] = 0x00000001; /* session cmd */
8128765ce5fb68 Chunming Zhou   2015-07-03  474  	ib->ptr[ib->length_dw++] = handle;
8128765ce5fb68 Chunming Zhou   2015-07-03  475  
d66f8e48f12016 Leo Liu         2015-11-18  476  	if ((ring->adev->vce.fw_version >> 24) >= 52)
d66f8e48f12016 Leo Liu         2015-11-18  477  		ib->ptr[ib->length_dw++] = 0x00000040; /* len */
d66f8e48f12016 Leo Liu         2015-11-18  478  	else
8128765ce5fb68 Chunming Zhou   2015-07-03  479  		ib->ptr[ib->length_dw++] = 0x00000030; /* len */
8128765ce5fb68 Chunming Zhou   2015-07-03  480  	ib->ptr[ib->length_dw++] = 0x01000001; /* create cmd */
8128765ce5fb68 Chunming Zhou   2015-07-03  481  	ib->ptr[ib->length_dw++] = 0x00000000;
8128765ce5fb68 Chunming Zhou   2015-07-03  482  	ib->ptr[ib->length_dw++] = 0x00000042;
8128765ce5fb68 Chunming Zhou   2015-07-03  483  	ib->ptr[ib->length_dw++] = 0x0000000a;
8128765ce5fb68 Chunming Zhou   2015-07-03  484  	ib->ptr[ib->length_dw++] = 0x00000001;
8128765ce5fb68 Chunming Zhou   2015-07-03  485  	ib->ptr[ib->length_dw++] = 0x00000080;
8128765ce5fb68 Chunming Zhou   2015-07-03  486  	ib->ptr[ib->length_dw++] = 0x00000060;
8128765ce5fb68 Chunming Zhou   2015-07-03  487  	ib->ptr[ib->length_dw++] = 0x00000100;
8128765ce5fb68 Chunming Zhou   2015-07-03  488  	ib->ptr[ib->length_dw++] = 0x00000100;
8128765ce5fb68 Chunming Zhou   2015-07-03  489  	ib->ptr[ib->length_dw++] = 0x0000000c;
8128765ce5fb68 Chunming Zhou   2015-07-03  490  	ib->ptr[ib->length_dw++] = 0x00000000;
d66f8e48f12016 Leo Liu         2015-11-18  491  	if ((ring->adev->vce.fw_version >> 24) >= 52) {
d66f8e48f12016 Leo Liu         2015-11-18  492  		ib->ptr[ib->length_dw++] = 0x00000000;
d66f8e48f12016 Leo Liu         2015-11-18  493  		ib->ptr[ib->length_dw++] = 0x00000000;
d66f8e48f12016 Leo Liu         2015-11-18  494  		ib->ptr[ib->length_dw++] = 0x00000000;
d66f8e48f12016 Leo Liu         2015-11-18  495  		ib->ptr[ib->length_dw++] = 0x00000000;
d66f8e48f12016 Leo Liu         2015-11-18  496  	}
8128765ce5fb68 Chunming Zhou   2015-07-03  497  
8128765ce5fb68 Chunming Zhou   2015-07-03  498  	ib->ptr[ib->length_dw++] = 0x00000014; /* len */
8128765ce5fb68 Chunming Zhou   2015-07-03  499  	ib->ptr[ib->length_dw++] = 0x05000005; /* feedback buffer */
569557e524d8ca Alex Deucher    2019-10-17  500  	ib->ptr[ib->length_dw++] = upper_32_bits(addr);
569557e524d8ca Alex Deucher    2019-10-17  501  	ib->ptr[ib->length_dw++] = addr;
8128765ce5fb68 Chunming Zhou   2015-07-03  502  	ib->ptr[ib->length_dw++] = 0x00000001;
8128765ce5fb68 Chunming Zhou   2015-07-03  503  
8128765ce5fb68 Chunming Zhou   2015-07-03  504  	for (i = ib->length_dw; i < ib_size_dw; ++i)
8128765ce5fb68 Chunming Zhou   2015-07-03  505  		ib->ptr[i] = 0x0;
8128765ce5fb68 Chunming Zhou   2015-07-03  506  
ee913fd9e16638 Christian König 2018-07-13  507  	r = amdgpu_job_submit_direct(job, ring, &f);
cb9038aa8a4e9f xinhui pan      2021-09-10  508  	amdgpu_ib_free(ring->adev, &ib_msg, f);
8128765ce5fb68 Chunming Zhou   2015-07-03  509  	if (r)
8128765ce5fb68 Chunming Zhou   2015-07-03  510  		goto err;
9f2ade33e65925 Christian König 2016-02-03  511  
d38ceaf99ed015 Alex Deucher    2015-04-20  512  	if (fence)
f54d1867005c33 Chris Wilson    2016-10-25  513  		*fence = dma_fence_get(f);
f54d1867005c33 Chris Wilson    2016-10-25  514  	dma_fence_put(f);
8128765ce5fb68 Chunming Zhou   2015-07-03  515  	return 0;
d71518b5aa7c9c Christian König 2016-02-01  516  
8128765ce5fb68 Chunming Zhou   2015-07-03  517  err:
d71518b5aa7c9c Christian König 2016-02-01  518  	amdgpu_job_free(job);
d38ceaf99ed015 Alex Deucher    2015-04-20  519  	return r;
d38ceaf99ed015 Alex Deucher    2015-04-20  520  }
d38ceaf99ed015 Alex Deucher    2015-04-20  521  

:::::: The code at line 444 was first introduced by commit
:::::: d38ceaf99ed015f2a0b9af3499791bd3a3daae21 drm/amdgpu: add core driver (v4)

:::::: TO: Alex Deucher <alexander.deucher@amd.com>
:::::: CC: Alex Deucher <alexander.deucher@amd.com>

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

                 reply	other threads:[~2026-04-07  4:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202604070212.lkSZgVt9-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexander.deucher@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=xinhui.pan@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®