Commit 999a69e2 authored by Hawking Zhang's avatar Hawking Zhang Committed by Alex Deucher

drm/amdgpu: switch to common rlc_autoload helper

drop IP specific psp function for rlc autoload since
the autoload_supported was introduced to mark ASICs
that support rlc_autoload
Signed-off-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: default avatarGuchun Chen <guchun.chen@amd.com>
Reviewed-by: default avatarJohn Clements <john.clements@amd.com>
Reviewed-by: default avatarTao Zhou <tao.zhou1@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c797c583
...@@ -1646,7 +1646,7 @@ static int psp_np_fw_load(struct psp_context *psp) ...@@ -1646,7 +1646,7 @@ static int psp_np_fw_load(struct psp_context *psp)
/* Start rlc autoload after psp recieved all the gfx firmware */ /* Start rlc autoload after psp recieved all the gfx firmware */
if (psp->autoload_supported && ucode->ucode_id == (amdgpu_sriov_vf(adev) ? if (psp->autoload_supported && ucode->ucode_id == (amdgpu_sriov_vf(adev) ?
AMDGPU_UCODE_ID_CP_MEC2 : AMDGPU_UCODE_ID_RLC_G)) { AMDGPU_UCODE_ID_CP_MEC2 : AMDGPU_UCODE_ID_RLC_G)) {
ret = psp_rlc_autoload(psp); ret = psp_rlc_autoload_start(psp);
if (ret) { if (ret) {
DRM_ERROR("Failed to start rlc autoload\n"); DRM_ERROR("Failed to start rlc autoload\n");
return ret; return ret;
......
...@@ -95,7 +95,6 @@ struct psp_funcs ...@@ -95,7 +95,6 @@ struct psp_funcs
enum psp_ring_type ring_type); enum psp_ring_type ring_type);
bool (*smu_reload_quirk)(struct psp_context *psp); bool (*smu_reload_quirk)(struct psp_context *psp);
int (*mode1_reset)(struct psp_context *psp); int (*mode1_reset)(struct psp_context *psp);
int (*rlc_autoload_start)(struct psp_context *psp);
int (*mem_training_init)(struct psp_context *psp); int (*mem_training_init)(struct psp_context *psp);
void (*mem_training_fini)(struct psp_context *psp); void (*mem_training_fini)(struct psp_context *psp);
int (*mem_training)(struct psp_context *psp, uint32_t ops); int (*mem_training)(struct psp_context *psp, uint32_t ops);
...@@ -307,8 +306,6 @@ struct amdgpu_psp_funcs { ...@@ -307,8 +306,6 @@ struct amdgpu_psp_funcs {
((psp)->funcs->smu_reload_quirk ? (psp)->funcs->smu_reload_quirk((psp)) : false) ((psp)->funcs->smu_reload_quirk ? (psp)->funcs->smu_reload_quirk((psp)) : false)
#define psp_mode1_reset(psp) \ #define psp_mode1_reset(psp) \
((psp)->funcs->mode1_reset ? (psp)->funcs->mode1_reset((psp)) : false) ((psp)->funcs->mode1_reset ? (psp)->funcs->mode1_reset((psp)) : false)
#define psp_rlc_autoload(psp) \
((psp)->funcs->rlc_autoload_start ? (psp)->funcs->rlc_autoload_start((psp)) : 0)
#define psp_mem_training_init(psp) \ #define psp_mem_training_init(psp) \
((psp)->funcs->mem_training_init ? (psp)->funcs->mem_training_init((psp)) : 0) ((psp)->funcs->mem_training_init ? (psp)->funcs->mem_training_init((psp)) : 0)
#define psp_mem_training_fini(psp) \ #define psp_mem_training_fini(psp) \
......
...@@ -524,11 +524,6 @@ static int psp_v11_0_mode1_reset(struct psp_context *psp) ...@@ -524,11 +524,6 @@ static int psp_v11_0_mode1_reset(struct psp_context *psp)
return 0; return 0;
} }
static int psp_v11_0_rlc_autoload_start(struct psp_context *psp)
{
return psp_rlc_autoload_start(psp);
}
static int psp_v11_0_memory_training_send_msg(struct psp_context *psp, int msg) static int psp_v11_0_memory_training_send_msg(struct psp_context *psp, int msg)
{ {
int ret; int ret;
...@@ -825,7 +820,6 @@ static const struct psp_funcs psp_v11_0_funcs = { ...@@ -825,7 +820,6 @@ static const struct psp_funcs psp_v11_0_funcs = {
.ring_stop = psp_v11_0_ring_stop, .ring_stop = psp_v11_0_ring_stop,
.ring_destroy = psp_v11_0_ring_destroy, .ring_destroy = psp_v11_0_ring_destroy,
.mode1_reset = psp_v11_0_mode1_reset, .mode1_reset = psp_v11_0_mode1_reset,
.rlc_autoload_start = psp_v11_0_rlc_autoload_start,
.mem_training_init = psp_v11_0_memory_training_init, .mem_training_init = psp_v11_0_memory_training_init,
.mem_training_fini = psp_v11_0_memory_training_fini, .mem_training_fini = psp_v11_0_memory_training_fini,
.mem_training = psp_v11_0_memory_training, .mem_training = psp_v11_0_memory_training,
......
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