Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
ni.c File Reference
#include <linux/firmware.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <drm/drmP.h>
#include "radeon.h"
#include "radeon_asic.h"
#include <drm/radeon_drm.h>
#include "nid.h"
#include "atom.h"
#include "ni_reg.h"
#include "cayman_blit_shaders.h"

Go to the source code of this file.

Macros

#define EVERGREEN_PFP_UCODE_SIZE   1120
 
#define EVERGREEN_PM4_UCODE_SIZE   1376
 
#define EVERGREEN_RLC_UCODE_SIZE   768
 
#define BTC_MC_UCODE_SIZE   6024
 
#define CAYMAN_PFP_UCODE_SIZE   2176
 
#define CAYMAN_PM4_UCODE_SIZE   2176
 
#define CAYMAN_RLC_UCODE_SIZE   1024
 
#define CAYMAN_MC_UCODE_SIZE   6037
 
#define ARUBA_RLC_UCODE_SIZE   1536
 
#define BTC_IO_MC_REGS_SIZE   29
 
#define R600_ENTRY_VALID   (1 << 0)
 
#define R600_PTE_SYSTEM   (1 << 1)
 
#define R600_PTE_SNOOPED   (1 << 2)
 
#define R600_PTE_READABLE   (1 << 5)
 
#define R600_PTE_WRITEABLE   (1 << 6)
 

Functions

void evergreen_mc_stop (struct radeon_device *rdev, struct evergreen_mc_save *save)
 
void evergreen_mc_resume (struct radeon_device *rdev, struct evergreen_mc_save *save)
 
int evergreen_mc_wait_for_idle (struct radeon_device *rdev)
 
void evergreen_mc_program (struct radeon_device *rdev)
 
void evergreen_irq_suspend (struct radeon_device *rdev)
 
int evergreen_mc_init (struct radeon_device *rdev)
 
void evergreen_fix_pci_max_read_req_size (struct radeon_device *rdev)
 
void evergreen_pcie_gen2_enable (struct radeon_device *rdev)
 
void si_rlc_fini (struct radeon_device *rdev)
 
int si_rlc_init (struct radeon_device *rdev)
 
 MODULE_FIRMWARE ("radeon/BARTS_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/BARTS_me.bin")
 
 MODULE_FIRMWARE ("radeon/BARTS_mc.bin")
 
 MODULE_FIRMWARE ("radeon/BTC_rlc.bin")
 
 MODULE_FIRMWARE ("radeon/TURKS_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/TURKS_me.bin")
 
 MODULE_FIRMWARE ("radeon/TURKS_mc.bin")
 
 MODULE_FIRMWARE ("radeon/CAICOS_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/CAICOS_me.bin")
 
 MODULE_FIRMWARE ("radeon/CAICOS_mc.bin")
 
 MODULE_FIRMWARE ("radeon/CAYMAN_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/CAYMAN_me.bin")
 
 MODULE_FIRMWARE ("radeon/CAYMAN_mc.bin")
 
 MODULE_FIRMWARE ("radeon/CAYMAN_rlc.bin")
 
 MODULE_FIRMWARE ("radeon/ARUBA_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/ARUBA_me.bin")
 
 MODULE_FIRMWARE ("radeon/ARUBA_rlc.bin")
 
int ni_mc_load_microcode (struct radeon_device *rdev)
 
int ni_init_microcode (struct radeon_device *rdev)
 
void cayman_pcie_gart_tlb_flush (struct radeon_device *rdev)
 
void cayman_cp_int_cntl_setup (struct radeon_device *rdev, int ring, u32 cp_int_cntl)
 
void cayman_fence_ring_emit (struct radeon_device *rdev, struct radeon_fence *fence)
 
void cayman_ring_ib_execute (struct radeon_device *rdev, struct radeon_ib *ib)
 
int cayman_asic_reset (struct radeon_device *rdev)
 
int cayman_resume (struct radeon_device *rdev)
 
int cayman_suspend (struct radeon_device *rdev)
 
int cayman_init (struct radeon_device *rdev)
 
void cayman_fini (struct radeon_device *rdev)
 
int cayman_vm_init (struct radeon_device *rdev)
 
void cayman_vm_fini (struct radeon_device *rdev)
 
uint32_t cayman_vm_page_flags (struct radeon_device *rdev, uint32_t flags)
 
void cayman_vm_set_page (struct radeon_device *rdev, uint64_t pe, uint64_t addr, unsigned count, uint32_t incr, uint32_t flags)
 
void cayman_vm_flush (struct radeon_device *rdev, int ridx, struct radeon_vm *vm)
 

Macro Definition Documentation

#define ARUBA_RLC_UCODE_SIZE   1536

Definition at line 58 of file ni.c.

#define BTC_IO_MC_REGS_SIZE   29

Definition at line 79 of file ni.c.

#define BTC_MC_UCODE_SIZE   6024

Definition at line 51 of file ni.c.

#define CAYMAN_MC_UCODE_SIZE   6037

Definition at line 56 of file ni.c.

#define CAYMAN_PFP_UCODE_SIZE   2176

Definition at line 53 of file ni.c.

#define CAYMAN_PM4_UCODE_SIZE   2176

Definition at line 54 of file ni.c.

#define CAYMAN_RLC_UCODE_SIZE   1024

Definition at line 55 of file ni.c.

#define EVERGREEN_PFP_UCODE_SIZE   1120

Definition at line 48 of file ni.c.

#define EVERGREEN_PM4_UCODE_SIZE   1376

Definition at line 49 of file ni.c.

