mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-05 09:05:24 +07:00
drm/amd/powerplay: add fw load checking interface
This patch adds fw load checking interface for smu. Signed-off-by: Huang Rui <ray.huang@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
3d2f5200a7
commit
e11c4fd578
@ -102,6 +102,12 @@ static int smu_hw_init(void *handle)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = smu_check_fw_status(smu);
|
||||
if (ret) {
|
||||
pr_err("SMC firmware status is not correct\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
mutex_lock(&smu->mutex);
|
||||
|
||||
/* TODO */
|
||||
|
@ -36,12 +36,15 @@ struct smu_funcs
|
||||
{
|
||||
int (*init_microcode)(struct smu_context *smu);
|
||||
int (*load_microcode)(struct smu_context *smu);
|
||||
int (*check_fw_status)(struct smu_context *smu);
|
||||
};
|
||||
|
||||
#define smu_init_microcode(smu) \
|
||||
((smu)->funcs->init_microcode ? (smu)->funcs->init_microcode((smu)) : 0)
|
||||
#define smu_load_microcode(smu) \
|
||||
((smu)->funcs->load_microcode ? (smu)->funcs->load_microcode((smu)) : 0)
|
||||
#define smu_check_fw_status(smu) \
|
||||
((smu)->funcs->check_fw_status ? (smu)->funcs->check_fw_status((smu)) : 0)
|
||||
|
||||
extern const struct amd_ip_funcs smu_ip_funcs;
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <linux/firmware.h>
|
||||
#include "amdgpu.h"
|
||||
#include "amdgpu_smu.h"
|
||||
#include "smu_v11_0.h"
|
||||
|
||||
static int smu_v11_0_init_microcode(struct smu_context *smu)
|
||||
{
|
||||
@ -37,9 +38,15 @@ static int smu_v11_0_load_microcode(struct smu_context *smu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int smu_v11_0_check_fw_status(struct smu_context *smu)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct smu_funcs smu_v11_0_funcs = {
|
||||
.init_microcode = smu_v11_0_init_microcode,
|
||||
.load_microcode = smu_v11_0_load_microcode,
|
||||
.check_fw_status = smu_v11_0_check_fw_status,
|
||||
};
|
||||
|
||||
void smu_v11_0_set_smu_funcs(struct smu_context *smu)
|
||||
|
Loading…
Reference in New Issue
Block a user