* drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:2730 amdgpu_gfx_ring_preempt_ib() warn: inconsistent indenting
@ 2026-08-20 9:50 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-08-20 9:50 UTC (permalink / raw)
To: Leonardo Cesar
Cc: oe-kbuild-all, linux-kernel, Alex Deucher, Christian König
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: cb8a75eec0877810b50aa1c5a833f929525cd2ee
commit: dc0d6fdfa5b6ab36ddaa774265261336c3e7dbae drm/amdgpu: deduplicate ring preempt ib function
date: 4 months ago
config: i386-randconfig-141-20260820 (https://download.01.org/0day-ci/archive/20260820/202608201722.iyZwpR07-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
smatch: v0.5.0-9187-g5189e3fb
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: dc0d6fdfa5b6 ("drm/amdgpu: deduplicate ring preempt ib function")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608201722.iyZwpR07-lkp@intel.com/
New smatch warnings:
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:2730 amdgpu_gfx_ring_preempt_ib() warn: inconsistent indenting
Old smatch warnings:
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:451 amdgpu_gfx_mqd_sw_init() error: buffer overflow 'adev->gfx.compute_ring' 64 <= s32max
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:463 amdgpu_gfx_mqd_sw_init() error: buffer overflow 'adev->gfx.mec.mqd_backup' 64 <= s32max
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:464 amdgpu_gfx_mqd_sw_init() error: buffer overflow 'adev->gfx.mec.mqd_backup' 64 <= s32max
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:492 amdgpu_gfx_mqd_sw_fini() error: buffer overflow 'adev->gfx.compute_ring' 64 <= s32max
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:493 amdgpu_gfx_mqd_sw_fini() error: buffer overflow 'adev->gfx.mec.mqd_backup' 64 <= s32max
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:566 amdgpu_gfx_disable_kcq() error: buffer overflow 'adev->gfx.compute_ring' 64 <= s32max
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:588 amdgpu_gfx_disable_kcq() error: buffer overflow 'adev->gfx.compute_ring' 64 <= s32max
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:617 amdgpu_gfx_disable_kgq() error: buffer overflow 'adev->gfx.gfx_ring' 2 <= s32max
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:641 amdgpu_gfx_disable_kgq() error: buffer overflow 'adev->gfx.gfx_ring' 2 <= s32max
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:700 amdgpu_gfx_mes_enable_kcq() error: buffer overflow 'adev->gfx.compute_ring' 64 <= s32max
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:758 amdgpu_gfx_enable_kcq() error: buffer overflow 'adev->gfx.compute_ring' 64 <= s32max
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:790 amdgpu_gfx_enable_kgq() error: buffer overflow 'adev->gfx.gfx_ring' 2 <= s32max
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:815 amdgpu_gfx_enable_kgq() error: buffer overflow 'adev->gfx.gfx_ring' 2 <= s32max
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:1716 amdgpu_gfx_run_cleaner_shader() error: buffer overflow 'adev->gfx.compute_ring' 64 <= u32max
vim +2730 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
2688
2689 int amdgpu_gfx_ring_preempt_ib(struct amdgpu_ring *ring)
2690 {
2691 struct amdgpu_device *adev = ring->adev;
2692 struct amdgpu_kiq *kiq = &adev->gfx.kiq[0];
2693 struct amdgpu_ring *kiq_ring = &kiq->ring;
2694 unsigned long flags;
2695 int i;
2696
2697 if (adev->enable_mes)
2698 return -EINVAL;
2699
2700 if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)
2701 return -EINVAL;
2702
2703 spin_lock_irqsave(&kiq->ring_lock, flags);
2704
2705 if (amdgpu_ring_alloc(kiq_ring, kiq->pmf->unmap_queues_size)) {
2706 spin_unlock_irqrestore(&kiq->ring_lock, flags);
2707 return -ENOMEM;
2708 }
2709
2710 /* assert preemption condition */
2711 amdgpu_ring_set_preempt_cond_exec(ring, false);
2712
2713 /* assert IB preemption, emit the trailing fence */
2714 kiq->pmf->kiq_unmap_queues(kiq_ring, ring, PREEMPT_QUEUES_NO_UNMAP,
2715 ring->trail_fence_gpu_addr,
2716 ++ring->trail_seq);
2717 amdgpu_ring_commit(kiq_ring);
2718
2719 spin_unlock_irqrestore(&kiq->ring_lock, flags);
2720
2721 /* poll the trailing fence */
2722 for (i = 0; i < adev->usec_timeout; i++) {
2723 if (ring->trail_seq ==
2724 le32_to_cpu(*(ring->trail_fence_cpu_addr)))
2725 break;
2726 udelay(1);
2727 }
2728
2729 /* deassert preemption condition */
> 2730 amdgpu_ring_set_preempt_cond_exec(ring, true);
2731
2732 if (i >= adev->usec_timeout) {
2733 DRM_ERROR("ring %d failed to preempt ib\n", ring->idx);
2734 return -EINVAL;
2735 }
2736
2737 return 0;
2738 }
2739
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-20 9:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-20 9:50 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:2730 amdgpu_gfx_ring_preempt_ib() warn: inconsistent indenting 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.