#define EVERGREEN_RLC_UCODE_SIZE   768

Definition at line 50 of file ni.c.

#define R600_ENTRY_VALID   (1 << 0)

Definition at line 1504 of file ni.c.

#define R600_PTE_READABLE   (1 << 5)

Definition at line 1507 of file ni.c.

#define R600_PTE_SNOOPED   (1 << 2)

Definition at line 1506 of file ni.c.

#define R600_PTE_SYSTEM   (1 << 1)

Definition at line 1505 of file ni.c.

#define R600_PTE_WRITEABLE   (1 << 6)

Definition at line 1508 of file ni.c.

Function Documentation

int cayman_asic_reset ( struct radeon_device rdev)

Definition at line 1206 of file ni.c.

void cayman_cp_int_cntl_setup ( struct radeon_device rdev,
int  ring,
u32  cp_int_cntl 
)

Definition at line 827 of file ni.c.

void cayman_fence_ring_emit ( struct radeon_device rdev,
struct radeon_fence fence 
)

Definition at line 839 of file ni.c.

void cayman_fini ( struct radeon_device rdev)

Definition at line 1462 of file ni.c.

int cayman_init ( struct radeon_device rdev)

Definition at line 1370 of file ni.c.

void cayman_pcie_gart_tlb_flush ( struct radeon_device rdev)

Definition at line 720 of file ni.c.

int cayman_resume ( struct radeon_device rdev)

Definition at line 1332 of file ni.c.

void cayman_ring_ib_execute ( struct radeon_device rdev,
struct radeon_ib ib 
)

Definition at line 863 of file ni.c.

int cayman_suspend ( struct radeon_device rdev)

Definition at line 1353 of file ni.c.

void cayman_vm_fini ( struct radeon_device rdev)

Definition at line 1500 of file ni.c.

void cayman_vm_flush ( struct radeon_device rdev,
int  ridx,
struct radeon_vm vm 
)

cayman_vm_flush - vm flush using the CP

: radeon_device pointer

Update the page table base and flush the VM TLB using the CP (cayman-si).

Definition at line 1577 of file ni.c.

int cayman_vm_init ( struct radeon_device rdev)

Definition at line 1486 of file ni.c.

uint32_t cayman_vm_page_flags ( struct radeon_device rdev,
uint32_t  flags 
)

Definition at line 1510 of file ni.c.

void cayman_vm_set_page ( struct radeon_device rdev,
uint64_t  pe,
uint64_t  addr,
unsigned  count,
uint32_t  incr,
uint32_t  flags 
)

cayman_vm_set_page - update the page tables using the CP

: radeon_device pointer : addr of the page entry : dst addr to write into pe : number of page entries to update : increase next addr by incr bytes : access flags

Update the page tables using the CP (cayman-si).

Definition at line 1535 of file ni.c.

void evergreen_fix_pci_max_read_req_size ( struct radeon_device rdev)

Definition at line 87 of file evergreen.c.

void evergreen_irq_suspend ( struct radeon_device rdev)

Definition at line 2777 of file evergreen.c.

int evergreen_mc_init ( struct radeon_device rdev)

Definition at line 2230 of file evergreen.c.

void evergreen_mc_program ( struct radeon_device rdev)

Definition at line 1402 of file evergreen.c.

void evergreen_mc_resume ( struct radeon_device rdev,
struct evergreen_mc_save save 
)

Definition at line 1350 of file evergreen.c.

void evergreen_mc_stop ( struct radeon_device rdev,
struct evergreen_mc_save save 
)

Definition at line 1296 of file evergreen.c.

int evergreen_mc_wait_for_idle ( struct radeon_device rdev)

evergreen_mc_wait_for_idle - wait for MC idle callback.

: radeon_device pointer

Wait for the MC (memory controller) to be idle. (evergreen+). Returns 0 if the MC is idle, -1 if not.

Definition at line 1137 of file evergreen.c.

void evergreen_pcie_gen2_enable ( struct radeon_device rdev)

Definition at line 3411 of file evergreen.c.

MODULE_FIRMWARE ( "radeon/BARTS_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/BARTS_me.bin"  )
MODULE_FIRMWARE ( "radeon/BARTS_mc.bin"  )
MODULE_FIRMWARE ( "radeon/BTC_rlc.bin"  )
MODULE_FIRMWARE ( "radeon/TURKS_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/TURKS_me.bin"  )
MODULE_FIRMWARE ( "radeon/TURKS_mc.bin"  )
MODULE_FIRMWARE ( "radeon/CAICOS_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/CAICOS_me.bin"  )
MODULE_FIRMWARE ( "radeon/CAICOS_mc.bin"  )
MODULE_FIRMWARE ( "radeon/CAYMAN_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/CAYMAN_me.bin"  )
MODULE_FIRMWARE ( "radeon/CAYMAN_mc.bin"  )
MODULE_FIRMWARE ( "radeon/CAYMAN_rlc.bin"  )
MODULE_FIRMWARE ( "radeon/ARUBA_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/ARUBA_me.bin"  )
MODULE_FIRMWARE ( "radeon/ARUBA_rlc.bin"  )
int ni_init_microcode ( struct radeon_device rdev)

Definition at line 285 of file ni.c.

int ni_mc_load_microcode ( struct radeon_device rdev)

Definition at line 209 of file ni.c.

void si_rlc_fini ( struct radeon_device rdev)

Definition at line 2886 of file si.c.

int si_rlc_init ( struct radeon_device rdev)

Definition at line 2915 of file si.c.