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

Go to the source code of this file.

Macros

#define PFP_UCODE_SIZE   576
 
#define PM4_UCODE_SIZE   1792
 
#define RLC_UCODE_SIZE   768
 
#define R700_PFP_UCODE_SIZE   848
 
#define R700_PM4_UCODE_SIZE   1360
 
#define R700_RLC_UCODE_SIZE   1024
 
#define EVERGREEN_PFP_UCODE_SIZE   1120
 
#define EVERGREEN_PM4_UCODE_SIZE   1376
 
#define EVERGREEN_RLC_UCODE_SIZE   768
 
#define CAYMAN_RLC_UCODE_SIZE   1024
 
#define ARUBA_RLC_UCODE_SIZE   1536
 

Functions

 MODULE_FIRMWARE ("radeon/R600_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/R600_me.bin")
 
 MODULE_FIRMWARE ("radeon/RV610_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/RV610_me.bin")
 
 MODULE_FIRMWARE ("radeon/RV630_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/RV630_me.bin")
 
 MODULE_FIRMWARE ("radeon/RV620_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/RV620_me.bin")
 
 MODULE_FIRMWARE ("radeon/RV635_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/RV635_me.bin")
 
 MODULE_FIRMWARE ("radeon/RV670_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/RV670_me.bin")
 
 MODULE_FIRMWARE ("radeon/RS780_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/RS780_me.bin")
 
 MODULE_FIRMWARE ("radeon/RV770_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/RV770_me.bin")
 
 MODULE_FIRMWARE ("radeon/RV730_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/RV730_me.bin")
 
 MODULE_FIRMWARE ("radeon/RV710_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/RV710_me.bin")
 
 MODULE_FIRMWARE ("radeon/R600_rlc.bin")
 
 MODULE_FIRMWARE ("radeon/R700_rlc.bin")
 
 MODULE_FIRMWARE ("radeon/CEDAR_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/CEDAR_me.bin")
 
 MODULE_FIRMWARE ("radeon/CEDAR_rlc.bin")
 
 MODULE_FIRMWARE ("radeon/REDWOOD_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/REDWOOD_me.bin")
 
 MODULE_FIRMWARE ("radeon/REDWOOD_rlc.bin")
 
 MODULE_FIRMWARE ("radeon/JUNIPER_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/JUNIPER_me.bin")
 
 MODULE_FIRMWARE ("radeon/JUNIPER_rlc.bin")
 
 MODULE_FIRMWARE ("radeon/CYPRESS_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/CYPRESS_me.bin")
 
 MODULE_FIRMWARE ("radeon/CYPRESS_rlc.bin")
 
 MODULE_FIRMWARE ("radeon/PALM_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/PALM_me.bin")
 
 MODULE_FIRMWARE ("radeon/SUMO_rlc.bin")
 
 MODULE_FIRMWARE ("radeon/SUMO_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/SUMO_me.bin")
 
 MODULE_FIRMWARE ("radeon/SUMO2_pfp.bin")
 
 MODULE_FIRMWARE ("radeon/SUMO2_me.bin")
 
int r600_debugfs_mc_info_init (struct radeon_device *rdev)
 
int r600_mc_wait_for_idle (struct radeon_device *rdev)
 
void r600_fini (struct radeon_device *rdev)
 
void r600_irq_disable (struct radeon_device *rdev)
 
int rv6xx_get_temp (struct radeon_device *rdev)
 
void r600_pm_get_dynpm_state (struct radeon_device *rdev)
 
void rs780_pm_init_profile (struct radeon_device *rdev)
 
void r600_pm_init_profile (struct radeon_device *rdev)
 
void r600_pm_misc (struct radeon_device *rdev)
 
bool r600_gui_idle (struct radeon_device *rdev)
 
bool r600_hpd_sense (struct radeon_device *rdev, enum radeon_hpd_id hpd)
 
void r600_hpd_set_polarity (struct radeon_device *rdev, enum radeon_hpd_id hpd)
 
void r600_hpd_init (struct radeon_device *rdev)
 
void r600_hpd_fini (struct radeon_device *rdev)
 
void r600_pcie_gart_tlb_flush (struct radeon_device *rdev)
 
int r600_pcie_gart_init (struct radeon_device *rdev)
 
int r600_vram_scratch_init (struct radeon_device *rdev)
 
void r600_vram_scratch_fini (struct radeon_device *rdev)
 
bool r600_gpu_is_lockup (struct radeon_device *rdev, struct radeon_ring *ring)
 
int r600_asic_reset (struct radeon_device *rdev)
 
u32 r6xx_remap_render_backend (struct radeon_device *rdev, u32 tiling_pipe_num, u32 max_rb_num, u32 total_max_rb_num, u32 disabled_rb_mask)
 
int r600_count_pipe_bits (uint32_t val)
 
u32 r600_pciep_rreg (struct radeon_device *rdev, u32 reg)
 
void r600_pciep_wreg (struct radeon_device *rdev, u32 reg, u32 v)
 
void r600_cp_stop (struct radeon_device *rdev)
 
int r600_init_microcode (struct radeon_device *rdev)
 
int r600_cp_start (struct radeon_device *rdev)
 
int r600_cp_resume (struct radeon_device *rdev)
 
void r600_ring_init (struct radeon_device *rdev, struct radeon_ring *ring, unsigned ring_size)
 
void r600_cp_fini (struct radeon_device *rdev)
 
void r600_scratch_init (struct radeon_device *rdev)
 
int r600_ring_test (struct radeon_device *rdev, struct radeon_ring *ring)
 
void r600_fence_ring_emit (struct radeon_device *rdev, struct radeon_fence *fence)
 
void r600_semaphore_ring_emit (struct radeon_device *rdev, struct radeon_ring *ring, struct radeon_semaphore *semaphore, bool emit_wait)
 
int r600_copy_blit (struct radeon_device *rdev, uint64_t src_offset, uint64_t dst_offset, unsigned num_gpu_pages, struct radeon_fence **fence)
 
int r600_set_surface_reg (struct radeon_device *rdev, int reg, uint32_t tiling_flags, uint32_t pitch, uint32_t offset, uint32_t obj_size)
 
void r600_clear_surface_reg (struct radeon_device *rdev, int reg)
 
void r600_vga_set_state (struct radeon_device *rdev, bool state)
 
int r600_resume (struct radeon_device *rdev)
 
int r600_suspend (struct radeon_device *rdev)
 
int r600_init (struct radeon_device *rdev)
 
void r600_ring_ib_execute (struct radeon_device *rdev, struct radeon_ib *ib)
 
int r600_ib_test (struct radeon_device *rdev, struct radeon_ring *ring)
 
void r600_ih_ring_init (struct radeon_device *rdev, unsigned ring_size)
 
int r600_ih_ring_alloc (struct radeon_device *rdev)
 
void r600_ih_ring_fini (struct radeon_device *rdev)
 
void r600_rlc_stop (struct radeon_device *rdev)
 
void r600_disable_interrupts (struct radeon_device *rdev)
 
int r600_irq_init (struct radeon_device *rdev)
 
void r600_irq_suspend (struct radeon_device *rdev)
 
void r600_irq_fini (struct radeon_device *rdev)
 
int r600_irq_set (struct radeon_device *rdev)
 
int r600_irq_process (struct radeon_device *rdev)
 
void r600_ioctl_wait_idle (struct radeon_device *rdev, struct radeon_bo *bo)
 
void r600_set_pcie_lanes (struct radeon_device *rdev, int lanes)
 
int r600_get_pcie_lanes (struct radeon_device *rdev)
 
uint64_t r600_get_gpu_clock (struct radeon_device *rdev)
 

Macro Definition Documentation

#define ARUBA_RLC_UCODE_SIZE   1536

Definition at line 52 of file r600.c.

#define CAYMAN_RLC_UCODE_SIZE   1024

Definition at line 51 of file r600.c.

#define EVERGREEN_PFP_UCODE_SIZE   1120

Definition at line 48 of file r600.c.

#define EVERGREEN_PM4_UCODE_SIZE   1376

Definition at line 49 of file r600.c.

#define EVERGREEN_RLC_UCODE_SIZE   768

Definition at line 50 of file r600.c.

#define PFP_UCODE_SIZE   576

Definition at line 42 of file r600.c.

#define PM4_UCODE_SIZE   1792

Definition at line 43 of file r600.c.

#define R700_PFP_UCODE_SIZE   848

Definition at line 45 of file r600.c.

#define R700_PM4_UCODE_SIZE   1360

Definition at line 46 of file r600.c.

#define R700_RLC_UCODE_SIZE   1024

Definition at line 47 of file r600.c.

#define RLC_UCODE_SIZE   768

Definition at line 44 of file r600.c.

Function Documentation

MODULE_FIRMWARE ( "radeon/R600_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/R600_me.bin"  )
MODULE_FIRMWARE ( "radeon/RV610_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/RV610_me.bin"  )
MODULE_FIRMWARE ( "radeon/RV630_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/RV630_me.bin"  )
MODULE_FIRMWARE ( "radeon/RV620_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/RV620_me.bin"  )
MODULE_FIRMWARE ( "radeon/RV635_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/RV635_me.bin"  )
MODULE_FIRMWARE ( "radeon/RV670_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/RV670_me.bin"  )
MODULE_FIRMWARE ( "radeon/RS780_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/RS780_me.bin"  )
MODULE_FIRMWARE ( "radeon/RV770_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/RV770_me.bin"  )
MODULE_FIRMWARE ( "radeon/RV730_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/RV730_me.bin"  )
MODULE_FIRMWARE ( "radeon/RV710_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/RV710_me.bin"  )
MODULE_FIRMWARE ( "radeon/R600_rlc.bin"  )
MODULE_FIRMWARE ( "radeon/R700_rlc.bin"  )
MODULE_FIRMWARE ( "radeon/CEDAR_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/CEDAR_me.bin"  )
MODULE_FIRMWARE ( "radeon/CEDAR_rlc.bin"  )
MODULE_FIRMWARE ( "radeon/REDWOOD_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/REDWOOD_me.bin"  )
MODULE_FIRMWARE ( "radeon/REDWOOD_rlc.bin"  )
MODULE_FIRMWARE ( "radeon/JUNIPER_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/JUNIPER_me.bin"  )
MODULE_FIRMWARE ( "radeon/JUNIPER_rlc.bin"  )
MODULE_FIRMWARE ( "radeon/CYPRESS_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/CYPRESS_me.bin"  )
MODULE_FIRMWARE ( "radeon/CYPRESS_rlc.bin"  )
MODULE_FIRMWARE ( "radeon/PALM_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/PALM_me.bin"  )
MODULE_FIRMWARE ( "radeon/SUMO_rlc.bin"  )
MODULE_FIRMWARE ( "radeon/SUMO_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/SUMO_me.bin"  )
MODULE_FIRMWARE ( "radeon/SUMO2_pfp.bin"  )
MODULE_FIRMWARE ( "radeon/SUMO2_me.bin"  )
int r600_asic_reset ( struct radeon_device rdev)

Definition at line 1373 of file r600.c.

void r600_clear_surface_reg ( struct radeon_device rdev,
int  reg 
)

Definition at line 2345 of file r600.c.

int r600_copy_blit ( struct radeon_device rdev,
uint64_t  src_offset,
uint64_t  dst_offset,
unsigned  num_gpu_pages,
struct radeon_fence **  fence 
)

Definition at line 2318 of file r600.c.

int r600_count_pipe_bits ( uint32_t  val)

Definition at line 1425 of file r600.c.

void r600_cp_fini ( struct radeon_device rdev)

Definition at line 2191 of file r600.c.

int r600_cp_resume ( struct radeon_device rdev)

Definition at line 2109 of file r600.c.

int r600_cp_start ( struct radeon_device rdev)

Definition at line 2079 of file r600.c.

void r600_cp_stop ( struct radeon_device rdev)

Definition at line 1869 of file r600.c.

int r600_debugfs_mc_info_init ( struct radeon_device rdev)

Definition at line 3521 of file r600.c.

void r600_disable_interrupts ( struct radeon_device rdev)

Definition at line 2847 of file r600.c.

void r600_fence_ring_emit ( struct radeon_device rdev,
struct radeon_fence fence 
)

Definition at line 2255 of file r600.c.

void r600_fini ( struct radeon_device rdev)

Definition at line 2570 of file r600.c.

uint64_t r600_get_gpu_clock ( struct radeon_device rdev)

r600_get_gpu_clock - return GPU clock counter snapshot

: radeon_device pointer

Fetches a GPU clock counter snapshot (R6xx-cayman). Returns the 64 bit clock counter snapshot.

Definition at line 3802 of file r600.c.

int r600_get_pcie_lanes ( struct radeon_device rdev)

Definition at line 3640 of file r600.c.

bool r600_gpu_is_lockup ( struct radeon_device rdev,
struct radeon_ring ring 
)

Definition at line 1355 of file r600.c.

bool r600_gui_idle ( struct radeon_device rdev)

Definition at line 552 of file r600.c.

void r600_hpd_fini ( struct radeon_device rdev)

Definition at line 774 of file r600.c.

void r600_hpd_init ( struct radeon_device rdev)

Definition at line 708 of file r600.c.

bool r600_hpd_sense ( struct radeon_device rdev,
enum radeon_hpd_id  hpd 
)

Definition at line 561 of file r600.c.

void r600_hpd_set_polarity ( struct radeon_device rdev,
enum radeon_hpd_id  hpd 
)

Definition at line 616 of file r600.c.

int r600_ib_test ( struct radeon_device rdev,
struct radeon_ring ring 
)

Definition at line 2624 of file r600.c.

int r600_ih_ring_alloc ( struct radeon_device rdev)

Definition at line 2700 of file r600.c.

void r600_ih_ring_fini ( struct radeon_device rdev)

Definition at line 2736 of file r600.c.

void r600_ih_ring_init ( struct radeon_device rdev,
unsigned  ring_size 
)

Definition at line 2688 of file r600.c.

int r600_init ( struct radeon_device rdev)

Definition at line 2488 of file r600.c.

int r600_init_microcode ( struct radeon_device rdev)

Definition at line 1876 of file r600.c.

void r600_ioctl_wait_idle ( struct radeon_device rdev,
struct radeon_bo bo 
)

r600_ioctl_wait_idle - flush host path cache on wait idle ioctl rdev: radeon device structure bo: buffer object struct which userspace is waiting for idle

Some R6XX/R7XX doesn't seems to take into account HDP flush performed through ring buffer, this leads to corruption in rendering, see http://bugzilla.kernel.org/show_bug.cgi?id=15186 to avoid this we directly perform HDP flush by writing register through MMIO.

Definition at line 3540 of file r600.c.

void r600_irq_disable ( struct radeon_device rdev)

Definition at line 3238 of file r600.c.

void r600_irq_fini ( struct radeon_device rdev)

Definition at line 2995 of file r600.c.

int r600_irq_init ( struct radeon_device rdev)

Definition at line 2914 of file r600.c.

int r600_irq_process ( struct radeon_device rdev)

Definition at line 3301 of file r600.c.

int r600_irq_set ( struct radeon_device rdev)

Definition at line 3001 of file r600.c.

void r600_irq_suspend ( struct radeon_device rdev)

Definition at line 2989 of file r600.c.

int r600_mc_wait_for_idle ( struct radeon_device rdev)

Definition at line 1015 of file r600.c.

int r600_pcie_gart_init ( struct radeon_device rdev)

Definition at line 868 of file r600.c.

void r600_pcie_gart_tlb_flush ( struct radeon_device rdev)

Definition at line 829 of file r600.c.

u32 r600_pciep_rreg ( struct radeon_device rdev,
u32  reg 
)

Definition at line 1848 of file r600.c.

void r600_pciep_wreg ( struct radeon_device rdev,
u32  reg,
u32  v 
)

Definition at line 1858 of file r600.c.

void r600_pm_get_dynpm_state ( struct radeon_device rdev)

Definition at line 119 of file r600.c.

void r600_pm_init_profile ( struct radeon_device rdev)

Definition at line 405 of file r600.c.

void r600_pm_misc ( struct radeon_device rdev)

Definition at line 533 of file r600.c.

int r600_resume ( struct radeon_device rdev)

Definition at line 2448 of file r600.c.

void r600_ring_ib_execute ( struct radeon_device rdev,
struct radeon_ib ib 
)

Definition at line 2594 of file r600.c.

void r600_ring_init ( struct radeon_device rdev,
struct radeon_ring ring,
unsigned  ring_size 
)

Definition at line 2171 of file r600.c.

int r600_ring_test ( struct radeon_device rdev,
struct radeon_ring ring 
)

Definition at line 2215 of file r600.c.

void r600_rlc_stop ( struct radeon_device rdev)

Definition at line 2752 of file r600.c.

void r600_scratch_init ( struct radeon_device rdev)

Definition at line 2203 of file r600.c.

void r600_semaphore_ring_emit ( struct radeon_device rdev,
struct radeon_ring ring,
struct radeon_semaphore semaphore,
bool  emit_wait 
)

Definition at line 2302 of file r600.c.

void r600_set_pcie_lanes ( struct radeon_device rdev,
int  lanes 
)

Definition at line 3558 of file r600.c.

int r600_set_surface_reg ( struct radeon_device rdev,
int  reg,
uint32_t  tiling_flags,
uint32_t  pitch,
uint32_t  offset,
uint32_t  obj_size 
)

Definition at line 2337 of file r600.c.

int r600_suspend ( struct radeon_device rdev)

Definition at line 2470 of file r600.c.

void r600_vga_set_state ( struct radeon_device rdev,
bool  state 
)

Definition at line 2434 of file r600.c.

void r600_vram_scratch_fini ( struct radeon_device rdev)

Definition at line 1241 of file r600.c.

int r600_vram_scratch_init ( struct radeon_device rdev)

Definition at line 1210 of file r600.c.

u32 r6xx_remap_render_backend ( struct radeon_device rdev,
u32  tiling_pipe_num,
u32  max_rb_num,
u32  total_max_rb_num,
u32  disabled_rb_mask 
)

Definition at line 1378 of file r600.c.

void rs780_pm_init_profile ( struct radeon_device rdev)

Definition at line 292 of file r600.c.

int rv6xx_get_temp ( struct radeon_device rdev)

Definition at line 107 of file r600.c.