Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
radeon.h File Reference
#include <linux/atomic.h>
#include <linux/wait.h>
#include <linux/list.h>
#include <linux/kref.h>
#include <ttm/ttm_bo_api.h>
#include <ttm/ttm_bo_driver.h>
#include <ttm/ttm_placement.h>
#include <ttm/ttm_module.h>
#include <ttm/ttm_execbuf_util.h>
#include "radeon_family.h"
#include "radeon_mode.h"
#include "radeon_reg.h"
#include "radeon_object.h"

Go to the source code of this file.

Data Structures

struct  radeon_dummy_page
 
struct  radeon_clock
 
struct  radeon_fence_driver
 
struct  radeon_fence
 
struct  radeon_surface_reg
 
struct  radeon_mman
 
struct  radeon_bo_va
 
struct  radeon_bo
 
struct  radeon_bo_list
 
struct  radeon_sa_manager
 
struct  radeon_sa_bo
 
struct  radeon_gem
 
struct  radeon_semaphore
 
struct  radeon_gart
 
struct  radeon_mc
 
struct  radeon_scratch
 
struct  radeon_unpin_work
 
struct  r500_irq_stat_regs
 
struct  r600_irq_stat_regs
 
struct  evergreen_irq_stat_regs
 
union  radeon_irq_stat_regs
 
struct  radeon_irq
 
struct  radeon_ib
 
struct  radeon_ring
 
struct  radeon_vm
 
struct  radeon_vm_manager
 
struct  radeon_fpriv
 
struct  r600_ih
 
struct  r600_blit_cp_primitives
 
struct  r600_blit
 
struct  si_rlc
 
struct  radeon_cs_reloc
 
struct  radeon_cs_chunk
 
struct  radeon_cs_parser
 
struct  radeon_cs_packet
 
struct  radeon_wb
 
struct  radeon_pm_profile
 
struct  radeon_voltage
 
struct  radeon_pm_clock_info
 
struct  radeon_power_state
 
struct  radeon_pm
 
struct  r600_audio
 
struct  radeon_debugfs
 
struct  radeon_asic
 
struct  r100_asic
 
struct  r300_asic
 
struct  r600_asic
 
struct  rv770_asic
 
struct  evergreen_asic
 
struct  cayman_asic
 
struct  si_asic
 
union  radeon_asic_config
 
struct  r600_vram_scratch
 
struct  radeon_atif_notification_cfg
 
struct  radeon_atif_notifications
 
struct  radeon_atif_functions
 
struct  radeon_atif
 
struct  radeon_atcs_functions
 
struct  radeon_atcs
 
struct  radeon_device
 
struct  radeon_hdmi_acr
 

Macros

#define RADEON_MAX_USEC_TIMEOUT   100000 /* 100 ms */
 
#define RADEON_FENCE_JIFFIES_TIMEOUT   (HZ / 2)
 
#define RADEON_IB_POOL_SIZE   16
 
#define RADEON_DEBUGFS_MAX_COMPONENTS   32
 
#define RADEONFB_CONN_LIMIT   4
 
#define RADEON_BIOS_NUM_SCRATCH   8
 
#define RADEON_NUM_RINGS   3
 
#define RADEON_FENCE_SIGNALED_SEQ   0LL
 
#define RADEON_RING_TYPE_GFX_INDEX   0
 
#define CAYMAN_RING_TYPE_CP1_INDEX   1
 
#define CAYMAN_RING_TYPE_CP2_INDEX   2
 
#define RADEON_VA_IB_OFFSET   (1 << 20)
 
#define RADEON_VA_RESERVED_SIZE   (8 << 20)
 
#define RADEON_IB_VM_MAX_SIZE   (64 << 10)
 
#define RADEON_GEM_MAX_SURFACES   8
 
#define gem_to_radeon_bo(gobj)   container_of((gobj), struct radeon_bo, gem_base)
 
#define RADEON_GPU_PAGE_SIZE   4096
 
#define RADEON_GPU_PAGE_MASK   (RADEON_GPU_PAGE_SIZE - 1)
 
#define RADEON_GPU_PAGE_SHIFT   12
 
#define RADEON_GPU_PAGE_ALIGN(a)   (((a) + RADEON_GPU_PAGE_MASK) & ~RADEON_GPU_PAGE_MASK)
 
#define RADEON_MAX_HPD_PINS   6
 
#define RADEON_MAX_CRTCS   6
 
#define RADEON_MAX_AFMT_BLOCKS   6
 
#define RADEON_NUM_VM   16
 
#define RADEON_VM_BLOCK_SIZE   9
 
#define RADEON_VM_PTE_COUNT   (1 << RADEON_VM_BLOCK_SIZE)
 
#define RADEON_WB_SCRATCH_OFFSET   0
 
#define RADEON_WB_RING0_NEXT_RPTR   256
 
#define RADEON_WB_CP_RPTR_OFFSET   1024
 
#define RADEON_WB_CP1_RPTR_OFFSET   1280
 
#define RADEON_WB_CP2_RPTR_OFFSET   1536
 
#define R600_WB_IH_WPTR_OFFSET   2048
 
#define R600_WB_EVENT_OFFSET   3072
 
#define PM_PROFILE_DEFAULT_IDX   0
 
#define PM_PROFILE_LOW_SH_IDX   1
 
#define PM_PROFILE_MID_SH_IDX   2
 
#define PM_PROFILE_HIGH_SH_IDX   3
 
#define PM_PROFILE_LOW_MH_IDX   4
 
#define PM_PROFILE_MID_MH_IDX   5
 
#define PM_PROFILE_HIGH_MH_IDX   6
 
#define PM_PROFILE_MAX   7
 
#define RADEON_PM_MODE_NO_DISPLAY   (1 << 0)
 
#define RADEON_PM_STATE_SINGLE_DISPLAY_ONLY   (1 << 0)
 
#define RADEON_MODE_OVERCLOCK_MARGIN   500 /* 5 MHz */
 
#define to_radeon_fence(p)   ((struct radeon_fence *)(p))
 
#define RREG8(reg)   readb((rdev->rmmio) + (reg))
 
#define WREG8(reg, v)   writeb(v, (rdev->rmmio) + (reg))
 
#define RREG16(reg)   readw((rdev->rmmio) + (reg))
 
#define WREG16(reg, v)   writew(v, (rdev->rmmio) + (reg))
 
#define RREG32(reg)   r100_mm_rreg(rdev, (reg))
 
#define DREG32(reg)   printk(KERN_INFO "REGISTER: " #reg " : 0x%08X\n", r100_mm_rreg(rdev, (reg)))
 
#define WREG32(reg, v)   r100_mm_wreg(rdev, (reg), (v))
 
#define REG_SET(FIELD, v)   (((v) << FIELD##_SHIFT) & FIELD##_MASK)
 
#define REG_GET(FIELD, v)   (((v) << FIELD##_SHIFT) & FIELD##_MASK)
 
#define RREG32_PLL(reg)   rdev->pll_rreg(rdev, (reg))
 
#define WREG32_PLL(reg, v)   rdev->pll_wreg(rdev, (reg), (v))
 
#define RREG32_MC(reg)   rdev->mc_rreg(rdev, (reg))
 
#define WREG32_MC(reg, v)   rdev->mc_wreg(rdev, (reg), (v))
 
#define RREG32_PCIE(reg)   rv370_pcie_rreg(rdev, (reg))
 
#define WREG32_PCIE(reg, v)   rv370_pcie_wreg(rdev, (reg), (v))
 
#define RREG32_PCIE_P(reg)   rdev->pciep_rreg(rdev, (reg))
 
#define WREG32_PCIE_P(reg, v)   rdev->pciep_wreg(rdev, (reg), (v))
 
#define WREG32_P(reg, val, mask)
 
#define WREG32_PLL_P(reg, val, mask)
 
#define DREG32_SYS(sqf, rdev, reg)   seq_printf((sqf), #reg " : 0x%08X\n", r100_mm_rreg((rdev), (reg)))
 
#define RREG32_IO(reg)   r100_io_rreg(rdev, (reg))
 
#define WREG32_IO(reg, v)   r100_io_wreg(rdev, (reg), (v))
 
#define ASIC_IS_RN50(rdev)
 
#define ASIC_IS_RV100(rdev)
 
#define ASIC_IS_R300(rdev)
 
#define ASIC_IS_X2(rdev)
 
#define ASIC_IS_AVIVO(rdev)   ((rdev->family >= CHIP_RS600))
 
#define ASIC_IS_DCE2(rdev)
 
#define ASIC_IS_DCE3(rdev)   ((rdev->family >= CHIP_RV620))
 
#define ASIC_IS_DCE32(rdev)   ((rdev->family >= CHIP_RV730))
 
#define ASIC_IS_DCE4(rdev)   ((rdev->family >= CHIP_CEDAR))
 
#define ASIC_IS_DCE41(rdev)
 
#define ASIC_IS_DCE5(rdev)   ((rdev->family >= CHIP_BARTS))
 
#define ASIC_IS_DCE6(rdev)   ((rdev->family >= CHIP_ARUBA))
 
#define ASIC_IS_DCE61(rdev)
 
#define RBIOS8(i)   (rdev->bios[i])
 
#define RBIOS16(i)   (RBIOS8(i) | (RBIOS8((i)+1) << 8))
 
#define RBIOS32(i)   ((RBIOS16(i)) | (RBIOS16((i)+2) << 16))
 
#define radeon_init(rdev)   (rdev)->asic->init((rdev))
 
#define radeon_fini(rdev)   (rdev)->asic->fini((rdev))
 
#define radeon_resume(rdev)   (rdev)->asic->resume((rdev))
 
#define radeon_suspend(rdev)   (rdev)->asic->suspend((rdev))
 
#define radeon_cs_parse(rdev, r, p)   (rdev)->asic->ring[(r)].cs_parse((p))
 
#define radeon_vga_set_state(rdev, state)   (rdev)->asic->vga_set_state((rdev), (state))
 
#define radeon_asic_reset(rdev)   (rdev)->asic->asic_reset((rdev))
 
#define radeon_gart_tlb_flush(rdev)   (rdev)->asic->gart.tlb_flush((rdev))
 
#define radeon_gart_set_page(rdev, i, p)   (rdev)->asic->gart.set_page((rdev), (i), (p))
 
#define radeon_asic_vm_init(rdev)   (rdev)->asic->vm.init((rdev))
 
#define radeon_asic_vm_fini(rdev)   (rdev)->asic->vm.fini((rdev))
 
#define radeon_asic_vm_set_page(rdev, pe, addr, count, incr, flags)   ((rdev)->asic->vm.set_page((rdev), (pe), (addr), (count), (incr), (flags)))
 
#define radeon_ring_start(rdev, r, cp)   (rdev)->asic->ring[(r)].ring_start((rdev), (cp))
 
#define radeon_ring_test(rdev, r, cp)   (rdev)->asic->ring[(r)].ring_test((rdev), (cp))
 
#define radeon_ib_test(rdev, r, cp)   (rdev)->asic->ring[(r)].ib_test((rdev), (cp))
 
#define radeon_ring_ib_execute(rdev, r, ib)   (rdev)->asic->ring[(r)].ib_execute((rdev), (ib))
 
#define radeon_ring_ib_parse(rdev, r, ib)   (rdev)->asic->ring[(r)].ib_parse((rdev), (ib))
 
#define radeon_ring_is_lockup(rdev, r, cp)   (rdev)->asic->ring[(r)].is_lockup((rdev), (cp))
 
#define radeon_ring_vm_flush(rdev, r, vm)   (rdev)->asic->ring[(r)].vm_flush((rdev), (r), (vm))
 
#define radeon_irq_set(rdev)   (rdev)->asic->irq.set((rdev))
 
#define radeon_irq_process(rdev)   (rdev)->asic->irq.process((rdev))
 
#define radeon_get_vblank_counter(rdev, crtc)   (rdev)->asic->display.get_vblank_counter((rdev), (crtc))
 
#define radeon_set_backlight_level(rdev, e, l)   (rdev)->asic->display.set_backlight_level((e), (l))
 
#define radeon_get_backlight_level(rdev, e)   (rdev)->asic->display.get_backlight_level((e))
 
#define radeon_fence_ring_emit(rdev, r, fence)   (rdev)->asic->ring[(r)].emit_fence((rdev), (fence))
 
#define radeon_semaphore_ring_emit(rdev, r, cp, semaphore, emit_wait)   (rdev)->asic->ring[(r)].emit_semaphore((rdev), (cp), (semaphore), (emit_wait))
 
#define radeon_copy_blit(rdev, s, d, np, f)   (rdev)->asic->copy.blit((rdev), (s), (d), (np), (f))
 
#define radeon_copy_dma(rdev, s, d, np, f)   (rdev)->asic->copy.dma((rdev), (s), (d), (np), (f))
 
#define radeon_copy(rdev, s, d, np, f)   (rdev)->asic->copy.copy((rdev), (s), (d), (np), (f))
 
#define radeon_copy_blit_ring_index(rdev)   (rdev)->asic->copy.blit_ring_index
 
#define radeon_copy_dma_ring_index(rdev)   (rdev)->asic->copy.dma_ring_index
 
#define radeon_copy_ring_index(rdev)   (rdev)->asic->copy.copy_ring_index
 
#define radeon_get_engine_clock(rdev)   (rdev)->asic->pm.get_engine_clock((rdev))
 
#define radeon_set_engine_clock(rdev, e)   (rdev)->asic->pm.set_engine_clock((rdev), (e))
 
#define radeon_get_memory_clock(rdev)   (rdev)->asic->pm.get_memory_clock((rdev))
 
