diff options
| author | Jinzhou.Su <[email protected]> | 2020-07-07 10:52:18 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2020-07-21 19:37:37 +0000 |
| commit | 443c7f3c3641c790a7c306f9d9d54a2a5e3021b9 (patch) | |
| tree | 153e2fe575b46a527bab79c635fe57a73699b9c0 /drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | |
| parent | drm/amdgpu: load ta firmware for sienna cichlid (diff) | |
| download | kernel-443c7f3c3641c790a7c306f9d9d54a2a5e3021b9.tar.gz kernel-443c7f3c3641c790a7c306f9d9d54a2a5e3021b9.zip | |
drm/amdgpu: add read amdgpu_gfxoff status in debugfs
Add interface for SMU12 device, used by UMR.
v2: fix code style
Signed-off-by: Jinzhou.Su <[email protected]>
Reviewed-by: Evan Quan <[email protected]>
Reviewed-by: Huang Rui <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c index d612033a23ac..78d37f92c7be 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c @@ -578,6 +578,20 @@ void amdgpu_gfx_off_ctrl(struct amdgpu_device *adev, bool enable) mutex_unlock(&adev->gfx.gfx_off_mutex); } +int amdgpu_get_gfx_off_status(struct amdgpu_device *adev, uint32_t *value) +{ + + int r = 0; + + mutex_lock(&adev->gfx.gfx_off_mutex); + + r = smu_get_status_gfxoff(adev, value); + + mutex_unlock(&adev->gfx.gfx_off_mutex); + + return r; +} + int amdgpu_gfx_ras_late_init(struct amdgpu_device *adev) { int r; |
