#include <linux/delay.h>
#include <linux/gfp.h>
#include <linux/kernel.h>
#include <linux/ktime.h>
#include <linux/slab.h>
#include <linux/types.h>
#include "cgs_common.h"
#include "smu/smu_8_0_d.h"
#include "smu/smu_8_0_sh_mask.h"
#include "smu8.h"
#include "smu8_fusion.h"
#include "smu8_smumgr.h"
#include "cz_ppsmc.h"
#include "smu_ucode_xfer_cz.h"
#include "gca/gfx_8_0_d.h"
#include "gca/gfx_8_0_sh_mask.h"
#include "smumgr.h"
#define SIZE_ALIGN_32(x) …
static const enum smu8_scratch_entry firmware_list[] = …;
static uint32_t smu8_get_argument(struct pp_hwmgr *hwmgr)
{ … }
static int smu8_send_msg_to_smc_with_parameter(struct pp_hwmgr *hwmgr,
uint16_t msg, uint32_t parameter)
{ … }
static int smu8_send_msg_to_smc(struct pp_hwmgr *hwmgr, uint16_t msg)
{ … }
static int smu8_set_smc_sram_address(struct pp_hwmgr *hwmgr,
uint32_t smc_address, uint32_t limit)
{ … }
static int smu8_write_smc_sram_dword(struct pp_hwmgr *hwmgr,
uint32_t smc_address, uint32_t value, uint32_t limit)
{ … }
static int smu8_check_fw_load_finish(struct pp_hwmgr *hwmgr,
uint32_t firmware)
{ … }
static int smu8_load_mec_firmware(struct pp_hwmgr *hwmgr)
{ … }
static uint8_t smu8_translate_firmware_enum_to_arg(struct pp_hwmgr *hwmgr,
enum smu8_scratch_entry firmware_enum)
{ … }
static enum cgs_ucode_id smu8_convert_fw_type_to_cgs(uint32_t fw_type)
{ … }
static int smu8_smu_populate_single_scratch_task(
struct pp_hwmgr *hwmgr,
enum smu8_scratch_entry fw_enum,
uint8_t type, bool is_last)
{ … }
static int smu8_smu_populate_single_ucode_load_task(
struct pp_hwmgr *hwmgr,
enum smu8_scratch_entry fw_enum,
bool is_last)
{ … }
static int smu8_smu_construct_toc_for_rlc_aram_save(struct pp_hwmgr *hwmgr)
{ … }
static int smu8_smu_initialize_toc_empty_job_list(struct pp_hwmgr *hwmgr)
{ … }
static int smu8_smu_construct_toc_for_vddgfx_enter(struct pp_hwmgr *hwmgr)
{ … }
static int smu8_smu_construct_toc_for_vddgfx_exit(struct pp_hwmgr *hwmgr)
{ … }
static int smu8_smu_construct_toc_for_power_profiling(struct pp_hwmgr *hwmgr)
{ … }
static int smu8_smu_construct_toc_for_bootup(struct pp_hwmgr *hwmgr)
{ … }
static int smu8_smu_construct_toc_for_clock_table(struct pp_hwmgr *hwmgr)
{ … }
static int smu8_smu_construct_toc(struct pp_hwmgr *hwmgr)
{ … }
static int smu8_smu_populate_firmware_entries(struct pp_hwmgr *hwmgr)
{ … }
static int smu8_smu_populate_single_scratch_entry(
struct pp_hwmgr *hwmgr,
enum smu8_scratch_entry scratch_type,
uint32_t ulsize_byte,
struct smu8_buffer_entry *entry)
{ … }
static int smu8_download_pptable_settings(struct pp_hwmgr *hwmgr, void **table)
{ … }
static int smu8_upload_pptable_settings(struct pp_hwmgr *hwmgr)
{ … }
static int smu8_request_smu_load_fw(struct pp_hwmgr *hwmgr)
{ … }
static int smu8_start_smu(struct pp_hwmgr *hwmgr)
{ … }
static int smu8_smu_init(struct pp_hwmgr *hwmgr)
{ … }
static int smu8_smu_fini(struct pp_hwmgr *hwmgr)
{ … }
static bool smu8_dpm_check_smu_features(struct pp_hwmgr *hwmgr,
unsigned long check_feature)
{ … }
static bool smu8_is_dpm_running(struct pp_hwmgr *hwmgr)
{ … }
const struct pp_smumgr_func smu8_smu_funcs = …;