#define radeon_set_memory_clock(rdev, e)   (rdev)->asic->pm.set_memory_clock((rdev), (e))
 
#define radeon_get_pcie_lanes(rdev)   (rdev)->asic->pm.get_pcie_lanes((rdev))
 
#define radeon_set_pcie_lanes(rdev, l)   (rdev)->asic->pm.set_pcie_lanes((rdev), (l))
 
#define radeon_set_clock_gating(rdev, e)   (rdev)->asic->pm.set_clock_gating((rdev), (e))
 
#define radeon_set_surface_reg(rdev, r, f, p, o, s)   ((rdev)->asic->surface.set_reg((rdev), (r), (f), (p), (o), (s)))
 
#define radeon_clear_surface_reg(rdev, r)   ((rdev)->asic->surface.clear_reg((rdev), (r)))
 
#define radeon_bandwidth_update(rdev)   (rdev)->asic->display.bandwidth_update((rdev))
 
#define radeon_hpd_init(rdev)   (rdev)->asic->hpd.init((rdev))
 
#define radeon_hpd_fini(rdev)   (rdev)->asic->hpd.fini((rdev))
 
#define radeon_hpd_sense(rdev, h)   (rdev)->asic->hpd.sense((rdev), (h))
 
#define radeon_hpd_set_polarity(rdev, h)   (rdev)->asic->hpd.set_polarity((rdev), (h))
 
#define radeon_gui_idle(rdev)   (rdev)->asic->gui_idle((rdev))
 
#define radeon_pm_misc(rdev)   (rdev)->asic->pm.misc((rdev))
 
#define radeon_pm_prepare(rdev)   (rdev)->asic->pm.prepare((rdev))
 
#define radeon_pm_finish(rdev)   (rdev)->asic->pm.finish((rdev))
 
#define radeon_pm_init_profile(rdev)   (rdev)->asic->pm.init_profile((rdev))
 
#define radeon_pm_get_dynpm_state(rdev)   (rdev)->asic->pm.get_dynpm_state((rdev))
 
#define radeon_pre_page_flip(rdev, crtc)   (rdev)->asic->pflip.pre_page_flip((rdev), (crtc))
 
#define radeon_page_flip(rdev, crtc, base)   (rdev)->asic->pflip.page_flip((rdev), (crtc), (base))
 
#define radeon_post_page_flip(rdev, crtc)   (rdev)->asic->pflip.post_page_flip((rdev), (crtc))
 
#define radeon_wait_for_vblank(rdev, crtc)   (rdev)->asic->display.wait_for_vblank((rdev), (crtc))
 
#define radeon_mc_wait_for_idle(rdev)   (rdev)->asic->mc_wait_for_idle((rdev))
 

Typedefs

typedef int(* radeon_packet0_check_t )(struct radeon_cs_parser *p, struct radeon_cs_packet *pkt, unsigned idx, unsigned reg)
 
typedef int(* radeon_packet3_check_t )(struct radeon_cs_parser *p, struct radeon_cs_packet *pkt)
 
typedef uint32_t(* radeon_rreg_t )(struct radeon_device *, uint32_t)
 
typedef void(* radeon_wreg_t )(struct radeon_device *, uint32_t, uint32_t)
 

Enumerations

enum  radeon_pll_errata { CHIP_ERRATA_R300_CG = 0x00000001, CHIP_ERRATA_PLL_DUMMYREADS = 0x00000002, CHIP_ERRATA_PLL_DELAY = 0x00000004 }
 
enum  radeon_pm_method { PM_METHOD_PROFILE, PM_METHOD_DYNPM }
 
enum  radeon_dynpm_state {
  DYNPM_STATE_DISABLED, DYNPM_STATE_MINIMUM, DYNPM_STATE_PAUSED, DYNPM_STATE_ACTIVE,
  DYNPM_STATE_SUSPENDED
}
 
enum  radeon_dynpm_action {
  DYNPM_ACTION_NONE, DYNPM_ACTION_MINIMUM, DYNPM_ACTION_DOWNCLOCK, DYNPM_ACTION_UPCLOCK,
  DYNPM_ACTION_DEFAULT
}
 
enum  radeon_voltage_type { VOLTAGE_NONE = 0, VOLTAGE_GPIO, VOLTAGE_VDDC, VOLTAGE_SW }
 
enum  radeon_pm_state_type {
  POWER_STATE_TYPE_DEFAULT, POWER_STATE_TYPE_POWERSAVE, POWER_STATE_TYPE_BATTERY, POWER_STATE_TYPE_BALANCED,
  POWER_STATE_TYPE_PERFORMANCE
}
 
enum  radeon_pm_profile_type {
  PM_PROFILE_DEFAULT, PM_PROFILE_AUTO, PM_PROFILE_LOW, PM_PROFILE_MID,
  PM_PROFILE_HIGH
}
 
enum  radeon_int_thermal_type {
  THERMAL_TYPE_NONE, THERMAL_TYPE_RV6XX, THERMAL_TYPE_RV770, THERMAL_TYPE_EVERGREEN,
  THERMAL_TYPE_SUMO, THERMAL_TYPE_NI, THERMAL_TYPE_SI
}
 

Functions

bool radeon_get_bios (struct radeon_device *rdev)
 
int radeon_dummy_page_init (struct radeon_device *rdev)
 
void radeon_dummy_page_fini (struct radeon_device *rdev)
 
int radeon_pm_init (struct radeon_device *rdev)
 
void radeon_pm_fini (struct radeon_device *rdev)
 
void radeon_pm_compute_clocks (struct radeon_device *rdev)
 
void radeon_pm_suspend (struct radeon_device *rdev)
 
void radeon_pm_resume (struct radeon_device *rdev)
 
void radeon_combios_get_power_modes (struct radeon_device *rdev)
 
void radeon_atombios_get_power_modes (struct radeon_device *rdev)
 
void radeon_atom_set_voltage (struct radeon_device *rdev, u16 voltage_level, u8 voltage_type)
 
void rs690_pm_info (struct radeon_device *rdev)
 
int rv6xx_get_temp (struct radeon_device *rdev)
 
int rv770_get_temp (struct radeon_device *rdev)
 
int evergreen_get_temp (struct radeon_device *rdev)
 
int sumo_get_temp (struct radeon_device *rdev)
 
int si_get_temp (struct radeon_device *rdev)
 
void evergreen_tiling_fields (unsigned tiling_flags, unsigned *bankw, unsigned *bankh, unsigned *mtaspect, unsigned *tile_split)
 
int radeon_fence_driver_start_ring (struct radeon_device *rdev, int ring)
 
int radeon_fence_driver_init (struct radeon_device *rdev)
 
void radeon_fence_driver_fini (struct radeon_device *rdev)
 
int radeon_fence_emit (struct radeon_device *rdev, struct radeon_fence **fence, int ring)
 
void radeon_fence_process (struct radeon_device *rdev, int ring)
 
bool radeon_fence_signaled (struct radeon_fence *fence)
 
int radeon_fence_wait (struct radeon_fence *fence, bool interruptible)
 
int radeon_fence_wait_next_locked (struct radeon_device *rdev, int ring)
 
void radeon_fence_wait_empty_locked (struct radeon_device *rdev, int ring)
 
int radeon_fence_wait_any (struct radeon_device *rdev, struct radeon_fence **fences, bool intr)
 
struct radeon_fenceradeon_fence_ref (struct radeon_fence *fence)
 
void radeon_fence_unref (struct radeon_fence **fence)
 
unsigned radeon_fence_count_emitted (struct radeon_device *rdev, int ring)
 
bool radeon_fence_need_sync (struct radeon_fence *fence, int ring)
 
void radeon_fence_note_sync (struct radeon_fence *fence, int ring)
 
int radeon_gem_init (struct radeon_device *rdev)
 
void radeon_gem_fini (struct radeon_device *rdev)
 
int radeon_gem_object_create (struct radeon_device *rdev, int size, int alignment, int initial_domain, bool discardable, bool kernel, struct drm_gem_object **obj)
 
int radeon_mode_dumb_create (struct drm_file *file_priv, struct drm_device *dev, struct drm_mode_create_dumb *args)
 
int radeon_mode_dumb_mmap (struct drm_file *filp, struct drm_device *dev, uint32_t handle, uint64_t *offset_p)
 
int radeon_mode_dumb_destroy (struct drm_file *file_priv, struct drm_device *dev, uint32_t handle)
 
int radeon_semaphore_create (struct radeon_device *rdev, struct radeon_semaphore **semaphore)
 
void radeon_semaphore_emit_signal (struct radeon_device *rdev, int ring, struct radeon_semaphore *semaphore)
 
void radeon_semaphore_emit_wait (struct radeon_device *rdev, int ring, struct radeon_semaphore *semaphore)
 
int radeon_semaphore_sync_rings (struct radeon_device *rdev, struct radeon_semaphore *semaphore, int signaler, int waiter)
 
void radeon_semaphore_free (struct radeon_device *rdev, struct radeon_semaphore **semaphore, struct radeon_fence *fence)
 
int radeon_gart_table_ram_alloc (struct radeon_device *rdev)
 
void radeon_gart_table_ram_free (struct radeon_device *rdev)
 
int radeon_gart_table_vram_alloc (struct radeon_device *rdev)
 
void radeon_gart_table_vram_free (struct radeon_device *rdev)
 
int radeon_gart_table_vram_pin (struct radeon_device *rdev)
 
void radeon_gart_table_vram_unpin (struct radeon_device *rdev)
 
int radeon_gart_init (struct radeon_device *rdev)
 
void radeon_gart_fini (struct radeon_device *rdev)
 
void radeon_gart_unbind (struct radeon_device *rdev, unsigned offset, int pages)
 
int radeon_gart_bind (struct radeon_device *rdev, unsigned offset, int pages, struct page **pagelist, dma_addr_t *dma_addr)
 
void radeon_gart_restore (struct radeon_device *rdev)
 
bool radeon_combios_sideport_present (struct radeon_device *rdev)
 
bool radeon_atombios_sideport_present (struct radeon_device *rdev)
 
int radeon_scratch_get (struct radeon_device *rdev, uint32_t *reg)
 
void radeon_scratch_free (struct radeon_device *rdev, uint32_t reg)
 
int radeon_irq_kms_init (struct radeon_device *rdev)
 
void radeon_irq_kms_fini (struct radeon_device *rdev)
 
void radeon_irq_kms_sw_irq_get (struct radeon_device *rdev, int ring)
 
void radeon_irq_kms_sw_irq_put (struct radeon_device *rdev, int ring)
 
void radeon_irq_kms_pflip_irq_get (struct radeon_device *rdev, int crtc)
 
void radeon_irq_kms_pflip_irq_put (struct radeon_device *rdev, int crtc)
 
void radeon_irq_kms_enable_afmt (struct radeon_device *rdev, int block)
 
void radeon_irq_kms_disable_afmt (struct radeon_device *rdev, int block)
 
void radeon_irq_kms_enable_hpd (struct radeon_device *rdev, unsigned hpd_mask)
 
void radeon_irq_kms_disable_hpd (struct radeon_device *rdev, unsigned hpd_mask)
 
int radeon_ib_get (struct radeon_device *rdev, int ring, struct radeon_ib *ib, struct radeon_vm *vm, unsigned size)
 
void radeon_ib_free (struct radeon_device *rdev, struct radeon_ib *ib)
 
int radeon_ib_schedule (struct radeon_device *rdev, struct radeon_ib *ib, struct radeon_ib *const_ib)
 
int radeon_ib_pool_init (struct radeon_device *rdev)
 
void radeon_ib_pool_fini (struct radeon_device *rdev)
 
int radeon_ib_ring_tests (struct radeon_device *rdev)
 
bool radeon_ring_supports_scratch_reg (struct radeon_device *rdev, struct radeon_ring *ring)
 
void radeon_ring_free_size (struct radeon_device *rdev, struct radeon_ring *cp)
 
int radeon_ring_alloc (struct radeon_device *rdev, struct radeon_ring *cp, unsigned ndw)
 
int radeon_ring_lock (struct radeon_device *rdev, struct radeon_ring *cp, unsigned ndw)
 
void radeon_ring_commit (struct radeon_device *rdev, struct radeon_ring *cp)
 
void radeon_ring_unlock_commit (struct radeon_device *rdev, struct radeon_ring *cp)
 
void radeon_ring_undo (struct radeon_ring *ring)
 
void radeon_ring_unlock_undo (struct radeon_device *rdev, struct radeon_ring *cp)
 
int radeon_ring_test (struct radeon_device *rdev, struct radeon_ring *cp)
 
void radeon_ring_force_activity (struct radeon_device *rdev, struct radeon_ring *ring)
 
void radeon_ring_lockup_update (struct radeon_ring *ring)
 
bool radeon_ring_test_lockup (struct radeon_device *rdev, struct radeon_ring *ring)
 
unsigned radeon_ring_backup (struct radeon_device *rdev, struct radeon_ring *ring, uint32_t **data)
 
int radeon_ring_restore (struct radeon_device *rdev, struct radeon_ring *ring, unsigned size, uint32_t *data)
 
int radeon_ring_init (struct radeon_device *rdev, struct radeon_ring *cp, unsigned ring_size, unsigned rptr_offs, unsigned rptr_reg, unsigned wptr_reg, u32 ptr_reg_shift, u32 ptr_reg_mask, u32 nop)
 
void radeon_ring_fini (struct radeon_device *rdev, struct radeon_ring *cp)
 
int radeon_cs_finish_pages (struct radeon_cs_parser *p)
 
u32 radeon_get_ib_value (struct radeon_cs_parser *p, int idx)
 
int radeon_agp_init (struct radeon_device *rdev)
 
void radeon_agp_resume (struct radeon_device *rdev)
 
void radeon_agp_suspend (struct radeon_device *rdev)
 
void radeon_agp_fini (struct radeon_device *rdev)
 
int radeon_pm_get_type_index (struct radeon_device *rdev, enum radeon_pm_state_type ps_type, int instance)
 
void radeon_benchmark (struct radeon_device *rdev, int test_number)
 
void radeon_test_moves (struct radeon_device *rdev)
 
void radeon_test_ring_sync (struct radeon_device *rdev, struct radeon_ring *cpA, struct radeon_ring *cpB)
 
void radeon_test_syncing (struct radeon_device *rdev)
 
int radeon_debugfs_add_files (struct radeon_device *rdev, struct drm_info_list *files, unsigned nfiles)
 
int radeon_debugfs_fence_init (struct radeon_device *rdev)
 
void radeon_agp_disable (struct radeon_device *rdev)
 
int radeon_asic_init (struct radeon_device *rdev)
 
int radeon_gem_info_ioctl (struct drm_device *dev, void *data, struct drm_file *filp)
 
int radeon_gem_create_ioctl (struct drm_device *dev, void *data, struct drm_file *filp)
 
int radeon_gem_pin_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int radeon_gem_unpin_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int radeon_gem_pwrite_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int radeon_gem_pread_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int radeon_gem_set_domain_ioctl (struct drm_device *dev, void *data, struct drm_file *filp)
 
int radeon_gem_mmap_ioctl (struct drm_device *dev, void *data, struct drm_file *filp)
 
int radeon_gem_busy_ioctl (struct drm_device *dev, void *data, struct drm_file *filp)
 
int radeon_gem_wait_idle_ioctl (struct drm_device *dev, void *data, struct drm_file *filp)
 
int radeon_gem_va_ioctl (struct drm_device *dev, void *data, struct drm_file *filp)
 
int radeon_cs_ioctl (struct drm_device *dev, void *data, struct drm_file *filp)
 
int radeon_gem_set_tiling_ioctl (struct drm_device *dev, void *data, struct drm_file *filp)
 
int radeon_gem_get_tiling_ioctl (struct drm_device *dev, void *data, struct drm_file *filp)
 
int radeon_device_init (struct radeon_device *rdev, struct drm_device *ddev, struct pci_dev *pdev, uint32_t flags)
 
void radeon_device_fini (struct radeon_device *rdev)
 
int radeon_gpu_wait_for_idle (struct radeon_device *rdev)
 
uint32_t r100_mm_rreg (struct radeon_device *rdev, uint32_t reg)
 
void r100_mm_wreg (struct radeon_device *rdev, uint32_t reg, uint32_t v)
 
u32 r100_io_rreg (struct radeon_device *rdev, u32 reg)
 
void r100_io_wreg (struct radeon_device *rdev, u32 reg, u32 v)
 
void r100_pll_errata_after_index (struct radeon_device *rdev)
 
int radeon_combios_init (struct radeon_device *rdev)
 
void radeon_combios_fini (struct radeon_device *rdev)
 
int radeon_atombios_init (struct radeon_device *rdev)
 
void radeon_atombios_fini (struct radeon_device *rdev)
 
int radeon_gpu_reset (struct radeon_device *rdev)
 
int radeon_modeset_init (struct radeon_device *rdev)
 
void radeon_modeset_fini (struct radeon_device *rdev)
 
bool radeon_card_posted (struct radeon_device *rdev)
 
void radeon_update_bandwidth_info (struct radeon_device *rdev)
 
void radeon_update_display_priority (struct radeon_device *rdev)
 
bool radeon_boot_test_post_card (struct radeon_device *rdev)
 
void radeon_scratch_init (struct radeon_device *rdev)
 
void radeon_wb_fini (struct radeon_device *rdev)
 
int radeon_wb_init (struct radeon_device *rdev)
 
void radeon_wb_disable (struct radeon_device *rdev)
 
void radeon_surface_init (struct radeon_device *rdev)
 
int radeon_cs_parser_init (struct radeon_cs_parser *p, void *data)
 
void radeon_legacy_set_clock_gating (struct radeon_device *rdev, int enable)
 
void radeon_atom_set_clock_gating (struct radeon_device *rdev, int enable)
 
void radeon_ttm_placement_from_domain (struct radeon_bo *rbo, u32 domain)
 
bool radeon_ttm_bo_is_radeon_bo (struct ttm_buffer_object *bo)
 
void radeon_vram_location (struct radeon_device *rdev, struct radeon_mc *mc, u64 base)
 
void radeon_gtt_location (struct radeon_device *rdev, struct radeon_mc *mc)
 
int radeon_resume_kms (struct drm_device *dev)
 
int radeon_suspend_kms (struct drm_device *dev, pm_message_t state)
 
void radeon_ttm_set_active_vram_size (struct radeon_device *rdev, u64 size)
 
int radeon_vm_manager_init (struct radeon_device *rdev)
 
void radeon_vm_manager_fini (struct radeon_device *rdev)
 
void radeon_vm_init (struct radeon_device *rdev, struct radeon_vm *vm)
 
void radeon_vm_fini (struct radeon_device *rdev, struct radeon_vm *vm)
 
int radeon_vm_alloc_pt (struct radeon_device *rdev, struct radeon_vm *vm)
 
void radeon_vm_add_to_lru (struct radeon_device *rdev, struct radeon_vm *vm)
 
struct radeon_fenceradeon_vm_grab_id (struct radeon_device *rdev, struct radeon_vm *vm, int ring)
 
void radeon_vm_fence (struct radeon_device *rdev, struct radeon_vm *vm, struct radeon_fence *fence)
 
uint64_t radeon_vm_map_gart (struct radeon_device *rdev, uint64_t addr)
 
int radeon_vm_bo_update_pte (struct radeon_device *rdev, struct radeon_vm *vm, struct radeon_bo *bo, struct ttm_mem_reg *mem)
 
void radeon_vm_bo_invalidate (struct radeon_device *rdev, struct radeon_bo *bo)
 
struct radeon_bo_varadeon_vm_bo_find (struct radeon_vm *vm, struct radeon_bo *bo)
 
struct radeon_bo_varadeon_vm_bo_add (struct radeon_device *rdev, struct radeon_vm *vm, struct radeon_bo *bo)
 
int radeon_vm_bo_set_addr (struct radeon_device *rdev, struct radeon_bo_va *bo_va, uint64_t offset, uint32_t flags)
 
int radeon_vm_bo_rmv (struct radeon_device *rdev, struct radeon_bo_va *bo_va)
 
void r600_audio_update_hdmi (struct work_struct *work)
 
int r600_vram_scratch_init (struct radeon_device *rdev)
 
void r600_vram_scratch_fini (struct radeon_device *rdev)
 
unsigned r600_mip_minify (unsigned size, unsigned level)
 
bool r600_fmt_is_valid_color (u32 format)
 
bool r600_fmt_is_valid_texture (u32 format, enum radeon_family family)
 
int r600_fmt_get_blocksize (u32 format)
 
int r600_fmt_get_nblocksx (u32 format, u32 w)
 
int r600_fmt_get_nblocksy (u32 format, u32 h)
 
struct radeon_hdmi_acr r600_hdmi_acr (uint32_t clock)
 
void r600_hdmi_enable (struct drm_encoder *encoder)
 
void r600_hdmi_disable (struct drm_encoder *encoder)
 
void r600_hdmi_setmode (struct drm_encoder *encoder, struct drm_display_mode *mode)
 
u32 r6xx_remap_render_backend (struct radeon_device *rdev, u32 tiling_pipe_num, u32 max_rb_num, u32 total_max_rb_num, u32 enabled_rb_mask)
 
void evergreen_hdmi_setmode (struct drm_encoder *encoder, struct drm_display_mode *mode)
 
int ni_init_microcode (struct radeon_device *rdev)
 
int ni_mc_load_microcode (struct radeon_device *rdev)
 

Variables

int radeon_no_wb
 
int radeon_modeset
 
int radeon_dynclks
 
int radeon_r4xx_atom
 
int radeon_agpmode
 
int radeon_vram_limit
 
int radeon_gart_size
 
int radeon_benchmarking
 
int radeon_testing
 
int radeon_connector_table
 
int radeon_tv
 
int radeon_audio
 
int radeon_disp_priority
 
int radeon_hw_i2c
 
int radeon_pcie_gen2
 
int radeon_msi
 
int radeon_lockup_timeout
 

Macro Definition Documentation

#define ASIC_IS_AVIVO (   rdev)    ((rdev->family >= CHIP_RS600))

Definition at line 1715 of file radeon.h.

#define ASIC_IS_DCE2 (   rdev)
Value:
((rdev->family == CHIP_RS600) || \
(rdev->family == CHIP_RS690) || \
(rdev->family == CHIP_RS740) || \
(rdev->family >= CHIP_R600))

Definition at line 1716 of file radeon.h.

#define ASIC_IS_DCE3 (   rdev)    ((rdev->family >= CHIP_RV620))

Definition at line 1720 of file radeon.h.

#define ASIC_IS_DCE32 (   rdev)    ((rdev->family >= CHIP_RV730))

Definition at line 1721 of file radeon.h.

#define ASIC_IS_DCE4 (   rdev)    ((rdev->family >= CHIP_CEDAR))

Definition at line 1722 of file radeon.h.

#define ASIC_IS_DCE41 (   rdev)
Value:
((rdev->family >= CHIP_PALM) && \
(rdev->flags & RADEON_IS_IGP))

Definition at line 1723 of file radeon.h.

#define ASIC_IS_DCE5 (   rdev)    ((rdev->family >= CHIP_BARTS))

Definition at line 1725 of file radeon.h.

#define ASIC_IS_DCE6 (   rdev)    ((rdev->family >= CHIP_ARUBA))

Definition at line 1726 of file radeon.h.

#define ASIC_IS_DCE61 (   rdev)
Value:
((rdev->family >= CHIP_ARUBA) && \
(rdev->flags & RADEON_IS_IGP))

Definition at line 1727 of file radeon.h.

#define ASIC_IS_R300 (   rdev)
Value:
((rdev->family == CHIP_R300) || \
(rdev->family == CHIP_RV350) || \
(rdev->family == CHIP_R350) || \
(rdev->family == CHIP_RV380) || \
(rdev->family == CHIP_R420) || \
(rdev->family == CHIP_R423) || \
(rdev->family == CHIP_RV410) || \
(rdev->family == CHIP_RS400) || \
(rdev->family == CHIP_RS480))

Definition at line 1698 of file radeon.h.

#define ASIC_IS_RN50 (   rdev)
Value:
((rdev->pdev->device == 0x515e) || \
(rdev->pdev->device == 0x5969))

Definition at line 1689 of file radeon.h.

#define ASIC_IS_RV100 (   rdev)
Value:
((rdev->family == CHIP_RV100) || \
(rdev->family == CHIP_RV200) || \
(rdev->family == CHIP_RS100) || \
(rdev->family == CHIP_RS200) || \
(rdev->family == CHIP_RV250) || \
(rdev->family == CHIP_RV280) || \
(rdev->family == CHIP_RS300))

Definition at line 1691 of file radeon.h.

#define ASIC_IS_X2 (   rdev)
Value:
((rdev->ddev->pdev->device == 0x9441) || \
(rdev->ddev->pdev->device == 0x9443) || \
(rdev->ddev->pdev->device == 0x944B) || \
(rdev->ddev->pdev->device == 0x9506) || \
(rdev->ddev->pdev->device == 0x9509) || \
(rdev->ddev->pdev->device == 0x950F) || \
(rdev->ddev->pdev->device == 0x689C) || \
(rdev->ddev->pdev->device == 0x689D))

Definition at line 1707 of file radeon.h.

#define CAYMAN_RING_TYPE_CP1_INDEX   1

Definition at line 122 of file radeon.h.

#define CAYMAN_RING_TYPE_CP2_INDEX   2

Definition at line 123 of file radeon.h.

#define DREG32 (   reg)    printk(KERN_INFO "REGISTER: " #reg " : 0x%08X\n", r100_mm_rreg(rdev, (reg)))

Definition at line 1635 of file radeon.h.

#define DREG32_SYS (   sqf,
  rdev,
  reg 
)    seq_printf((sqf), #reg " : 0x%08X\n", r100_mm_rreg((rdev), (reg)))

Definition at line 1661 of file radeon.h.

#define gem_to_radeon_bo (   gobj)    container_of((gobj), struct radeon_bo, gem_base)

Definition at line 335 of file radeon.h.

#define PM_PROFILE_DEFAULT_IDX   0

Definition at line 952 of file radeon.h.

#define PM_PROFILE_HIGH_MH_IDX   6

Definition at line 958 of file radeon.h.

#define PM_PROFILE_HIGH_SH_IDX   3

Definition at line 955 of file radeon.h.

#define PM_PROFILE_LOW_MH_IDX   4

Definition at line 956 of file radeon.h.

#define PM_PROFILE_LOW_SH_IDX   1

Definition at line 953 of file radeon.h.

#define PM_PROFILE_MAX   7

Definition at line 959 of file radeon.h.

#define PM_PROFILE_MID_MH_IDX   5

Definition at line 957 of file radeon.h.

#define PM_PROFILE_MID_SH_IDX   2

Definition at line 954 of file radeon.h.

#define R600_WB_EVENT_OFFSET   3072

Definition at line 887 of file radeon.h.

#define R600_WB_IH_WPTR_OFFSET   2048

Definition at line 886 of file radeon.h.

#define radeon_asic_reset (   rdev)    (rdev)->asic->asic_reset((rdev))

Definition at line 1768 of file radeon.h.

#define radeon_asic_vm_fini (   rdev)    (rdev)->asic->vm.fini((rdev))

Definition at line 1772 of file radeon.h.

#define radeon_asic_vm_init (   rdev)    (rdev)->asic->vm.init((rdev))

Definition at line 1771 of file radeon.h.

#define radeon_asic_vm_set_page (   rdev,
  pe,
  addr,
  count,
  incr,
  flags 
)    ((rdev)->asic->vm.set_page((rdev), (pe), (addr), (count), (incr), (flags)))

Definition at line 1773 of file radeon.h.

#define radeon_bandwidth_update (   rdev)    (rdev)->asic->display.bandwidth_update((rdev))

Definition at line 1803 of file radeon.h.

#define RADEON_BIOS_NUM_SCRATCH   8

Definition at line 109 of file radeon.h.

#define radeon_clear_surface_reg (   rdev,
  r 
)    ((rdev)->asic->surface.clear_reg((rdev), (r)))

Definition at line 1802 of file radeon.h.

#define radeon_copy (   rdev,
  s,
  d,
  np,
  f 
)    (rdev)->asic->copy.copy((rdev), (s), (d), (np), (f))

Definition at line 1790 of file radeon.h.

#define radeon_copy_blit (   rdev,
  s,
  d,
  np,
  f 
)    (rdev)->asic->copy.blit((rdev), (s), (d), (np), (f))

Definition at line 1788 of file radeon.h.

#define radeon_copy_blit_ring_index (   rdev)    (rdev)->asic->copy.blit_ring_index

Definition at line 1791 of file radeon.h.

#define radeon_copy_dma (   rdev,
  s,
  d,
  np,
  f 
)    (rdev)->asic->copy.dma((rdev), (s), (d), (np), (f))

Definition at line 1789 of file radeon.h.

#define radeon_copy_dma_ring_index (   rdev)    (rdev)->asic->copy.dma_ring_index

Definition at line 1792 of file radeon.h.

#define radeon_copy_ring_index (   rdev)    (rdev)->asic->copy.copy_ring_index

Definition at line 1793 of file radeon.h.

#define radeon_cs_parse (   rdev,
  r,
  p 
)    (rdev)->asic->ring[(r)].cs_parse((p))

Definition at line 1766 of file radeon.h.

#define RADEON_DEBUGFS_MAX_COMPONENTS   32

Definition at line 107 of file radeon.h.

#define RADEON_FENCE_JIFFIES_TIMEOUT   (HZ / 2)

Definition at line 104 of file radeon.h.

#define radeon_fence_ring_emit (   rdev,
  r,
  fence 
)    (rdev)->asic->ring[(r)].emit_fence((rdev), (fence))

Definition at line 1786 of file radeon.h.

#define RADEON_FENCE_SIGNALED_SEQ   0LL

Definition at line 115 of file radeon.h.

#define radeon_fini (   rdev)    (rdev)->asic->fini((rdev))

Definition at line 1763 of file radeon.h.

#define radeon_gart_set_page (   rdev,
  i,
  p 
)    (rdev)->asic->gart.set_page((rdev), (i), (p))

Definition at line 1770 of file radeon.h.

#define radeon_gart_tlb_flush (   rdev)    (rdev)->asic->gart.tlb_flush((rdev))

Definition at line 1769 of file radeon.h.

#define RADEON_GEM_MAX_SURFACES   8

Definition at line 280 of file radeon.h.

#define radeon_get_backlight_level (   rdev,
  e 
)    (rdev)->asic->display.get_backlight_level((e))

Definition at line 1785 of file radeon.h.

#define radeon_get_engine_clock (   rdev)    (rdev)->asic->pm.get_engine_clock((rdev))

Definition at line 1794 of file radeon.h.

#define radeon_get_memory_clock (   rdev)    (rdev)->asic->pm.get_memory_clock((rdev))

Definition at line 1796 of file radeon.h.

#define radeon_get_pcie_lanes (   rdev)    (rdev)->asic->pm.get_pcie_lanes((rdev))

Definition at line 1798 of file radeon.h.

#define radeon_get_vblank_counter (   rdev,
  crtc 
)    (rdev)->asic->display.get_vblank_counter((rdev), (crtc))

Definition at line 1783 of file radeon.h.

#define RADEON_GPU_PAGE_ALIGN (   a)    (((a) + RADEON_GPU_PAGE_MASK) & ~RADEON_GPU_PAGE_MASK)

Definition at line 449 of file radeon.h.

#define RADEON_GPU_PAGE_MASK   (RADEON_GPU_PAGE_SIZE - 1)

Definition at line 447 of file radeon.h.

#define RADEON_GPU_PAGE_SHIFT   12

Definition at line 448 of file radeon.h.

#define RADEON_GPU_PAGE_SIZE   4096

Definition at line 446 of file radeon.h.

#define radeon_gui_idle (   rdev)    (rdev)->asic->gui_idle((rdev))

Definition at line 1808 of file radeon.h.

#define radeon_hpd_fini (   rdev)    (rdev)->asic->hpd.fini((rdev))

Definition at line 1805 of file radeon.h.

#define radeon_hpd_init (   rdev)    (rdev)->asic->hpd.init((rdev))

Definition at line 1804 of file radeon.h.

#define radeon_hpd_sense (   rdev,
  h 
)    (rdev)->asic->hpd.sense((rdev), (h))

Definition at line 1806 of file radeon.h.

#define radeon_hpd_set_polarity (   rdev,
  h 
)    (rdev)->asic->hpd.set_polarity((rdev), (h))

Definition at line 1807 of file radeon.h.

#define RADEON_IB_POOL_SIZE   16

Definition at line 106 of file radeon.h.

#define radeon_ib_test (   rdev,
  r,
  cp 
)    (rdev)->asic->ring[(r)].ib_test((rdev), (cp))

Definition at line 1776 of file radeon.h.

#define RADEON_IB_VM_MAX_SIZE   (64 << 10)

Definition at line 128 of file radeon.h.

#define radeon_init (   rdev)    (rdev)->asic->init((rdev))

Definition at line 1762 of file radeon.h.

#define radeon_irq_process (   rdev)    (rdev)->asic->irq.process((rdev))

Definition at line 1782 of file radeon.h.

#define radeon_irq_set (   rdev)    (rdev)->asic->irq.set((rdev))

Definition at line 1781 of file radeon.h.

#define RADEON_MAX_AFMT_BLOCKS   6

Definition at line 578 of file radeon.h.

#define RADEON_MAX_CRTCS   6

Definition at line 577 of file radeon.h.

#define RADEON_MAX_HPD_PINS   6

Definition at line 576 of file radeon.h.

#define RADEON_MAX_USEC_TIMEOUT   100000 /* 100 ms */

Definition at line 103 of file radeon.h.

#define radeon_mc_wait_for_idle (   rdev)    (rdev)->asic->mc_wait_for_idle((rdev))

Definition at line 1818 of file radeon.h.

#define RADEON_MODE_OVERCLOCK_MARGIN   500 /* 5 MHz */

Definition at line 1027 of file radeon.h.

#define RADEON_NUM_RINGS   3

Definition at line 112 of file radeon.h.

#define RADEON_NUM_VM   16

Definition at line 652 of file radeon.h.

#define radeon_page_flip (   rdev,
  crtc,
  base 
)    (rdev)->asic->pflip.page_flip((rdev), (crtc), (base))

Definition at line 1815 of file radeon.h.

#define radeon_pm_finish (   rdev)    (rdev)->asic->pm.finish((rdev))

Definition at line 1811 of file radeon.h.

#define radeon_pm_get_dynpm_state (   rdev)    (rdev)->asic->pm.get_dynpm_state((rdev))

Definition at line 1813 of file radeon.h.

#define radeon_pm_init_profile (   rdev)    (rdev)->asic->pm.init_profile((rdev))

Definition at line 1812 of file radeon.h.

#define radeon_pm_misc (   rdev)    (rdev)->asic->pm.misc((rdev))

Definition at line 1809 of file radeon.h.

#define RADEON_PM_MODE_NO_DISPLAY   (1 << 0)

Definition at line 995 of file radeon.h.

#define radeon_pm_prepare (   rdev)    (rdev)->asic->pm.prepare((rdev))

Definition at line 1810 of file radeon.h.

#define RADEON_PM_STATE_SINGLE_DISPLAY_ONLY   (1 << 0)

Definition at line 1009 of file radeon.h.

#define radeon_post_page_flip (   rdev,
  crtc 
)    (rdev)->asic->pflip.post_page_flip((rdev), (crtc))

Definition at line 1816 of file radeon.h.

#define radeon_pre_page_flip (   rdev,
  crtc 
)    (rdev)->asic->pflip.pre_page_flip((rdev), (crtc))

Definition at line 1814 of file radeon.h.

#define radeon_resume (   rdev)    (rdev)->asic->resume((rdev))

Definition at line 1764 of file radeon.h.

#define radeon_ring_ib_execute (   rdev,
  r,
  ib 
)    (rdev)->asic->ring[(r)].ib_execute((rdev), (ib))

Definition at line 1777 of file radeon.h.

#define radeon_ring_ib_parse (   rdev,
  r,
  ib 
)    (rdev)->asic->ring[(r)].ib_parse((rdev), (ib))

Definition at line 1778 of file radeon.h.

#define radeon_ring_is_lockup (   rdev,
  r,
  cp 
)    (rdev)->asic->ring[(r)].is_lockup((rdev), (cp))

Definition at line 1779 of file radeon.h.

#define radeon_ring_start (   rdev,
  r,
  cp 
)    (rdev)->asic->ring[(r)].ring_start((rdev), (cp))

Definition at line 1774 of file radeon.h.

#define radeon_ring_test (   rdev,
  r,
  cp 
)    (rdev)->asic->ring[(r)].ring_test((rdev), (cp))

Definition at line 1775 of file radeon.h.

#define RADEON_RING_TYPE_GFX_INDEX   0

Definition at line 119 of file radeon.h.

#define radeon_ring_vm_flush (   rdev,
  r,
  vm 
)    (rdev)->asic->ring[(r)].vm_flush((rdev), (r), (vm))

Definition at line 1780 of file radeon.h.

#define radeon_semaphore_ring_emit (   rdev,
  r,
  cp,
  semaphore,
  emit_wait 
)    (rdev)->asic->ring[(r)].emit_semaphore((rdev), (cp), (semaphore), (emit_wait))

Definition at line 1787 of file radeon.h.

#define radeon_set_backlight_level (   rdev,
  e,
  l 
)    (rdev)->asic->display.set_backlight_level((e), (l))

Definition at line 1784 of file radeon.h.

#define radeon_set_clock_gating (   rdev,
  e 
)    (rdev)->asic->pm.set_clock_gating((rdev), (e))

Definition at line 1800 of file radeon.h.

#define radeon_set_engine_clock (   rdev,
  e 
)    (rdev)->asic->pm.set_engine_clock((rdev), (e))

Definition at line 1795 of file radeon.h.

#define radeon_set_memory_clock (   rdev,
  e 
)    (rdev)->asic->pm.set_memory_clock((rdev), (e))

Definition at line 1797 of file radeon.h.

#define radeon_set_pcie_lanes (   rdev,
  l 
)    (rdev)->asic->pm.set_pcie_lanes((rdev), (l))

Definition at line 1799 of file radeon.h.

#define radeon_set_surface_reg (   rdev,
  r,
  f,
  p,
  o,
  s 
)    ((rdev)->asic->surface.set_reg((rdev), (r), (f), (p), (o), (s)))

Definition at line 1801 of file radeon.h.

#define radeon_suspend (   rdev)    (rdev)->asic->suspend((rdev))

Definition at line 1765 of file radeon.h.

#define RADEON_VA_IB_OFFSET   (1 << 20)

Definition at line 126 of file radeon.h.

#define RADEON_VA_RESERVED_SIZE   (8 << 20)

Definition at line 127 of file radeon.h.

#define radeon_vga_set_state (   rdev,
  state 
)    (rdev)->asic->vga_set_state((rdev), (state))

Definition at line 1767 of file radeon.h.

#define RADEON_VM_BLOCK_SIZE   9

Definition at line 657 of file radeon.h.

#define RADEON_VM_PTE_COUNT   (1 << RADEON_VM_BLOCK_SIZE)

Definition at line 660 of file radeon.h.

#define radeon_wait_for_vblank (   rdev,
  crtc 
)    (rdev)->asic->display.wait_for_vblank((rdev), (crtc))

Definition at line 1817 of file radeon.h.

#define RADEON_WB_CP1_RPTR_OFFSET   1280

Definition at line 884 of file radeon.h.

#define RADEON_WB_CP2_RPTR_OFFSET   1536

Definition at line 885 of file radeon.h.

#define RADEON_WB_CP_RPTR_OFFSET   1024

Definition at line 883 of file radeon.h.

#define RADEON_WB_RING0_NEXT_RPTR   256

Definition at line 882 of file radeon.h.

#define RADEON_WB_SCRATCH_OFFSET   0

Definition at line 881 of file radeon.h.

#define RADEONFB_CONN_LIMIT   4

Definition at line 108 of file radeon.h.

#define RBIOS16 (   i)    (RBIOS8(i) | (RBIOS8((i)+1) << 8))

Definition at line 1734 of file radeon.h.

#define RBIOS32 (   i)    ((RBIOS16(i)) | (RBIOS16((i)+2) << 16))

Definition at line 1735 of file radeon.h.

#define RBIOS8 (   i)    (rdev->bios[i])

Definition at line 1733 of file radeon.h.

#define REG_GET (   FIELD,
  v 
)    (((v) << FIELD##_SHIFT) & FIELD##_MASK)

Definition at line 1638 of file radeon.h.

#define REG_SET (   FIELD,
  v 
)    (((v) << FIELD##_SHIFT) & FIELD##_MASK)

Definition at line 1637 of file radeon.h.

#define RREG16 (   reg)    readw((rdev->rmmio) + (reg))

Definition at line 1632 of file radeon.h.

#define RREG32 (   reg)    r100_mm_rreg(rdev, (reg))

Definition at line 1634 of file radeon.h.

#define RREG32_IO (   reg)    r100_io_rreg(rdev, (reg))

Definition at line 1662 of file radeon.h.

#define RREG32_MC (   reg)    rdev->mc_rreg(rdev, (reg))

Definition at line 1641 of file radeon.h.

#define RREG32_PCIE (   reg)    rv370_pcie_rreg(rdev, (reg))

Definition at line 1643 of file radeon.h.

#define RREG32_PCIE_P (   reg)    rdev->pciep_rreg(rdev, (reg))

Definition at line 1645 of file radeon.h.

#define RREG32_PLL (   reg)    rdev->pll_rreg(rdev, (reg))

Definition at line 1639 of file radeon.h.

#define RREG8 (   reg)    readb((rdev->rmmio) + (reg))

Definition at line 1630 of file radeon.h.

#define to_radeon_fence (   p)    ((struct radeon_fence *)(p))

Definition at line 1625 of file radeon.h.

#define WREG16 (   reg,
  v 
)    writew(v, (rdev->rmmio) + (reg))

Definition at line 1633 of file radeon.h.

#define WREG32 (   reg,
  v 
)    r100_mm_wreg(rdev, (reg), (v))

Definition at line 1636 of file radeon.h.

#define WREG32_IO (   reg,
  v 
)    r100_io_wreg(rdev, (reg), (v))

Definition at line 1663 of file radeon.h.

#define WREG32_MC (   reg,
  v 
)    rdev->mc_wreg(rdev, (reg), (v))

Definition at line 1642 of file radeon.h.

#define WREG32_P (   reg,
  val,
  mask 
)
Value:
do { \
uint32_t tmp_ = RREG32(reg); \
tmp_ &= (mask); \
tmp_ |= ((val) & ~(mask)); \
WREG32(reg, tmp_); \
} while (0)

Definition at line 1647 of file radeon.h.

#define WREG32_PCIE (   reg,
  v 
)    rv370_pcie_wreg(rdev, (reg), (v))

Definition at line 1644 of file radeon.h.

#define WREG32_PCIE_P (   reg,
  v 
)    rdev->pciep_wreg(rdev, (reg), (v))

Definition at line 1646 of file radeon.h.

#define WREG32_PLL (   reg,
  v 
)    rdev->pll_wreg(rdev, (reg), (v))

Definition at line 1640 of file radeon.h.

#define WREG32_PLL_P (   reg,
  val,
  mask 
)
Value:
do { \
tmp_ &= (mask); \
tmp_ |= ((val) & ~(mask)); \
WREG32_PLL(reg, tmp_); \
} while (0)

Definition at line 1654 of file radeon.h.

#define WREG8 (   reg,
  v 
)    writeb(v, (rdev->rmmio) + (reg))

Definition at line 1631 of file radeon.h.

Typedef Documentation

typedef int(* radeon_packet0_check_t)(struct radeon_cs_parser *p, struct radeon_cs_packet *pkt, unsigned idx, unsigned reg)

Definition at line 854 of file radeon.h.

typedef int(* radeon_packet3_check_t)(struct radeon_cs_parser *p, struct radeon_cs_packet *pkt)

Definition at line 857 of file radeon.h.

typedef uint32_t(* radeon_rreg_t)(struct radeon_device *, uint32_t)

Definition at line 1517 of file radeon.h.

typedef void(* radeon_wreg_t)(struct radeon_device *, uint32_t, uint32_t)

Definition at line 1518 of file radeon.h.

Enumeration Type Documentation

Enumerator:
DYNPM_ACTION_NONE 
DYNPM_ACTION_MINIMUM 
DYNPM_ACTION_DOWNCLOCK 
DYNPM_ACTION_UPCLOCK 
DYNPM_ACTION_DEFAULT 

Definition at line 921 of file radeon.h.

Enumerator:
DYNPM_STATE_DISABLED 
DYNPM_STATE_MINIMUM 
DYNPM_STATE_PAUSED 
DYNPM_STATE_ACTIVE 
DYNPM_STATE_SUSPENDED 

Definition at line 914 of file radeon.h.

Enumerator:
THERMAL_TYPE_NONE 
THERMAL_TYPE_RV6XX 
THERMAL_TYPE_RV770 
THERMAL_TYPE_EVERGREEN 
THERMAL_TYPE_SUMO 
THERMAL_TYPE_NI 
THERMAL_TYPE_SI 

Definition at line 968 of file radeon.h.

Enumerator:
CHIP_ERRATA_R300_CG 
CHIP_ERRATA_PLL_DUMMYREADS 
CHIP_ERRATA_PLL_DELAY 

Definition at line 133 of file radeon.h.

struct radeon_pm - power management datas : maximum bandwidth the gpu has (MByte/s) : sideport memory clock Mhz (rs690,rs740,rs780,rs880) : system clock Mhz (rs690,rs740,rs780,rs880) : ht link clock Mhz (rs690,rs740,rs780,rs880) : ht link width in bits (rs690,rs740,rs780,rs880) : k8 bandwidth the gpu has (MByte/s) (IGP) : sideport bandwidth the gpu has (MByte/s) (IGP) : ht bandwidth the gpu has (MByte/s) (IGP) : core GPU bandwidth the gpu has (MByte/s) (IGP) : GPU clock Mhz (core bandwidth depends of this clock) : current bandwidth needs

It keeps track of various data needed to take powermanagement decision. Bandwidth need is used to determine minimun clock of the GPU and memory. Equation between gpu/memory clock and available bandwidth is hw dependent (type of memory, bus size, efficiency, ...)

Enumerator:
PM_METHOD_PROFILE 
PM_METHOD_DYNPM 

Definition at line 909 of file radeon.h.

Enumerator:
PM_PROFILE_DEFAULT 
PM_PROFILE_AUTO 
PM_PROFILE_LOW 
PM_PROFILE_MID 
PM_PROFILE_HIGH 

Definition at line 944 of file radeon.h.

Enumerator:
POWER_STATE_TYPE_DEFAULT 
POWER_STATE_TYPE_POWERSAVE 
POWER_STATE_TYPE_BATTERY 
POWER_STATE_TYPE_BALANCED 
POWER_STATE_TYPE_PERFORMANCE 

Definition at line 936 of file radeon.h.

Enumerator:
VOLTAGE_NONE 
VOLTAGE_GPIO 
VOLTAGE_VDDC 
VOLTAGE_SW 

Definition at line 929 of file radeon.h.

Function Documentation

int evergreen_get_temp ( struct radeon_device rdev)

Definition at line 218 of file evergreen.c.

void evergreen_hdmi_setmode ( struct drm_encoder encoder,
struct drm_display_mode mode 
)

Definition at line 151 of file evergreen_hdmi.c.

void evergreen_tiling_fields ( unsigned  tiling_flags,
unsigned *  bankw,
unsigned *  bankh,
unsigned *  mtaspect,
unsigned *  tile_split 
)

Definition at line 56 of file evergreen.c.

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.

u32 r100_io_rreg ( struct radeon_device rdev,
u32  reg 
)

Definition at line 4158 of file r100.c.

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

Definition at line 4168 of file r100.c.

uint32_t r100_mm_rreg ( struct radeon_device rdev,
uint32_t  reg 
)

Definition at line 4138 of file r100.c.

void r100_mm_wreg ( struct radeon_device rdev,
uint32_t  reg,
uint32_t  v 
)

Definition at line 4148 of file r100.c.

void r100_pll_errata_after_index ( struct radeon_device rdev)

Definition at line 2911 of file r100.c.

void r600_audio_update_hdmi ( struct work_struct work)

Definition at line 121 of file r600_audio.c.

int r600_fmt_get_blocksize ( u32  format)

Definition at line 207 of file r600_cs.c.

int r600_fmt_get_nblocksx ( u32  format,
u32  w 
)

Definition at line 215 of file r600_cs.c.

int r600_fmt_get_nblocksy ( u32  format,
u32  h 
)

Definition at line 229 of file r600_cs.c.

bool r600_fmt_is_valid_color ( u32  format)

Definition at line 182 of file r600_cs.c.

bool r600_fmt_is_valid_texture ( u32  format,
enum radeon_family  family 
)

Definition at line 193 of file r600_cs.c.

struct radeon_hdmi_acr r600_hdmi_acr ( uint32_t  clock)
read

Definition at line 83 of file r600_hdmi.c.

void r600_hdmi_disable ( struct drm_encoder encoder)

Definition at line 534 of file r600_hdmi.c.

void r600_hdmi_enable ( struct drm_encoder encoder)

Definition at line 474 of file r600_hdmi.c.

void r600_hdmi_setmode ( struct drm_encoder encoder,
struct drm_display_mode mode 
)

Definition at line 317 of file r600_hdmi.c.

unsigned r600_mip_minify ( unsigned  size,
unsigned  level 
)

Definition at line 1577 of file r600_cs.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  enabled_rb_mask 
)

Definition at line 1378 of file r600.c.

void radeon_agp_disable ( struct radeon_device rdev)

radeon_agp_disable - AGP disable helper function

: radeon device pointer

Removes AGP flags and changes the gart callbacks on AGP cards when using the internal gart rather than AGP (all asics).

Definition at line 141 of file radeon_asic.c.

void radeon_agp_fini ( struct radeon_device rdev)

Definition at line 273 of file radeon_agp.c.

int radeon_agp_init ( struct radeon_device rdev)

Definition at line 127 of file radeon_agp.c.

void radeon_agp_resume ( struct radeon_device rdev)

Definition at line 261 of file radeon_agp.c.

void radeon_agp_suspend ( struct radeon_device rdev)

Definition at line 282 of file radeon_agp.c.

int radeon_asic_init ( struct radeon_device rdev)

radeon_asic_init - register asic specific callbacks

: radeon device pointer

Registers the appropriate asic specific callbacks for each chip family. Also sets other asics specific info like the number of crtcs and the register aperture accessors (all asics). Returns 0 for success.

Definition at line 1702 of file radeon_asic.c.

void radeon_atom_set_clock_gating ( struct radeon_device rdev,
int  enable 
)

Definition at line 2657 of file radeon_atombios.c.

void radeon_atom_set_voltage ( struct radeon_device rdev,
u16  voltage_level,
u8  voltage_type 
)

Definition at line 2717 of file radeon_atombios.c.

void radeon_atombios_fini ( struct radeon_device rdev)

radeon_atombios_fini - free the driver info and callbacks for atombios

: radeon_device pointer

Frees the driver info and register access callbacks for the ATOM interpreter (r4xx+). Called at driver shutdown.

Definition at line 775 of file radeon_device.c.

void radeon_atombios_get_power_modes ( struct radeon_device rdev)

Definition at line 2595 of file radeon_atombios.c.

int radeon_atombios_init ( struct radeon_device rdev)

radeon_atombios_init - init the driver info and callbacks for atombios

: radeon_device pointer

Initializes the driver info and register access callbacks for the ATOM interpreter (r4xx+). Returns 0 on sucess, -ENOMEM on failure. Called at driver startup.

Definition at line 733 of file radeon_device.c.

bool radeon_atombios_sideport_present ( struct radeon_device rdev)

Definition at line 1274 of file radeon_atombios.c.

void radeon_benchmark ( struct radeon_device rdev,
int  test_number 
)

Definition at line 169 of file radeon_benchmark.c.

bool radeon_boot_test_post_card ( struct radeon_device rdev)

radeon_boot_test_post_card - check and possibly initialize the hw

: radeon_device pointer

Check if the asic is initialized and if not, attempt to initialize it (all asics). Returns true if initialized or false if not.

Definition at line 514 of file radeon_device.c.

bool radeon_card_posted ( struct radeon_device rdev)

radeon_card_posted - check if the hw has already been initialized

: radeon_device pointer

Check if the asic has been initialized (all asics). Used at driver startup. Returns true if initialized or false if not.

Definition at line 428 of file radeon_device.c.

void radeon_combios_fini ( struct radeon_device rdev)

radeon_combios_fini - free the driver info for combios

: radeon_device pointer

Frees the driver info for combios (r1xx-r3xx). Called at driver shutdown.

Definition at line 814 of file radeon_device.c.

void radeon_combios_get_power_modes ( struct radeon_device rdev)

Definition at line 2635 of file radeon_combios.c.

int radeon_combios_init ( struct radeon_device rdev)

radeon_combios_init - init the driver info for combios

: radeon_device pointer

Initializes the driver info for combios (r1xx-r3xx). Returns 0 on sucess. Called at driver startup.

Definition at line 800 of file radeon_device.c.

bool radeon_combios_sideport_present ( struct radeon_device rdev)

Definition at line 892 of file radeon_combios.c.

int radeon_cs_finish_pages ( struct radeon_cs_parser p)

Definition at line 546 of file radeon_cs.c.

int radeon_cs_ioctl ( struct drm_device dev,
void data,
struct drm_file *  filp 
)

Definition at line 497 of file radeon_cs.c.

int radeon_cs_parser_init ( struct radeon_cs_parser p,
void data 
)

Definition at line 143 of file radeon_cs.c.

int radeon_debugfs_add_files ( struct radeon_device rdev,
struct drm_info_list *  files,
unsigned  nfiles 
)

Definition at line 1379 of file radeon_device.c.

int radeon_debugfs_fence_init ( struct radeon_device rdev)

Definition at line 907 of file radeon_fence.c.

void radeon_device_fini ( struct radeon_device rdev)

radeon_device_fini - tear down the driver

: radeon_device pointer

Tear down the driver info (all asics). Called at driver shutdown.

Definition at line 1129 of file radeon_device.c.

int radeon_device_init ( struct radeon_device rdev,
struct drm_device ddev,
struct pci_dev pdev,
uint32_t  flags 
)

radeon_device_init - initialize the driver

: radeon_device pointer : drm dev pointer : pci dev pointer : driver flags

Initializes the driver info and hw (all asics). Returns 0 for success or an error on failure. Called at driver startup.

Definition at line 966 of file radeon_device.c.

void radeon_dummy_page_fini ( struct radeon_device rdev)

radeon_dummy_page_fini - free dummy page used by the driver

: radeon_device pointer

Frees the dummy page used by the driver (all asics).

Definition at line 567 of file radeon_device.c.

int radeon_dummy_page_init ( struct radeon_device rdev)

radeon_dummy_page_init - init dummy page used by the driver

: radeon_device pointer

Allocate the dummy page used by the driver (all asics). This dummy page is used by the driver as a filler for gart entries when pages are taken out of the GART Returns 0 on sucess, -ENOMEM on failure.

Definition at line 542 of file radeon_device.c.

unsigned radeon_fence_count_emitted ( struct radeon_device rdev,
int  ring 
)

radeon_fence_count_emitted - get the count of emitted fences

: radeon device pointer : ring index the fence is associated with

Get the number of fences emitted on the requested ring (all asics). Returns the number of emitted fences on the ring. Used by the dynpm code to ring track activity.

Definition at line 675 of file radeon_fence.c.

void radeon_fence_driver_fini ( struct radeon_device rdev)

radeon_fence_driver_fini - tear down the fence driver for all possible rings.

: radeon device pointer

Tear down the fence driver for all possible rings (all asics).

Definition at line 855 of file radeon_fence.c.

int radeon_fence_driver_init ( struct radeon_device rdev)

radeon_fence_driver_init - init the fence driver for all possible rings.

: radeon device pointer

Init the fence driver for all possible rings (all asics). Not all asics have all rings, so each asic will only start the fence driver on the rings it has using radeon_fence_driver_start_ring(). Returns 0 for success.

Definition at line 833 of file radeon_fence.c.

int radeon_fence_driver_start_ring ( struct radeon_device rdev,
int  ring 
)

radeon_fence_driver_start_ring - make the fence driver ready for use on the requested ring.

: radeon device pointer : ring index to start the fence driver on

Make the fence driver ready for processing (all asics). Not all asics have all rings, so each asic will only start the fence driver on the rings it has. Returns 0 for success, errors for failure.

Definition at line 769 of file radeon_fence.c.

int radeon_fence_emit ( struct radeon_device rdev,
struct radeon_fence **  fence,
int  ring 
)

radeon_fence_emit - emit a fence on the requested ring

: radeon_device pointer : radeon fence object : ring index the fence is associated with

Emits a fence command on the requested ring (all asics). Returns 0 on success, -ENOMEM on failure.

Definition at line 104 of file radeon_fence.c.

bool radeon_fence_need_sync ( struct radeon_fence fence,
int  dst_ring 
)

radeon_fence_need_sync - do we need a semaphore

: radeon fence object : which ring to check against

Check if the fence needs to be synced against another ring (all asics). If so, we need to emit a semaphore. Returns true if we need to sync with another ring, false if not.

Definition at line 703 of file radeon_fence.c.

void radeon_fence_note_sync ( struct radeon_fence fence,
int  dst_ring 
)

radeon_fence_note_sync - record the sync point

: radeon fence object : which ring to check against

Note the sequence number at which point the fence will be synced with the requested ring (all asics).

Definition at line 733 of file radeon_fence.c.

void radeon_fence_process ( struct radeon_device rdev,
int  ring 
)

radeon_fence_process - process a fence

: radeon_device pointer : ring index the fence is associated with

Checks the current fence value and wakes the fence queue if the sequence number has increased (all asics).

Definition at line 131 of file radeon_fence.c.

struct radeon_fence* radeon_fence_ref ( struct radeon_fence fence)
read

radeon_fence_ref - take a ref on a fence

: radeon fence object

Take a reference on a fence (all asics). Returns the fence.

Definition at line 642 of file radeon_fence.c.

bool radeon_fence_signaled ( struct radeon_fence fence)

radeon_fence_signaled - check if a fence has signaled

: radeon fence object

Check if the requested fence has signaled (all asics). Returns true if the fence has signaled or false if it has not.

Definition at line 244 of file radeon_fence.c.

void radeon_fence_unref ( struct radeon_fence **  fence)

radeon_fence_unref - remove a ref on a fence

: radeon fence object

Remove a reference on a fence (all asics).

Definition at line 655 of file radeon_fence.c.

int radeon_fence_wait ( struct radeon_fence fence,
bool  intr 
)

radeon_fence_wait - wait for a fence to signal

: radeon fence object : use interruptable sleep

Wait for the requested fence to signal (all asics). selects whether to use interruptable (true) or non-interruptable (false) sleep when waiting for the fence. Returns 0 if the fence has passed, error for all other cases.

Definition at line 383 of file radeon_fence.c.

int radeon_fence_wait_any ( struct radeon_device rdev,
struct radeon_fence **  fences,
bool  intr 
)

radeon_fence_wait_any - wait for a fence to signal on any ring

: radeon device pointer : radeon fence object(s) : use interruptable sleep

Wait for any requested fence to signal (all asics). Fence array is indexed by ring id. selects whether to use interruptable (true) or non-interruptable (false) sleep when waiting for the fences. Used by the suballocator. Returns 0 if any fence has passed, error for all other cases.

Definition at line 549 of file radeon_fence.c.

void radeon_fence_wait_empty_locked ( struct radeon_device rdev,
int  ring 
)

radeon_fence_wait_empty_locked - wait for all fences to signal

: radeon device pointer : ring index the fence is associated with

Wait for all fences on the requested ring to signal (all asics). Returns 0 if the fences have passed, error for all other cases. Caller must hold ring lock.

Definition at line 612 of file radeon_fence.c.

int radeon_fence_wait_next_locked ( struct radeon_device rdev,
int  ring 
)

radeon_fence_wait_next_locked - wait for the next fence to signal

: radeon device pointer : ring index the fence is associated with

Wait for the next fence on the requested ring to signal (all asics). Returns 0 if the next fence has passed, error for all other cases. Caller must hold ring lock.

Definition at line 589 of file radeon_fence.c.

int radeon_gart_bind ( struct radeon_device rdev,
unsigned  offset,
int  pages,
struct page **  pagelist,
dma_addr_t dma_addr 
)

radeon_gart_bind - bind pages into the gart page table

: radeon_device pointer : offset into the GPU's gart aperture : number of pages to bind : pages to bind : DMA addresses of pages

Binds the requested pages to the gart page table (all asics). Returns 0 for success, -EINVAL for failure.

Definition at line 271 of file radeon_gart.c.

void radeon_gart_fini ( struct radeon_device rdev)

radeon_gart_fini - tear down the driver info for managing the gart

: radeon_device pointer

Tear down the gart driver info and free the dummy page (all asics).

Definition at line 383 of file radeon_gart.c.

int radeon_gart_init ( struct radeon_device rdev)

radeon_gart_init - init the driver info for managing the gart

: radeon_device pointer

Allocate the dummy page and init the gart driver info (all asics). Returns 0 for success, error for failure.

Definition at line 337 of file radeon_gart.c.

void radeon_gart_restore ( struct radeon_device rdev)

radeon_gart_restore - bind all pages in the gart page table

: radeon_device pointer

Binds all pages in the gart page table (all asics). Used to rebuild the gart table on device startup or resume.

Definition at line 310 of file radeon_gart.c.

int radeon_gart_table_ram_alloc ( struct radeon_device rdev)

radeon_gart_table_ram_alloc - allocate system ram for gart page table

: radeon_device pointer

Allocate system memory for GART page table (r1xx-r3xx, non-pcie r4xx, rs400). These asics require the gart table to be in system memory. Returns 0 for success, -ENOMEM for failure.

Definition at line 66 of file radeon_gart.c.

void radeon_gart_table_ram_free ( struct radeon_device rdev)

radeon_gart_table_ram_free - free system ram for gart page table

: radeon_device pointer

Free system memory for GART page table (r1xx-r3xx, non-pcie r4xx, rs400). These asics require the gart table to be in system memory.

Definition at line 96 of file radeon_gart.c.

int radeon_gart_table_vram_alloc ( struct radeon_device rdev)

radeon_gart_table_vram_alloc - allocate vram for gart page table

: radeon_device pointer

Allocate video memory for GART page table (pcie r4xx, r5xx+). These asics require the gart table to be in video memory. Returns 0 for success, error for failure.

Definition at line 125 of file radeon_gart.c.

void radeon_gart_table_vram_free ( struct radeon_device rdev)

radeon_gart_table_vram_free - free gart page table vram

: radeon_device pointer

Free the video memory used for the GART page table (pcie r4xx, r5xx+). These asics require the gart table to be in video memory.

Definition at line 205 of file radeon_gart.c.

int radeon_gart_table_vram_pin ( struct radeon_device rdev)

radeon_gart_table_vram_pin - pin gart page table in vram

: radeon_device pointer

Pin the GART page table in vram so it will not be moved by the memory manager (pcie r4xx, r5xx+). These asics require the gart table to be in video memory. Returns 0 for success, error for failure.

Definition at line 150 of file radeon_gart.c.

void radeon_gart_table_vram_unpin ( struct radeon_device rdev)

radeon_gart_table_vram_unpin - unpin gart page table in vram

: radeon_device pointer

Unpin the GART page table in vram (pcie r4xx, r5xx+). These asics require the gart table to be in video memory.

Definition at line 180 of file radeon_gart.c.

void radeon_gart_unbind ( struct radeon_device rdev,
unsigned  offset,
int  pages 
)

radeon_gart_unbind - unbind pages from the gart page table

: radeon_device pointer : offset into the GPU's gart aperture : number of pages to unbind

Unbinds the requested pages from the gart page table and replaces them with the dummy page (all asics).

Definition at line 227 of file radeon_gart.c.

int radeon_gem_busy_ioctl ( struct drm_device dev,
void data,
struct drm_file *  filp 
)

Definition at line 337 of file radeon_gem.c.

int radeon_gem_create_ioctl ( struct drm_device dev,
void data,
struct drm_file *  filp 
)

Definition at line 248 of file radeon_gem.c.

void radeon_gem_fini ( struct radeon_device rdev)

Definition at line 131 of file radeon_gem.c.

int radeon_gem_get_tiling_ioctl ( struct drm_device dev,
void data,
struct drm_file *  filp 
)

Definition at line 411 of file radeon_gem.c.

int radeon_gem_info_ioctl ( struct drm_device dev,
void data,
struct drm_file *  filp 
)

Definition at line 211 of file radeon_gem.c.

int radeon_gem_init ( struct radeon_device rdev)

Definition at line 125 of file radeon_gem.c.

int radeon_gem_mmap_ioctl ( struct drm_device dev,
void data,
struct drm_file *  filp 
)

Definition at line 329 of file radeon_gem.c.

int radeon_gem_object_create ( struct radeon_device rdev,
int  size,
int  alignment,
int  initial_domain,
bool  discardable,
bool  kernel,
struct drm_gem_object **  obj 
)

Definition at line 50 of file radeon_gem.c.

int radeon_gem_pin_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)
int radeon_gem_pread_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 232 of file radeon_gem.c.

int radeon_gem_pwrite_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 240 of file radeon_gem.c.

int radeon_gem_set_domain_ioctl ( struct drm_device dev,
void data,
struct drm_file *  filp 
)

Definition at line 281 of file radeon_gem.c.

int radeon_gem_set_tiling_ioctl ( struct drm_device dev,
void data,
struct drm_file *  filp 
)

Definition at line 393 of file radeon_gem.c.

int radeon_gem_unpin_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)
int radeon_gem_va_ioctl ( struct drm_device dev,
void data,
struct drm_file *  filp 
)

Definition at line 434 of file radeon_gem.c.

int radeon_gem_wait_idle_ioctl ( struct drm_device dev,
void data,
struct drm_file *  filp 
)

Definition at line 370 of file radeon_gem.c.

bool radeon_get_bios ( struct radeon_device rdev)

Definition at line 608 of file radeon_bios.c.

u32 radeon_get_ib_value ( struct radeon_cs_parser p,
int  idx 
)

Definition at line 611 of file radeon_cs.c.

int radeon_gpu_reset ( struct radeon_device rdev)

radeon_gpu_reset - reset the asic

: radeon device pointer

Attempt the reset the GPU if it has hung (all asics). Returns 0 for success or an error on failure.

Definition at line 1306 of file radeon_device.c.

int radeon_gpu_wait_for_idle ( struct radeon_device rdev)
void radeon_gtt_location ( struct radeon_device rdev,
struct radeon_mc mc 
)

radeon_gtt_location - try to find GTT location : radeon device structure holding all necessary informations : memory controller structure holding memory informations

Function will place try to place GTT before or after VRAM.

If GTT size is bigger than space left then we ajust GTT size. Thus function will never fails.

FIXME: when reducing GTT size align new size on power of 2.

Definition at line 392 of file radeon_device.c.

void radeon_ib_free ( struct radeon_device rdev,
struct radeon_ib ib 
)

radeon_ib_free - free an IB (Indirect Buffer)

: radeon_device pointer : IB object to free

Free an IB (all asics).

Definition at line 104 of file radeon_ring.c.

int radeon_ib_get ( struct radeon_device rdev,
int  ring,
struct radeon_ib ib,
struct radeon_vm vm,
unsigned  size 
)

radeon_ib_get - request an IB (Indirect Buffer)

: radeon_device pointer : ring index the IB is associated with : IB object returned : requested IB size

Request an IB (all asics). IBs are allocated using the suballocator. Returns 0 on success, error on failure.

Definition at line 60 of file radeon_ring.c.

void radeon_ib_pool_fini ( struct radeon_device rdev)

radeon_ib_pool_fini - Free the IB (Indirect Buffer) pool

: radeon_device pointer

Tear down the suballocator managing the pool of memory for use as IBs (all asics).

Definition at line 232 of file radeon_ring.c.

int radeon_ib_pool_init ( struct radeon_device rdev)

radeon_ib_pool_init - Init the IB (Indirect Buffer) pool

: radeon_device pointer

Initialize the suballocator to manage a pool of memory for use as IBs (all asics). Returns 0 on success, error on failure.

Definition at line 198 of file radeon_ring.c.

int radeon_ib_ring_tests ( struct radeon_device rdev)

radeon_ib_ring_tests - test IBs on the rings

: radeon_device pointer

Test an IB (Indirect Buffer) on each ring. If the test fails, disable the ring. Returns 0 on success, error if the primary GFX ring IB test fails.

Definition at line 251 of file radeon_ring.c.

int radeon_ib_schedule ( struct radeon_device rdev,
struct radeon_ib ib,
struct radeon_ib const_ib 
)

radeon_ib_schedule - schedule an IB (Indirect Buffer) on the ring

: radeon_device pointer : IB object to schedule : Const IB to schedule (SI only)

Schedule an IB on the associated ring (all asics). Returns 0 on success, error on failure.

On SI, there are two parallel engines fed from the primary ring, the CE (Constant Engine) and the DE (Drawing Engine). Since resource descriptors have moved to memory, the CE allows you to prime the caches while the DE is updating register state so that the resource descriptors will be already in cache when the draw is processed. To accomplish this, the userspace driver submits two IBs, one for the CE and one for the DE. If there is a CE IB (called a CONST_IB), it will be put on the ring prior to the DE IB. Prior to SI there was just a DE IB.

Definition at line 131 of file radeon_ring.c.

void radeon_irq_kms_disable_afmt ( struct radeon_device rdev,
int  block 
)

radeon_irq_kms_disable_afmt - disable audio format change interrupt

: radeon device pointer : afmt block whose interrupt you want to disable

Disables the afmt change interrupt for a specific afmt block (all asics).

Definition at line 418 of file radeon_irq_kms.c.

void radeon_irq_kms_disable_hpd ( struct radeon_device rdev,
unsigned  hpd_mask 
)

radeon_irq_kms_disable_hpd - disable hotplug detect interrupt

: radeon device pointer : mask of hpd pins you want to disable.

Disables the hotplug detect interrupt for a specific hpd pin (all asics).

Definition at line 456 of file radeon_irq_kms.c.

void radeon_irq_kms_enable_afmt ( struct radeon_device rdev,
int  block 
)

radeon_irq_kms_enable_afmt - enable audio format change interrupt

: radeon device pointer : afmt block whose interrupt you want to enable

Enables the afmt change interrupt for a specific afmt block (all asics).

Definition at line 399 of file radeon_irq_kms.c.

void radeon_irq_kms_enable_hpd ( struct radeon_device rdev,
unsigned  hpd_mask 
)

radeon_irq_kms_enable_hpd - enable hotplug detect interrupt

: radeon device pointer : mask of hpd pins you want to enable.

Enables the hotplug detect interrupt for a specific hpd pin (all asics).

Definition at line 436 of file radeon_irq_kms.c.

void radeon_irq_kms_fini ( struct radeon_device rdev)

radeon_irq_kms_fini - tear down driver interrrupt info

: radeon device pointer

Tears down the work irq handlers, vblank handlers, MSIs, etc. (all asics).

Definition at line 279 of file radeon_irq_kms.c.

int radeon_irq_kms_init ( struct radeon_device rdev)

radeon_irq_kms_init - init driver interrupt info

: radeon device pointer

Sets up the work irq handlers, vblank init, MSIs, etc. (all asics). Returns 0 for success, error for failure.

Definition at line 240 of file radeon_irq_kms.c.

void radeon_irq_kms_pflip_irq_get ( struct radeon_device rdev,
int  crtc 
)

radeon_irq_kms_pflip_irq_get - enable pageflip interrupt

: radeon device pointer : crtc whose interrupt you want to enable

Enables the pageflip interrupt for a specific crtc (all asics). For pageflips we use the vblank interrupt source.

Definition at line 348 of file radeon_irq_kms.c.

void radeon_irq_kms_pflip_irq_put ( struct radeon_device rdev,
int  crtc 
)

radeon_irq_kms_pflip_irq_put - disable pageflip interrupt

: radeon device pointer : crtc whose interrupt you want to disable

Disables the pageflip interrupt for a specific crtc (all asics). For pageflips we use the vblank interrupt source.

Definition at line 374 of file radeon_irq_kms.c.

void radeon_irq_kms_sw_irq_get ( struct radeon_device rdev,
int  ring 
)

radeon_irq_kms_sw_irq_get - enable software interrupt

: radeon device pointer : ring whose interrupt you want to enable

Enables the software interrupt for a specific ring (all asics). The software interrupt is generally used to signal a fence on a particular ring.

Definition at line 301 of file radeon_irq_kms.c.

void radeon_irq_kms_sw_irq_put ( struct radeon_device rdev,
int  ring 
)

radeon_irq_kms_sw_irq_put - disable software interrupt

: radeon device pointer : ring whose interrupt you want to disable

Disables the software interrupt for a specific ring (all asics). The software interrupt is generally used to signal a fence on a particular ring.

Definition at line 325 of file radeon_irq_kms.c.

void radeon_legacy_set_clock_gating ( struct radeon_device rdev,
int  enable 
)

Definition at line 471 of file radeon_clocks.c.

int radeon_mode_dumb_create ( struct drm_file *  file_priv,
struct drm_device dev,
struct drm_mode_create_dumb args 
)

Definition at line 542 of file radeon_gem.c.

int radeon_mode_dumb_destroy ( struct drm_file *  file_priv,
struct drm_device dev,
uint32_t  handle 
)

Definition at line 572 of file radeon_gem.c.

int radeon_mode_dumb_mmap ( struct drm_file *  filp,
struct drm_device dev,
uint32_t  handle,
uint64_t offset_p 
)

Definition at line 312 of file radeon_gem.c.

void radeon_modeset_fini ( struct radeon_device rdev)

Definition at line 1387 of file radeon_display.c.

int radeon_modeset_init ( struct radeon_device rdev)

Definition at line 1315 of file radeon_display.c.

void radeon_pm_compute_clocks ( struct radeon_device rdev)

Definition at line 662 of file radeon_pm.c.

void radeon_pm_fini ( struct radeon_device rdev)

Definition at line 634 of file radeon_pm.c.

int radeon_pm_get_type_index ( struct radeon_device rdev,
enum radeon_pm_state_type  ps_type,
int  instance 
)

Definition at line 50 of file radeon_pm.c.

int radeon_pm_init ( struct radeon_device rdev)

Definition at line 567 of file radeon_pm.c.

void radeon_pm_resume ( struct radeon_device rdev)

Definition at line 532 of file radeon_pm.c.

void radeon_pm_suspend ( struct radeon_device rdev)

Definition at line 520 of file radeon_pm.c.

int radeon_resume_kms ( struct drm_device dev)

radeon_resume_kms - initiate device resume

: drm dev pointer

Bring the hw back to operating state (all asics). Returns 0 for success or an error on failure. Called at driver resume.

Definition at line 1243 of file radeon_device.c.

int radeon_ring_alloc ( struct radeon_device rdev,
struct radeon_ring ring,
unsigned  ndw 
)

radeon_ring_alloc - allocate space on the ring buffer

: radeon_device pointer : radeon_ring structure holding ring information : number of dwords to allocate in the ring buffer

Allocate dwords in the ring buffer (all asics). Returns 0 on success, error on failure.

Definition at line 376 of file radeon_ring.c.

unsigned radeon_ring_backup ( struct radeon_device rdev,
struct radeon_ring ring,
uint32_t **  data 
)

radeon_ring_backup - Back up the content of a ring

: radeon_device pointer : the ring we want to back up

Saves all unprocessed commits from a ring, returns the number of dwords saved.

Definition at line 573 of file radeon_ring.c.

void radeon_ring_commit ( struct radeon_device rdev,
struct radeon_ring ring 
)

radeon_ring_commit - tell the GPU to execute the new commands on the ring buffer

: radeon_device pointer : radeon_ring structure holding ring information

Update the wptr (write pointer) to tell the GPU to execute new commands on the ring buffer (all asics).

Definition at line 431 of file radeon_ring.c.

void radeon_ring_fini ( struct radeon_device rdev,
struct radeon_ring ring 
)

radeon_ring_fini - tear down the driver ring struct.

: radeon_device pointer : radeon_ring structure holding ring information

Tear down the driver information for the selected ring (all asics).

Definition at line 737 of file radeon_ring.c.

void radeon_ring_force_activity ( struct radeon_device rdev,
struct radeon_ring ring 
)

radeon_ring_force_activity - add some nop packets to the ring

: radeon_device pointer : radeon_ring structure holding ring information

Add some nop packets to the ring to force activity (all asics). Used for lockup detection to see if the rptr is advancing.

Definition at line 491 of file radeon_ring.c.

void radeon_ring_free_size ( struct radeon_device rdev,
struct radeon_ring ring 
)

radeon_ring_free_size - update the free size

: radeon_device pointer : radeon_ring structure holding ring information

Update the free dw slots in the ring buffer (all asics).

Definition at line 348 of file radeon_ring.c.

int radeon_ring_init ( struct radeon_device rdev,
struct radeon_ring ring,
unsigned  ring_size,
unsigned  rptr_offs,
unsigned  rptr_reg,
unsigned  wptr_reg,
u32  ptr_reg_shift,
u32  ptr_reg_mask,
u32  nop 
)

radeon_ring_init - init driver ring struct.

: radeon_device pointer : radeon_ring structure holding ring information : size of the ring : offset of the rptr writeback location in the WB buffer : MMIO offset of the rptr register : MMIO offset of the wptr register : bit offset of the rptr/wptr values : bit mask of the rptr/wptr values : nop packet for this ring

Initialize the driver information for the selected ring (all asics). Returns 0 on success, error on failure.

Definition at line 675 of file radeon_ring.c.

int radeon_ring_lock ( struct radeon_device rdev,
struct radeon_ring ring,
unsigned  ndw 
)

radeon_ring_lock - lock the ring and allocate space on it

: radeon_device pointer : radeon_ring structure holding ring information : number of dwords to allocate in the ring buffer

Lock the ring and allocate dwords in the ring buffer (all asics). Returns 0 on success, error on failure.

Definition at line 408 of file radeon_ring.c.

void radeon_ring_lockup_update ( struct radeon_ring ring)

radeon_ring_force_activity - update lockup variables

: radeon_ring structure holding ring information

Update the last rptr value and timestamp (all asics).

Definition at line 512 of file radeon_ring.c.

int radeon_ring_restore ( struct radeon_device rdev,
struct radeon_ring ring,
unsigned  size,
uint32_t data 
)

radeon_ring_restore - append saved commands to the ring again

: radeon_device pointer : ring to append commands to : number of dwords we want to write : saved commands

Allocates space on the ring and restore the previously saved commands.

Definition at line 637 of file radeon_ring.c.

bool radeon_ring_supports_scratch_reg ( struct radeon_device rdev,
struct radeon_ring ring 
)

radeon_ring_supports_scratch_reg - check if the ring supports writing to scratch registers

: radeon_device pointer : radeon_ring structure holding ring information

Check if a specific ring supports writing to scratch registers (all asics). Returns true if the ring supports writing to scratch regs, false if not.

Definition at line 327 of file radeon_ring.c.

int radeon_ring_test ( struct radeon_device rdev,
struct radeon_ring cp 
)
bool radeon_ring_test_lockup ( struct radeon_device rdev,
struct radeon_ring ring 
)

radeon_ring_test_lockup() - check if ring is lockedup by recording information : radeon device structure : radeon_ring structure holding ring information

We don't need to initialize the lockup tracking information as we will either have CP rptr to a different value of jiffies wrap around which will force initialization of the lockup tracking informations.

A possible false positivie is if we get call after while and last_cp_rptr == the current CP rptr, even if it's unlikely it might happen. To avoid this if the elapsed time since last call is bigger than 2 second than we return false and update the tracking information. Due to this the caller must call radeon_ring_test_lockup several time in less than 2sec for lockup to be reported the fencing code should be cautious about that.

Caller should write to the ring to force CP to do something so we don't get false positive when CP is just gived nothing to do.

Definition at line 538 of file radeon_ring.c.

void radeon_ring_undo ( struct radeon_ring ring)

radeon_ring_undo - reset the wptr

: radeon_ring structure holding ring information

Reset the driver's copy of the wtpr (all asics).

Definition at line 464 of file radeon_ring.c.

void radeon_ring_unlock_commit ( struct radeon_device rdev,
struct radeon_ring ring 
)

radeon_ring_unlock_commit - tell the GPU to execute the new commands on the ring buffer and unlock it

: radeon_device pointer : radeon_ring structure holding ring information

Call radeon_ring_commit() then unlock the ring (all asics).

Definition at line 451 of file radeon_ring.c.

void radeon_ring_unlock_undo ( struct radeon_device rdev,
struct radeon_ring ring 
)

radeon_ring_unlock_undo - reset the wptr and unlock the ring

: radeon_ring structure holding ring information

Call radeon_ring_undo() then unlock the ring (all asics).

Definition at line 476 of file radeon_ring.c.

void radeon_scratch_free ( struct radeon_device rdev,
uint32_t  reg 
)

radeon_scratch_free - Free a scratch register

: radeon_device pointer : scratch register mmio offset

Free a CP scratch register allocated for use by the driver (all asics)

Definition at line 181 of file radeon_device.c.

int radeon_scratch_get ( struct radeon_device rdev,
uint32_t reg 
)

radeon_scratch_get - Allocate a scratch register

: radeon_device pointer : scratch register mmio offset

Allocate a CP scratch register for use by the driver (all asics). Returns 0 on success or -EINVAL on failure.

Definition at line 159 of file radeon_device.c.

void radeon_scratch_init ( struct radeon_device rdev)

radeon_scratch_init - Init scratch register driver information.

: radeon_device pointer

Init CP scratch register driver information (r1xx-r5xx)

Definition at line 133 of file radeon_device.c.

int radeon_semaphore_create ( struct radeon_device rdev,
struct radeon_semaphore **  semaphore 
)

Definition at line 34 of file radeon_semaphore.c.

void radeon_semaphore_emit_signal ( struct radeon_device rdev,
int  ring,
struct radeon_semaphore semaphore 
)

Definition at line 56 of file radeon_semaphore.c.

void radeon_semaphore_emit_wait ( struct radeon_device rdev,
int  ring,
struct radeon_semaphore semaphore 
)

Definition at line 63 of file radeon_semaphore.c.

void radeon_semaphore_free ( struct radeon_device rdev,
struct radeon_semaphore **  semaphore,
struct radeon_fence fence 
)

Definition at line 101 of file radeon_semaphore.c.

int radeon_semaphore_sync_rings ( struct radeon_device rdev,
struct radeon_semaphore semaphore,
int  signaler,
int  waiter 
)

Definition at line 71 of file radeon_semaphore.c.

void radeon_surface_init ( struct radeon_device rdev)

radeon_surface_init - Clear GPU surface registers.

: radeon_device pointer

Clear GPU surface registers (r1xx-r5xx).

Definition at line 106 of file radeon_device.c.

int radeon_suspend_kms ( struct drm_device dev,
pm_message_t  state 
)

radeon_suspend_kms - initiate device suspend

: drm dev pointer : suspend state

Puts the hw in the suspend state (all asics). Returns 0 for success or an error on failure. Called at driver suspend.

Definition at line 1160 of file radeon_device.c.

void radeon_test_moves ( struct radeon_device rdev)

Definition at line 31 of file radeon_test.c.

void radeon_test_ring_sync ( struct radeon_device rdev,
struct radeon_ring cpA,
struct radeon_ring cpB 
)

Definition at line 226 of file radeon_test.c.

void radeon_test_syncing ( struct radeon_device rdev)

Definition at line 431 of file radeon_test.c.

bool radeon_ttm_bo_is_radeon_bo ( struct ttm_buffer_object bo)

Definition at line 73 of file radeon_object.c.

void radeon_ttm_placement_from_domain ( struct radeon_bo rbo,
u32  domain 
)

Definition at line 80 of file radeon_object.c.

void radeon_ttm_set_active_vram_size ( struct radeon_device rdev,
u64  size 
)

Definition at line 772 of file radeon_ttm.c.

void radeon_update_bandwidth_info ( struct radeon_device rdev)

radeon_update_bandwidth_info - update display bandwidth params

: radeon_device pointer

Used when sclk/mclk are switched or display modes are set. params are used to calculate display watermarks (all asics)

Definition at line 485 of file radeon_device.c.

void radeon_update_display_priority ( struct radeon_device rdev)

Definition at line 1208 of file radeon_display.c.

void radeon_vm_add_to_lru ( struct radeon_device rdev,
struct radeon_vm vm 
)

radeon_vm_add_to_lru - add VMs page table to LRU list

: radeon_device pointer : vm to add to LRU

Add the allocated page table to the LRU list (cayman+).

Global mutex must be locked!

Definition at line 665 of file radeon_gart.c.

int radeon_vm_alloc_pt ( struct radeon_device rdev,
struct radeon_vm vm 
)

radeon_vm_alloc_pt - allocates a page table for a VM

: radeon_device pointer : vm to bind

Allocate a page table for the requested vm (cayman+). Returns 0 for success, error for failure.

Global and local mutex must be locked!

Definition at line 608 of file radeon_gart.c.

struct radeon_bo_va* radeon_vm_bo_add ( struct radeon_device rdev,
struct radeon_vm vm,
struct radeon_bo bo 
)
read

radeon_vm_bo_add - add a bo to a specific vm

: radeon_device pointer : requested vm : radeon buffer object

Add into the requested vm (cayman+). Add to the list of bos associated with the vm Returns newly added bo_va or NULL for failure

Object has to be reserved!

Definition at line 786 of file radeon_gart.c.

struct radeon_bo_va* radeon_vm_bo_find ( struct radeon_vm vm,
struct radeon_bo bo 
)
read

radeon_vm_bo_find - find the bo_va for a specific vm & bo

: requested vm : requested buffer object

Find inside the requested vm (cayman+). Search inside the vm list for the requested vm Returns the found bo_va or NULL if none is found

Object has to be reserved!

Definition at line 760 of file radeon_gart.c.

void radeon_vm_bo_invalidate ( struct radeon_device rdev,
struct radeon_bo bo 
)

radeon_vm_bo_invalidate - mark the bo as invalid

: radeon_device pointer : requested vm : radeon buffer object

Mark as invalid (cayman+).

Definition at line 1235 of file radeon_gart.c.

int radeon_vm_bo_rmv ( struct radeon_device rdev,
struct radeon_bo_va bo_va 
)

radeon_vm_bo_rmv - remove a bo to a specific vm

: radeon_device pointer : requested bo_va

Remove ->bo from the requested vm (cayman+). Remove ->bo from the list of bos associated with the bo_va->vm and remove the ptes for in the page table. Returns 0 for success.

Object have to be reserved!

Definition at line 1209 of file radeon_gart.c.

int radeon_vm_bo_set_addr ( struct radeon_device rdev,
struct radeon_bo_va bo_va,
uint64_t  soffset,
uint32_t  flags 
)

radeon_vm_bo_set_addr - set bos virtual address inside a vm

: radeon_device pointer : bo_va to store the address : requested offset of the buffer in the VM address space : attributes of pages (read/write/valid/etc.)

Set offset of (cayman+). Validate and set the offset requested within the vm address space. Returns 0 for success, error for failure.

Object has to be reserved!

Definition at line 828 of file radeon_gart.c.

int radeon_vm_bo_update_pte ( struct radeon_device rdev,
struct radeon_vm vm,
struct radeon_bo bo,
struct ttm_mem_reg mem 
)

radeon_vm_bo_update_pte - map a bo into the vm page table

: radeon_device pointer : requested vm : radeon buffer object : ttm mem

Fill in the page table entries for (cayman+). Returns 0 for success, -EINVAL for failure.

Object have to be reserved & global and local mutex must be locked!

Definition at line 1077 of file radeon_gart.c.

void radeon_vm_fence ( struct radeon_device rdev,
struct radeon_vm vm,
struct radeon_fence fence 
)

radeon_vm_fence - remember fence for vm

: radeon_device pointer : vm we want to fence : fence to remember

Fence the vm (cayman+). Set the fence used to protect page table and id.

Global and local mutex must be locked!

Definition at line 737 of file radeon_gart.c.

void radeon_vm_fini ( struct radeon_device rdev,
struct radeon_vm vm 
)

radeon_vm_fini - tear down a vm instance

: radeon_device pointer : requested vm

Tear down (cayman+). Unbind the VM and remove all bos from the vm bo list

Definition at line 1272 of file radeon_gart.c.

struct radeon_fence* radeon_vm_grab_id ( struct radeon_device rdev,
struct radeon_vm vm,
int  ring 
)
read

radeon_vm_grab_id - allocate the next free VMID

: radeon_device pointer : vm to allocate id for : ring we want to submit job to

Allocate an id for the vm (cayman+). Returns the fence we need to sync to (if any).

Global and local mutex must be locked!

Definition at line 683 of file radeon_gart.c.

void radeon_vm_init ( struct radeon_device rdev,
struct radeon_vm vm 
)

radeon_vm_init - initialize a vm instance

: radeon_device pointer : requested vm

Init fields (cayman+).

Definition at line 1254 of file radeon_gart.c.

void radeon_vm_manager_fini ( struct radeon_device rdev)

radeon_vm_manager_fini - tear down the vm manager

: radeon_device pointer

Tear down the VM manager (cayman+).

Definition at line 542 of file radeon_gart.c.

int radeon_vm_manager_init ( struct radeon_device rdev)

radeon_vm_manager_init - init the vm manager

: radeon_device pointer

Init the vm manager (cayman+). Returns 0 for success, error for failure.

Definition at line 456 of file radeon_gart.c.

uint64_t radeon_vm_map_gart ( struct radeon_device rdev,
uint64_t  addr 
)

radeon_vm_map_gart - get the physical address of a gart page

: radeon_device pointer : the unmapped addr

Look up the physical address of the page that the pte resolves to (cayman+). Returns the physical address of the page.

Definition at line 903 of file radeon_gart.c.

void radeon_vram_location ( struct radeon_device rdev,
struct radeon_mc mc,
u64  base 
)

radeon_vram_location - try to find VRAM location : radeon device structure holding all necessary informations : memory controller structure holding memory informations : base address at which to put VRAM

Function will place try to place VRAM at base address provided as parameter (which is so far either PCI aperture address or for IGP TOM base address).

If there is not enough space to fit the unvisible VRAM in the 32bits address space then we limit the VRAM size to the aperture.

If we are using AGP and if the AGP aperture doesn't allow us to have room for all the VRAM than we restrict the VRAM to the PCI aperture size and print a warning.

This function will never fails, worst case are limiting VRAM.

Note: GTT start, end, size should be initialized before calling this function on AGP platform.

Note: We don't explicitly enforce VRAM start to be aligned on VRAM size, this shouldn't be a problem as we are using the PCI aperture as a reference. Otherwise this would be needed for rv280, all r3xx, and all r4xx, but not IGP.

Note: we use mc_vram_size as on some board we need to program the mc to cover the whole aperture even if VRAM size is inferior to aperture size Novell bug 204882 + along with lots of ubuntu ones

Note: when limiting vram it's safe to overwritte real_vram_size because we are not in case where real_vram_size is inferior to mc_vram_size (ie note afected by bogus hw of Novell bug 204882 + along with lots of ubuntu ones)

Note: IGP TOM addr should be the same as the aperture addr, we don't explicitly check for that thought.

FIXME: when reducing VRAM size align new size on power of 2.

Definition at line 356 of file radeon_device.c.

void radeon_wb_disable ( struct radeon_device rdev)

radeon_wb_disable - Disable Writeback

: radeon_device pointer

Disables Writeback (all asics). Used for suspend.

Definition at line 207 of file radeon_device.c.

void radeon_wb_fini ( struct radeon_device rdev)

radeon_wb_fini - Disable Writeback and free memory

: radeon_device pointer

Disables Writeback and frees the Writeback memory (all asics). Used at driver shutdown.

Definition at line 230 of file radeon_device.c.

int radeon_wb_init ( struct radeon_device rdev)

radeon_wb_init- Init Writeback driver info and allocate memory

: radeon_device pointer

Disables Writeback and frees the Writeback memory (all asics). Used at driver startup. Returns 0 on success or an -error on failure.

Definition at line 249 of file radeon_device.c.

void rs690_pm_info ( struct radeon_device rdev)

Definition at line 64 of file rs690.c.

int rv6xx_get_temp ( struct radeon_device rdev)

Definition at line 107 of file r600.c.

int rv770_get_temp ( struct radeon_device rdev)

Definition at line 86 of file rv770.c.

int si_get_temp ( struct radeon_device rdev)

Definition at line 66 of file si.c.

int sumo_get_temp ( struct radeon_device rdev)

Definition at line 256 of file evergreen.c.

Variable Documentation

int radeon_agpmode

Definition at line 132 of file radeon_drv.c.

int radeon_audio

Definition at line 139 of file radeon_drv.c.

int radeon_benchmarking

Definition at line 135 of file radeon_drv.c.

Definition at line 137 of file radeon_drv.c.

int radeon_disp_priority

Definition at line 140 of file radeon_drv.c.

int radeon_dynclks

Definition at line 130 of file radeon_drv.c.

int radeon_gart_size

Definition at line 134 of file radeon_drv.c.

int radeon_hw_i2c

Definition at line 141 of file radeon_drv.c.

int radeon_lockup_timeout

Definition at line 144 of file radeon_drv.c.

int radeon_modeset

Definition at line 129 of file radeon_drv.c.

int radeon_msi

Definition at line 143 of file radeon_drv.c.

int radeon_no_wb

Definition at line 128 of file radeon_drv.c.

int radeon_pcie_gen2

Definition at line 142 of file radeon_drv.c.

int radeon_r4xx_atom

Definition at line 131 of file radeon_drv.c.

int radeon_testing

Definition at line 136 of file radeon_drv.c.

int radeon_tv

Definition at line 138 of file radeon_drv.c.

int radeon_vram_limit

Definition at line 133 of file radeon_drv.c.