* [linux-next:master 955/1512] drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:658 amdgpu_gfx_enable_kgq() warn: inconsistent returns '&kiq->ring_lock'.
@ 2023-05-09 13:04 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-05-09 13:04 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Alex Deucher <alexander.deucher@amd.com>
CC: Hawking Zhang <Hawking.Zhang@amd.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 47cba14ce6fc4f314bd814d07269d0c8de1e4ae6
commit: 9bfa241d12896ef661116467774280d9cf680ea1 [955/1512] drm/amdgpu: add [en/dis]able_kgq() functions
:::::: branch date: 10 hours ago
:::::: commit date: 4 days ago
config: ia64-randconfig-m031-20230507 (https://download.01.org/0day-ci/archive/20230509/202305092002.VnRkluOB-lkp@intel.com/config)
compiler: ia64-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Link: https://lore.kernel.org/r/202305092002.VnRkluOB-lkp@intel.com/
New smatch warnings:
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:658 amdgpu_gfx_enable_kgq() warn: inconsistent returns '&kiq->ring_lock'.
Old smatch warnings:
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:133 amdgpu_gfx_parse_disable_cu() warn: potential spectre issue 'mask' [w]
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:623 amdgpu_gfx_enable_kcq() warn: inconsistent returns '&kiq->ring_lock'.
vim +658 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
849aca9f9c033a Hawking Zhang 2019-03-05 625
9bfa241d12896e Alex Deucher 2023-04-24 626 int amdgpu_gfx_enable_kgq(struct amdgpu_device *adev, int xcc_id)
9bfa241d12896e Alex Deucher 2023-04-24 627 {
9bfa241d12896e Alex Deucher 2023-04-24 628 struct amdgpu_kiq *kiq = &adev->gfx.kiq[xcc_id];
9bfa241d12896e Alex Deucher 2023-04-24 629 struct amdgpu_ring *kiq_ring = &kiq->ring;
9bfa241d12896e Alex Deucher 2023-04-24 630 int r, i, j;
9bfa241d12896e Alex Deucher 2023-04-24 631
9bfa241d12896e Alex Deucher 2023-04-24 632 if (!kiq->pmf || !kiq->pmf->kiq_map_queues)
9bfa241d12896e Alex Deucher 2023-04-24 633 return -EINVAL;
9bfa241d12896e Alex Deucher 2023-04-24 634
9bfa241d12896e Alex Deucher 2023-04-24 635 spin_lock(&kiq->ring_lock);
9bfa241d12896e Alex Deucher 2023-04-24 636 /* No need to map kcq on the slave */
9bfa241d12896e Alex Deucher 2023-04-24 637 if (amdgpu_gfx_is_master_xcc(adev, xcc_id)) {
9bfa241d12896e Alex Deucher 2023-04-24 638 r = amdgpu_ring_alloc(kiq_ring, kiq->pmf->map_queues_size *
9bfa241d12896e Alex Deucher 2023-04-24 639 adev->gfx.num_gfx_rings);
9bfa241d12896e Alex Deucher 2023-04-24 640 if (r) {
9bfa241d12896e Alex Deucher 2023-04-24 641 DRM_ERROR("Failed to lock KIQ (%d).\n", r);
9bfa241d12896e Alex Deucher 2023-04-24 642 spin_unlock(&adev->gfx.kiq[0].ring_lock);
9bfa241d12896e Alex Deucher 2023-04-24 643 return r;
9bfa241d12896e Alex Deucher 2023-04-24 644 }
9bfa241d12896e Alex Deucher 2023-04-24 645
9bfa241d12896e Alex Deucher 2023-04-24 646 for (i = 0; i < adev->gfx.num_gfx_rings; i++) {
9bfa241d12896e Alex Deucher 2023-04-24 647 j = i + xcc_id * adev->gfx.num_gfx_rings;
9bfa241d12896e Alex Deucher 2023-04-24 648 kiq->pmf->kiq_map_queues(kiq_ring,
9bfa241d12896e Alex Deucher 2023-04-24 649 &adev->gfx.gfx_ring[i]);
9bfa241d12896e Alex Deucher 2023-04-24 650 }
9bfa241d12896e Alex Deucher 2023-04-24 651 }
9bfa241d12896e Alex Deucher 2023-04-24 652
9bfa241d12896e Alex Deucher 2023-04-24 653 r = amdgpu_ring_test_helper(kiq_ring);
9bfa241d12896e Alex Deucher 2023-04-24 654 spin_unlock(&kiq->ring_lock);
9bfa241d12896e Alex Deucher 2023-04-24 655 if (r)
9bfa241d12896e Alex Deucher 2023-04-24 656 DRM_ERROR("KCQ enable failed\n");
9bfa241d12896e Alex Deucher 2023-04-24 657
9bfa241d12896e Alex Deucher 2023-04-24 @658 return r;
9bfa241d12896e Alex Deucher 2023-04-24 659 }
9bfa241d12896e Alex Deucher 2023-04-24 660
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-09 13:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-09 13:04 [linux-next:master 955/1512] drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:658 amdgpu_gfx_enable_kgq() warn: inconsistent returns '&kiq->ring_lock' 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.