Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/pm: refine amdgpu pm sysfs node error code

v1:
Returns different error codes based on the scenario to help the user app understand
the AMDGPU device status when an exception occurs.

v2:
change -NODEV to -EBUSY.

Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Yang Wang and committed by
Alex Deucher
cf32515a bddf3094

+3 -2
+3 -2
drivers/gpu/drm/amd/pm/amdgpu_pm.c
··· 110 110 bool runpm_check = runpm ? adev->in_runpm : false; 111 111 112 112 if (amdgpu_in_reset(adev)) 113 - return -EPERM; 113 + return -EBUSY; 114 + 114 115 if (adev->in_suspend && !runpm_check) 115 - return -EPERM; 116 + return -EBUSY; 116 117 117 118 return 0; 118 119 }