]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu: switch to common rlc_autoload helper
authorHawking Zhang <Hawking.Zhang@amd.com>
Mon, 4 May 2020 13:03:44 +0000 (21:03 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 8 May 2020 18:32:03 +0000 (14:32 -0400)
drop IP specific psp function for rlc autoload since
the autoload_supported was introduced to mark ASICs
that support rlc_autoload

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: John Clements <john.clements@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c

index a45464aa9996e0dd7826b02ff4c01187f183accf..ddb4af0cc7020b4fb7ef62fea47238206828182a 100644 (file)
@@ -1646,7 +1646,7 @@ static int psp_np_fw_load(struct psp_context *psp)
                /* Start rlc autoload after psp recieved all the gfx firmware */
                if (psp->autoload_supported && ucode->ucode_id == (amdgpu_sriov_vf(adev) ?
                    AMDGPU_UCODE_ID_CP_MEC2 : AMDGPU_UCODE_ID_RLC_G)) {
-                       ret = psp_rlc_autoload(psp);
+                       ret = psp_rlc_autoload_start(psp);
                        if (ret) {
                                DRM_ERROR("Failed to start rlc autoload\n");
                                return ret;
index 46bd85f7b93776414640986dad1894fb497b48fb..2a56ad996d834ec0a1923dba90e28bb0ed83413e 100644 (file)
@@ -95,7 +95,6 @@ struct psp_funcs
                            enum psp_ring_type ring_type);
        bool (*smu_reload_quirk)(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);
        void (*mem_training_fini)(struct psp_context *psp);
        int (*mem_training)(struct psp_context *psp, uint32_t ops);
@@ -307,8 +306,6 @@ struct amdgpu_psp_funcs {
                ((psp)->funcs->smu_reload_quirk ? (psp)->funcs->smu_reload_quirk((psp)) : false)
 #define psp_mode1_reset(psp) \
                ((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) \
        ((psp)->funcs->mem_training_init ? (psp)->funcs->mem_training_init((psp)) : 0)
 #define psp_mem_training_fini(psp) \
index cfbf30a43e3eeb36a4d39a5663d1f3402c6b03e9..1de89cc3c3559e4f80c360dade988c61933e031d 100644 (file)
@@ -524,11 +524,6 @@ static int psp_v11_0_mode1_reset(struct psp_context *psp)
        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)
 {
        int ret;
@@ -825,7 +820,6 @@ static const struct psp_funcs psp_v11_0_funcs = {
        .ring_stop = psp_v11_0_ring_stop,
        .ring_destroy = psp_v11_0_ring_destroy,
        .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_fini = psp_v11_0_memory_training_fini,
        .mem_training = psp_v11_0_memory_training,