aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-04-08 15:45:13 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-05-04 20:22:11 -0400
commit79e5412c58ef7bfdc54d1bb85b63c6c8e6d2c3f7 (patch)
treed2b157255409b6071a27ff3976259a42fcb25c88 /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parent146f256faea7762d42c1b2aae14b816a92f2eb10 (diff)
drm/amdgpu: add a new set of rlc function pointers
Different asics tend to have different ways to interact with the RLC. This just covers enter/exit of safe mode for updating CG and PG state, but could be extended to cover other RLC operations in the future if necessary. Acked-by: Tom St Denis <tom.stdenis@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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index a7a53ac5f413..4a2b9a37271d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1037,6 +1037,11 @@ void amdgpu_bo_list_free(struct amdgpu_bo_list *list);
1037 */ 1037 */
1038#include "clearstate_defs.h" 1038#include "clearstate_defs.h"
1039 1039
1040struct amdgpu_rlc_funcs {
1041 void (*enter_safe_mode)(struct amdgpu_device *adev);
1042 void (*exit_safe_mode)(struct amdgpu_device *adev);
1043};
1044
1040struct amdgpu_rlc { 1045struct amdgpu_rlc {
1041 /* for power gating */ 1046 /* for power gating */
1042 struct amdgpu_bo *save_restore_obj; 1047 struct amdgpu_bo *save_restore_obj;
@@ -1055,6 +1060,10 @@ struct amdgpu_rlc {
1055 uint64_t cp_table_gpu_addr; 1060 uint64_t cp_table_gpu_addr;
1056 volatile uint32_t *cp_table_ptr; 1061 volatile uint32_t *cp_table_ptr;
1057 u32 cp_table_size; 1062 u32 cp_table_size;
1063
1064 /* safe mode for updating CG/PG state */
1065 bool in_safe_mode;
1066 const struct amdgpu_rlc_funcs *funcs;
1058}; 1067};
1059 1068
1060struct amdgpu_mec { 1069struct amdgpu_mec {