llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH RFC 2/6] drm/amdgpu: don't wake up the GPU when opening the device
       [not found] <20250731-b4-dont-wake-next-v1-2-e51bdc347fa3@gmail.com>
@ 2025-07-31 22:18 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-07-31 22:18 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: llvm, oe-kbuild-all

Hi Philipp,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:

[auto build test WARNING on 6ac55eab4fc41e0ea80f9064945e4340f13d8b5c]

url:    https://github.com/intel-lab-lkp/linux/commits/Philipp-Zabel/drm-amdgpu-don-t-wake-up-the-GPU-for-some-IOCTLs/20250731-133938
base:   6ac55eab4fc41e0ea80f9064945e4340f13d8b5c
patch link:    https://lore.kernel.org/r/20250731-b4-dont-wake-next-v1-2-e51bdc347fa3%40gmail.com
patch subject: [PATCH RFC 2/6] drm/amdgpu: don't wake up the GPU when opening the device
config: x86_64-buildonly-randconfig-003-20250801 (https://download.01.org/0day-ci/archive/20250801/202508010626.uE8CD8uK-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250801/202508010626.uE8CD8uK-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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508010626.uE8CD8uK-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c:1434:6: warning: variable 'r' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
    1434 |         if (fpriv->initialized)
         |             ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c:1503:9: note: uninitialized use occurs here
    1503 |         return r;
         |                ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c:1434:2: note: remove the 'if' if its condition is always false
    1434 |         if (fpriv->initialized)
         |         ^~~~~~~~~~~~~~~~~~~~~~~
    1435 |                 goto out_unlock;
         |                 ~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c:1431:7: note: initialize the variable 'r' to silence this warning
    1431 |         int r, pasid;
         |              ^
         |               = 0
   1 warning generated.


vim +1434 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

  1426	
  1427	int amdgpu_driver_init_fpriv(struct drm_device *dev, struct drm_file *file_priv,
  1428				     struct amdgpu_fpriv *fpriv)
  1429	{
  1430		struct amdgpu_device *adev = drm_to_adev(dev);
  1431		int r, pasid;
  1432	
  1433		mutex_lock(&fpriv->init_lock);
> 1434		if (fpriv->initialized)
  1435			goto out_unlock;
  1436	
  1437		pasid = amdgpu_pasid_alloc(16);
  1438		if (pasid < 0) {
  1439			dev_warn(adev->dev, "No more PASIDs available!");
  1440			pasid = 0;
  1441		}
  1442	
  1443		r = amdgpu_xcp_open_device(adev, fpriv, file_priv);
  1444		if (r)
  1445			goto error_pasid;
  1446	
  1447		amdgpu_debugfs_vm_init(file_priv);
  1448	
  1449		r = amdgpu_vm_init(adev, &fpriv->vm, fpriv->xcp_id);
  1450		if (r)
  1451			goto error_pasid;
  1452	
  1453		r = amdgpu_vm_set_pasid(adev, &fpriv->vm, pasid);
  1454		if (r)
  1455			goto error_vm;
  1456	
  1457		fpriv->prt_va = amdgpu_vm_bo_add(adev, &fpriv->vm, NULL);
  1458		if (!fpriv->prt_va) {
  1459			r = -ENOMEM;
  1460			goto error_vm;
  1461		}
  1462	
  1463		if (adev->gfx.mcbp) {
  1464			uint64_t csa_addr = amdgpu_csa_vaddr(adev) & AMDGPU_GMC_HOLE_MASK;
  1465	
  1466			r = amdgpu_map_static_csa(adev, &fpriv->vm, adev->virt.csa_obj,
  1467							&fpriv->csa_va, csa_addr, AMDGPU_CSA_SIZE);
  1468			if (r)
  1469				goto error_vm;
  1470		}
  1471	
  1472		r = amdgpu_seq64_map(adev, &fpriv->vm, &fpriv->seq64_va);
  1473		if (r)
  1474			goto error_vm;
  1475	
  1476		mutex_init(&fpriv->bo_list_lock);
  1477		idr_init_base(&fpriv->bo_list_handles, 1);
  1478	
  1479		r = amdgpu_userq_mgr_init(&fpriv->userq_mgr, file_priv, adev);
  1480		if (r)
  1481			DRM_WARN("Can't setup usermode queues, use legacy workload submission only\n");
  1482	
  1483		r = amdgpu_eviction_fence_init(&fpriv->evf_mgr);
  1484		if (r)
  1485			goto error_vm;
  1486	
  1487		amdgpu_ctx_mgr_init(&fpriv->ctx_mgr, adev);
  1488	
  1489		fpriv->initialized = true;
  1490		goto out_unlock;
  1491	
  1492	error_vm:
  1493		amdgpu_vm_fini(adev, &fpriv->vm);
  1494	
  1495	error_pasid:
  1496		if (pasid) {
  1497			amdgpu_pasid_free(pasid);
  1498			amdgpu_vm_set_pasid(adev, &fpriv->vm, 0);
  1499		}
  1500	
  1501	out_unlock:
  1502		mutex_unlock(&fpriv->init_lock);
  1503		return r;
  1504	}
  1505	

-- 
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:[~2025-07-31 22:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250731-b4-dont-wake-next-v1-2-e51bdc347fa3@gmail.com>
2025-07-31 22:18 ` [PATCH RFC 2/6] drm/amdgpu: don't wake up the GPU when opening the device kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).