diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c index 9b589402b58d..a99e0bca6812 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | |||
@@ -614,6 +614,17 @@ static int amdgpu_cgs_enter_safe_mode(struct cgs_device *cgs_device, | |||
614 | return 0; | 614 | return 0; |
615 | } | 615 | } |
616 | 616 | ||
617 | static void amdgpu_cgs_lock_grbm_idx(struct cgs_device *cgs_device, | ||
618 | bool lock) | ||
619 | { | ||
620 | CGS_FUNC_ADEV; | ||
621 | |||
622 | if (lock) | ||
623 | mutex_lock(&adev->grbm_idx_mutex); | ||
624 | else | ||
625 | mutex_unlock(&adev->grbm_idx_mutex); | ||
626 | } | ||
627 | |||
617 | static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device, | 628 | static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device, |
618 | enum cgs_ucode_id type, | 629 | enum cgs_ucode_id type, |
619 | struct cgs_firmware_info *info) | 630 | struct cgs_firmware_info *info) |
@@ -1127,6 +1138,7 @@ static const struct cgs_ops amdgpu_cgs_ops = { | |||
1127 | .query_system_info = amdgpu_cgs_query_system_info, | 1138 | .query_system_info = amdgpu_cgs_query_system_info, |
1128 | .is_virtualization_enabled = amdgpu_cgs_is_virtualization_enabled, | 1139 | .is_virtualization_enabled = amdgpu_cgs_is_virtualization_enabled, |
1129 | .enter_safe_mode = amdgpu_cgs_enter_safe_mode, | 1140 | .enter_safe_mode = amdgpu_cgs_enter_safe_mode, |
1141 | .lock_grbm_idx = amdgpu_cgs_lock_grbm_idx, | ||
1130 | }; | 1142 | }; |
1131 | 1143 | ||
1132 | static const struct cgs_os_ops amdgpu_cgs_os_ops = { | 1144 | static const struct cgs_os_ops amdgpu_cgs_os_ops = { |