diff options
author | Evan Quan <evan.quan@amd.com> | 2020-05-22 13:57:11 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-05-29 20:55:07 +0300 |
commit | b265bdbd9f2811c2a674ea9d1161de821923897c (patch) | |
tree | 624303118365a4bba34f2e90fe2a0f3c67fa4e28 /drivers/gpu/drm/amd/amdgpu/amdgpu.h | |
parent | bcdc7c05bd2dd8fa8afbd725110d5ec3075d4b42 (diff) | |
download | linux-b265bdbd9f2811c2a674ea9d1161de821923897c.tar.xz |
drm/amdgpu: added a sysfs interface for thermal throttling related V4
User can check and set the enablement of throttling logging and
the interval between each logging.
V2: simplify the sysfs interface(no string parsing)
V3: add proper lock protection on updating throttling_logging_rs.interval
V4: documentation cosmetic per Luben's suggestion
Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Luben Tuikov <luben.tuikov@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index cd913986863e..922d5bca14c0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -993,6 +993,9 @@ struct amdgpu_device { char serial[16]; struct amdgpu_autodump autodump; + + atomic_t throttling_logging_enabled; + struct ratelimit_state throttling_logging_rs; }; static inline struct amdgpu_device *amdgpu_ttm_adev(struct ttm_bo_device *bdev) |