summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/pm
diff options
context:
space:
mode:
authorLijo Lazar <lijo.lazar@amd.com>2025-10-08 13:07:13 +0530
committerAlex Deucher <alexander.deucher@amd.com>2025-10-13 14:14:35 -0400
commit2b5b3f9b698f8e5d6492763947231e7d9420d8da (patch)
tree7b1ff80ad52047927e44f70f49c455f4040b3cfc /drivers/gpu/drm/amd/pm
parent1cbac73d1a15db0f149cb0c6a932301de5f15b05 (diff)
downloadlinux-next-2b5b3f9b698f8e5d6492763947231e7d9420d8da.tar.gz
linux-next-2b5b3f9b698f8e5d6492763947231e7d9420d8da.zip
drm/amd/pm: Grant interface access after full init
Allow access to user interfaces like sysfs/hwmon only after full initialization of the device. When device is part of XGMI hive and a reset is required during initialization, the inteface files will be created as part of minimal device initialization. Full initialization of the device will be done only after all devices in XGMI hive are probed and a reset is done together on all. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Asad Kamal <asad.kamal@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm')
-rw-r--r--drivers/gpu/drm/amd/pm/amdgpu_pm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index 6bdf185c6b60..c83d69994380 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -108,8 +108,9 @@ const char * const amdgpu_pp_profile_name[] = {
static int amdgpu_pm_dev_state_check(struct amdgpu_device *adev, bool runpm)
{
bool runpm_check = runpm ? adev->in_runpm : false;
+ bool full_init = (adev->init_lvl->level == AMDGPU_INIT_LEVEL_DEFAULT);
- if (amdgpu_in_reset(adev))
+ if (amdgpu_in_reset(adev) || !full_init)
return -EBUSY;
if (adev->in_suspend && !runpm_check)