Commit 79e5412c authored by Alex Deucher's avatar Alex Deucher

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: default avatarTom St Denis <tom.stdenis@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 146f256f
...@@ -1037,6 +1037,11 @@ void amdgpu_bo_list_free(struct amdgpu_bo_list *list); ...@@ -1037,6 +1037,11 @@ void amdgpu_bo_list_free(struct amdgpu_bo_list *list);
*/ */
#include "clearstate_defs.h" #include "clearstate_defs.h"
struct amdgpu_rlc_funcs {
void (*enter_safe_mode)(struct amdgpu_device *adev);
void (*exit_safe_mode)(struct amdgpu_device *adev);
};
struct amdgpu_rlc { struct amdgpu_rlc {
/* for power gating */ /* for power gating */
struct amdgpu_bo *save_restore_obj; struct amdgpu_bo *save_restore_obj;
...@@ -1055,6 +1060,10 @@ struct amdgpu_rlc { ...@@ -1055,6 +1060,10 @@ struct amdgpu_rlc {
uint64_t cp_table_gpu_addr; uint64_t cp_table_gpu_addr;
volatile uint32_t *cp_table_ptr; volatile uint32_t *cp_table_ptr;
u32 cp_table_size; u32 cp_table_size;
/* safe mode for updating CG/PG state */
bool in_safe_mode;
const struct amdgpu_rlc_funcs *funcs;
}; };
struct amdgpu_mec { struct amdgpu_mec {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment