#include <linux/firmware.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <drm/drm_cache.h>
#include "amdgpu.h"
#include "cikd.h"
#include "cik.h"
#include "gmc_v7_0.h"
#include "amdgpu_ucode.h"
#include "amdgpu_amdkfd.h"
#include "amdgpu_gem.h"
#include "bif/bif_4_1_d.h"
#include "bif/bif_4_1_sh_mask.h"
#include "gmc/gmc_7_1_d.h"
#include "gmc/gmc_7_1_sh_mask.h"
#include "oss/oss_2_0_d.h"
#include "oss/oss_2_0_sh_mask.h"
#include "dce/dce_8_0_d.h"
#include "dce/dce_8_0_sh_mask.h"
#include "amdgpu_atombios.h"
#include "ivsrcid/ivsrcid_vislands30.h"
static void gmc_v7_0_set_gmc_funcs(struct amdgpu_device *adev);
static void gmc_v7_0_set_irq_funcs(struct amdgpu_device *adev);
static int gmc_v7_0_wait_for_idle(void *handle);
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
static const u32 golden_settings_iceland_a11[] = …;
static const u32 iceland_mgcg_cgcg_init[] = …;
static void gmc_v7_0_init_golden_registers(struct amdgpu_device *adev)
{ … }
static void gmc_v7_0_mc_stop(struct amdgpu_device *adev)
{ … }
static void gmc_v7_0_mc_resume(struct amdgpu_device *adev)
{ … }
static int gmc_v7_0_init_microcode(struct amdgpu_device *adev)
{ … }
static int gmc_v7_0_mc_load_microcode(struct amdgpu_device *adev)
{ … }
static void gmc_v7_0_vram_gtt_location(struct amdgpu_device *adev,
struct amdgpu_gmc *mc)
{ … }
static void gmc_v7_0_mc_program(struct amdgpu_device *adev)
{ … }
static int gmc_v7_0_mc_init(struct amdgpu_device *adev)
{ … }
static void gmc_v7_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev,
uint16_t pasid, uint32_t flush_type,
bool all_hub, uint32_t inst)
{ … }
static void gmc_v7_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid,
uint32_t vmhub, uint32_t flush_type)
{ … }
static uint64_t gmc_v7_0_emit_flush_gpu_tlb(struct amdgpu_ring *ring,
unsigned int vmid, uint64_t pd_addr)
{ … }
static void gmc_v7_0_emit_pasid_mapping(struct amdgpu_ring *ring, unsigned int vmid,
unsigned int pasid)
{ … }
static void gmc_v7_0_get_vm_pde(struct amdgpu_device *adev, int level,
uint64_t *addr, uint64_t *flags)
{ … }
static void gmc_v7_0_get_vm_pte(struct amdgpu_device *adev,
struct amdgpu_bo_va_mapping *mapping,
uint64_t *flags)
{ … }
static void gmc_v7_0_set_fault_enable_default(struct amdgpu_device *adev,
bool value)
{ … }
static void gmc_v7_0_set_prt(struct amdgpu_device *adev, bool enable)
{ … }
static int gmc_v7_0_gart_enable(struct amdgpu_device *adev)
{ … }
static int gmc_v7_0_gart_init(struct amdgpu_device *adev)
{ … }
static void gmc_v7_0_gart_disable(struct amdgpu_device *adev)
{ … }
static void gmc_v7_0_vm_decode_fault(struct amdgpu_device *adev, u32 status,
u32 addr, u32 mc_client, unsigned int pasid)
{ … }
static const u32 mc_cg_registers[] = …;
static const u32 mc_cg_ls_en[] = …;
static const u32 mc_cg_en[] = …;
static void gmc_v7_0_enable_mc_ls(struct amdgpu_device *adev,
bool enable)
{ … }
static void gmc_v7_0_enable_mc_mgcg(struct amdgpu_device *adev,
bool enable)
{ … }
static void gmc_v7_0_enable_bif_mgls(struct amdgpu_device *adev,
bool enable)
{ … }
static void gmc_v7_0_enable_hdp_mgcg(struct amdgpu_device *adev,
bool enable)
{ … }
static void gmc_v7_0_enable_hdp_ls(struct amdgpu_device *adev,
bool enable)
{ … }
static int gmc_v7_0_convert_vram_type(int mc_seq_vram_type)
{ … }
static int gmc_v7_0_early_init(void *handle)
{ … }
static int gmc_v7_0_late_init(void *handle)
{ … }
static unsigned int gmc_v7_0_get_vbios_fb_size(struct amdgpu_device *adev)
{ … }
static int gmc_v7_0_sw_init(void *handle)
{ … }
static int gmc_v7_0_sw_fini(void *handle)
{ … }
static int gmc_v7_0_hw_init(void *handle)
{ … }
static int gmc_v7_0_hw_fini(void *handle)
{ … }
static int gmc_v7_0_suspend(void *handle)
{ … }
static int gmc_v7_0_resume(void *handle)
{ … }
static bool gmc_v7_0_is_idle(void *handle)
{ … }
static int gmc_v7_0_wait_for_idle(void *handle)
{ … }
static int gmc_v7_0_soft_reset(void *handle)
{ … }
static int gmc_v7_0_vm_fault_interrupt_state(struct amdgpu_device *adev,
struct amdgpu_irq_src *src,
unsigned int type,
enum amdgpu_interrupt_state state)
{ … }
static int gmc_v7_0_process_interrupt(struct amdgpu_device *adev,
struct amdgpu_irq_src *source,
struct amdgpu_iv_entry *entry)
{ … }
static int gmc_v7_0_set_clockgating_state(void *handle,
enum amd_clockgating_state state)
{ … }
static int gmc_v7_0_set_powergating_state(void *handle,
enum amd_powergating_state state)
{ … }
static const struct amd_ip_funcs gmc_v7_0_ip_funcs = …;
static const struct amdgpu_gmc_funcs gmc_v7_0_gmc_funcs = …;
static const struct amdgpu_irq_src_funcs gmc_v7_0_irq_funcs = …;
static void gmc_v7_0_set_gmc_funcs(struct amdgpu_device *adev)
{ … }
static void gmc_v7_0_set_irq_funcs(struct amdgpu_device *adev)
{ … }
const struct amdgpu_ip_block_version gmc_v7_0_ip_block = …;
const struct amdgpu_ip_block_version gmc_v7_4_ip_block = …;