summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2019-10-31 09:15:29 +0300
committerAlex Deucher <alexander.deucher@amd.com>2019-11-07 00:27:48 +0300
commit5c5b2ba00667edd6c5c0df9f97ba2b179d013e1d (patch)
tree56d4e43b3cbdfc030ccb18703301b155dc90b49b /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parentb0adca4d50169d9a05912e208a89cdd615da40d4 (diff)
downloadlinux-5c5b2ba00667edd6c5c0df9f97ba2b179d013e1d.tar.xz
drm/amdgpu: fix possible pstate switch race condition
Added lock protection so that the p-state switch will be guarded to be sequential. Also update the hive pstate only all device from the hive are in the same state. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Feifei Xu <Feifei.Xu@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.h3
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 0bb08e0e1611..bcc5d40a8d5f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -977,6 +977,9 @@ struct amdgpu_device {
uint64_t unique_id;
uint64_t df_perfmon_config_assign_mask[AMDGPU_MAX_DF_PERFMONS];
+
+ /* device pstate */
+ int pstate;
};
static inline struct amdgpu_device *amdgpu_ttm_adev(struct ttm_bo_device *bdev)