Lines Matching refs:rdev

249 bool radeon_get_bios(struct radeon_device *rdev);
259 int radeon_dummy_page_init(struct radeon_device *rdev);
260 void radeon_dummy_page_fini(struct radeon_device *rdev);
285 int radeon_pm_init(struct radeon_device *rdev);
286 int radeon_pm_late_init(struct radeon_device *rdev);
287 void radeon_pm_fini(struct radeon_device *rdev);
288 void radeon_pm_compute_clocks(struct radeon_device *rdev);
289 void radeon_pm_suspend(struct radeon_device *rdev);
290 void radeon_pm_resume(struct radeon_device *rdev);
291 void radeon_combios_get_power_modes(struct radeon_device *rdev);
292 void radeon_atombios_get_power_modes(struct radeon_device *rdev);
293 int radeon_atom_get_clock_dividers(struct radeon_device *rdev,
298 int radeon_atom_get_memory_pll_dividers(struct radeon_device *rdev,
302 void radeon_atom_set_voltage(struct radeon_device *rdev, u16 voltage_level, u8 voltage_type);
303 int radeon_atom_get_voltage_gpio_settings(struct radeon_device *rdev,
306 void radeon_atom_set_engine_dram_timings(struct radeon_device *rdev,
308 int radeon_atom_get_voltage_step(struct radeon_device *rdev,
310 int radeon_atom_get_max_vddc(struct radeon_device *rdev, u8 voltage_type,
312 int radeon_atom_get_leakage_vddc_based_on_leakage_idx(struct radeon_device *rdev,
315 int radeon_atom_get_leakage_id_from_vbios(struct radeon_device *rdev,
317 int radeon_atom_get_leakage_vddc_based_on_leakage_params(struct radeon_device *rdev,
321 int radeon_atom_get_voltage_evv(struct radeon_device *rdev,
324 int radeon_atom_round_to_true_voltage(struct radeon_device *rdev,
328 int radeon_atom_get_min_voltage(struct radeon_device *rdev,
330 int radeon_atom_get_max_voltage(struct radeon_device *rdev,
332 int radeon_atom_get_voltage_table(struct radeon_device *rdev,
335 bool radeon_atom_is_voltage_gpio(struct radeon_device *rdev,
337 int radeon_atom_get_svi2_info(struct radeon_device *rdev,
340 void radeon_atom_update_memory_dll(struct radeon_device *rdev,
342 void radeon_atom_set_ac_timing(struct radeon_device *rdev,
344 int radeon_atom_init_mc_reg_table(struct radeon_device *rdev,
347 int radeon_atom_get_memory_info(struct radeon_device *rdev,
349 int radeon_atom_get_mclk_range_table(struct radeon_device *rdev,
352 int radeon_atom_get_max_vddc(struct radeon_device *rdev, u8 voltage_type,
354 void rs690_pm_info(struct radeon_device *rdev);
363 struct radeon_device *rdev; member
377 struct radeon_device *rdev; member
386 int radeon_fence_driver_start_ring(struct radeon_device *rdev, int ring);
387 void radeon_fence_driver_init(struct radeon_device *rdev);
388 void radeon_fence_driver_fini(struct radeon_device *rdev);
389 void radeon_fence_driver_force_completion(struct radeon_device *rdev, int ring);
390 int radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence **fence, int ring);
391 void radeon_fence_process(struct radeon_device *rdev, int ring);
395 int radeon_fence_wait_next(struct radeon_device *rdev, int ring);
396 int radeon_fence_wait_empty(struct radeon_device *rdev, int ring);
397 int radeon_fence_wait_any(struct radeon_device *rdev,
402 unsigned radeon_fence_count_emitted(struct radeon_device *rdev, int ring);
504 struct radeon_device *rdev; member
572 int radeon_gem_init(struct radeon_device *rdev);
573 void radeon_gem_fini(struct radeon_device *rdev);
574 int radeon_gem_object_create(struct radeon_device *rdev, unsigned long size,
595 int radeon_semaphore_create(struct radeon_device *rdev,
597 bool radeon_semaphore_emit_signal(struct radeon_device *rdev, int ring,
599 bool radeon_semaphore_emit_wait(struct radeon_device *rdev, int ring,
601 void radeon_semaphore_free(struct radeon_device *rdev,
617 int radeon_sync_resv(struct radeon_device *rdev,
621 int radeon_sync_rings(struct radeon_device *rdev,
624 void radeon_sync_free(struct radeon_device *rdev, struct radeon_sync *sync,
655 int radeon_gart_table_ram_alloc(struct radeon_device *rdev);
656 void radeon_gart_table_ram_free(struct radeon_device *rdev);
657 int radeon_gart_table_vram_alloc(struct radeon_device *rdev);
658 void radeon_gart_table_vram_free(struct radeon_device *rdev);
659 int radeon_gart_table_vram_pin(struct radeon_device *rdev);
660 void radeon_gart_table_vram_unpin(struct radeon_device *rdev);
661 int radeon_gart_init(struct radeon_device *rdev);
662 void radeon_gart_fini(struct radeon_device *rdev);
663 void radeon_gart_unbind(struct radeon_device *rdev, unsigned offset,
665 int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
695 bool radeon_combios_sideport_present(struct radeon_device *rdev);
696 bool radeon_atombios_sideport_present(struct radeon_device *rdev);
708 int radeon_scratch_get(struct radeon_device *rdev, uint32_t *reg);
709 void radeon_scratch_free(struct radeon_device *rdev, uint32_t reg);
725 int radeon_doorbell_get(struct radeon_device *rdev, u32 *page);
726 void radeon_doorbell_free(struct radeon_device *rdev, u32 doorbell);
735 struct radeon_device *rdev; member
802 int radeon_irq_kms_init(struct radeon_device *rdev);
803 void radeon_irq_kms_fini(struct radeon_device *rdev);
804 void radeon_irq_kms_sw_irq_get(struct radeon_device *rdev, int ring);
805 bool radeon_irq_kms_sw_irq_get_delayed(struct radeon_device *rdev, int ring);
806 void radeon_irq_kms_sw_irq_put(struct radeon_device *rdev, int ring);
807 void radeon_irq_kms_pflip_irq_get(struct radeon_device *rdev, int crtc);
808 void radeon_irq_kms_pflip_irq_put(struct radeon_device *rdev, int crtc);
809 void radeon_irq_kms_enable_afmt(struct radeon_device *rdev, int block);
810 void radeon_irq_kms_disable_afmt(struct radeon_device *rdev, int block);
811 void radeon_irq_kms_enable_hpd(struct radeon_device *rdev, unsigned hpd_mask);
812 void radeon_irq_kms_disable_hpd(struct radeon_device *rdev, unsigned hpd_mask);
831 struct radeon_device *rdev; member
1003 int radeon_ib_get(struct radeon_device *rdev, int ring,
1006 void radeon_ib_free(struct radeon_device *rdev, struct radeon_ib *ib);
1007 int radeon_ib_schedule(struct radeon_device *rdev, struct radeon_ib *ib,
1009 int radeon_ib_pool_init(struct radeon_device *rdev);
1010 void radeon_ib_pool_fini(struct radeon_device *rdev);
1011 int radeon_ib_ring_tests(struct radeon_device *rdev);
1013 bool radeon_ring_supports_scratch_reg(struct radeon_device *rdev,
1015 void radeon_ring_free_size(struct radeon_device *rdev, struct radeon_ring *cp);
1016 int radeon_ring_alloc(struct radeon_device *rdev, struct radeon_ring *cp, unsigned ndw);
1017 int radeon_ring_lock(struct radeon_device *rdev, struct radeon_ring *cp, unsigned ndw);
1018 void radeon_ring_commit(struct radeon_device *rdev, struct radeon_ring *cp,
1020 void radeon_ring_unlock_commit(struct radeon_device *rdev, struct radeon_ring *cp,
1023 void radeon_ring_unlock_undo(struct radeon_device *rdev, struct radeon_ring *cp);
1024 int radeon_ring_test(struct radeon_device *rdev, struct radeon_ring *cp);
1025 void radeon_ring_lockup_update(struct radeon_device *rdev,
1027 bool radeon_ring_test_lockup(struct radeon_device *rdev, struct radeon_ring *ring);
1028 unsigned radeon_ring_backup(struct radeon_device *rdev, struct radeon_ring *ring,
1030 int radeon_ring_restore(struct radeon_device *rdev, struct radeon_ring *ring,
1032 int radeon_ring_init(struct radeon_device *rdev, struct radeon_ring *cp, unsigned ring_size,
1034 void radeon_ring_fini(struct radeon_device *rdev, struct radeon_ring *cp);
1038 void r600_dma_stop(struct radeon_device *rdev);
1039 int r600_dma_resume(struct radeon_device *rdev);
1040 void r600_dma_fini(struct radeon_device *rdev);
1042 void cayman_dma_stop(struct radeon_device *rdev);
1043 int cayman_dma_resume(struct radeon_device *rdev);
1044 void cayman_dma_fini(struct radeon_device *rdev);
1057 struct radeon_device *rdev; member
1153 int radeon_agp_init(struct radeon_device *rdev);
1154 void radeon_agp_resume(struct radeon_device *rdev);
1155 void radeon_agp_suspend(struct radeon_device *rdev);
1156 void radeon_agp_fini(struct radeon_device *rdev);
1621 void radeon_dpm_enable_uvd(struct radeon_device *rdev, bool enable);
1622 void radeon_dpm_enable_vce(struct radeon_device *rdev, bool enable);
1692 int radeon_pm_get_type_index(struct radeon_device *rdev,
1716 int radeon_uvd_init(struct radeon_device *rdev);
1717 void radeon_uvd_fini(struct radeon_device *rdev);
1718 int radeon_uvd_suspend(struct radeon_device *rdev);
1719 int radeon_uvd_resume(struct radeon_device *rdev);
1720 int radeon_uvd_get_create_msg(struct radeon_device *rdev, int ring,
1722 int radeon_uvd_get_destroy_msg(struct radeon_device *rdev, int ring,
1726 void radeon_uvd_free_handles(struct radeon_device *rdev,
1729 void radeon_uvd_note_usage(struct radeon_device *rdev);
1730 int radeon_uvd_calc_upll_dividers(struct radeon_device *rdev,
1739 int radeon_uvd_send_upll_ctlreq(struct radeon_device *rdev,
1759 int radeon_vce_init(struct radeon_device *rdev);
1760 void radeon_vce_fini(struct radeon_device *rdev);
1761 int radeon_vce_suspend(struct radeon_device *rdev);
1762 int radeon_vce_resume(struct radeon_device *rdev);
1763 int radeon_vce_get_create_msg(struct radeon_device *rdev, int ring,
1765 int radeon_vce_get_destroy_msg(struct radeon_device *rdev, int ring,
1767 void radeon_vce_free_handles(struct radeon_device *rdev, struct drm_file *filp);
1768 void radeon_vce_note_usage(struct radeon_device *rdev);
1771 bool radeon_vce_semaphore_emit(struct radeon_device *rdev,
1775 void radeon_vce_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib);
1776 void radeon_vce_fence_emit(struct radeon_device *rdev,
1778 int radeon_vce_ring_test(struct radeon_device *rdev, struct radeon_ring *ring);
1779 int radeon_vce_ib_test(struct radeon_device *rdev, struct radeon_ring *ring);
1804 void radeon_benchmark(struct radeon_device *rdev, int test_number);
1810 void radeon_test_moves(struct radeon_device *rdev);
1811 void radeon_test_ring_sync(struct radeon_device *rdev,
1814 void radeon_test_syncing(struct radeon_device *rdev);
1833 void radeon_debugfs_fence_init(struct radeon_device *rdev);
1834 void radeon_gem_debugfs_init(struct radeon_device *rdev);
1841 u32 (*get_rptr)(struct radeon_device *rdev, struct radeon_ring *ring);
1842 u32 (*get_wptr)(struct radeon_device *rdev, struct radeon_ring *ring);
1843 void (*set_wptr)(struct radeon_device *rdev, struct radeon_ring *ring);
1846 int (*ib_parse)(struct radeon_device *rdev, struct radeon_ib *ib);
1850 void (*ib_execute)(struct radeon_device *rdev, struct radeon_ib *ib);
1851 void (*emit_fence)(struct radeon_device *rdev, struct radeon_fence *fence);
1852 void (*hdp_flush)(struct radeon_device *rdev, struct radeon_ring *ring);
1853 bool (*emit_semaphore)(struct radeon_device *rdev, struct radeon_ring *cp,
1855 void (*vm_flush)(struct radeon_device *rdev, struct radeon_ring *ring,
1859 int (*ring_test)(struct radeon_device *rdev, struct radeon_ring *cp);
1860 int (*ib_test)(struct radeon_device *rdev, struct radeon_ring *cp);
1861 bool (*is_lockup)(struct radeon_device *rdev, struct radeon_ring *cp);
1864 void (*ring_start)(struct radeon_device *rdev, struct radeon_ring *cp);
1871 int (*init)(struct radeon_device *rdev);
1872 void (*fini)(struct radeon_device *rdev);
1873 int (*resume)(struct radeon_device *rdev);
1874 int (*suspend)(struct radeon_device *rdev);
1875 void (*vga_set_state)(struct radeon_device *rdev, bool state);
1876 int (*asic_reset)(struct radeon_device *rdev, bool hard);
1878 void (*mmio_hdp_flush)(struct radeon_device *rdev);
1880 bool (*gui_idle)(struct radeon_device *rdev);
1882 int (*mc_wait_for_idle)(struct radeon_device *rdev);
1884 u32 (*get_xclk)(struct radeon_device *rdev);
1886 uint64_t (*get_gpu_clock_counter)(struct radeon_device *rdev);
1888 int (*get_allowed_info_register)(struct radeon_device *rdev, u32 reg, u32 *val);
1891 void (*tlb_flush)(struct radeon_device *rdev);
1893 void (*set_page)(struct radeon_device *rdev, unsigned i,
1897 int (*init)(struct radeon_device *rdev);
1898 void (*fini)(struct radeon_device *rdev);
1899 void (*copy_pages)(struct radeon_device *rdev,
1903 void (*write_pages)(struct radeon_device *rdev,
1908 void (*set_pages)(struct radeon_device *rdev,
1919 int (*set)(struct radeon_device *rdev);
1920 int (*process)(struct radeon_device *rdev);
1925 void (*bandwidth_update)(struct radeon_device *rdev);
1927 u32 (*get_vblank_counter)(struct radeon_device *rdev, int crtc);
1929 void (*wait_for_vblank)(struct radeon_device *rdev, int crtc);
1940 struct radeon_fence *(*blit)(struct radeon_device *rdev,
1946 struct radeon_fence *(*dma)(struct radeon_device *rdev,
1953 struct radeon_fence *(*copy)(struct radeon_device *rdev,
1963 int (*set_reg)(struct radeon_device *rdev, int reg,
1966 void (*clear_reg)(struct radeon_device *rdev, int reg);
1970 void (*init)(struct radeon_device *rdev);
1971 void (*fini)(struct radeon_device *rdev);
1972 bool (*sense)(struct radeon_device *rdev, enum radeon_hpd_id hpd);
1973 void (*set_polarity)(struct radeon_device *rdev, enum radeon_hpd_id hpd);
1977 void (*misc)(struct radeon_device *rdev);
1978 void (*prepare)(struct radeon_device *rdev);
1979 void (*finish)(struct radeon_device *rdev);
1980 void (*init_profile)(struct radeon_device *rdev);
1981 void (*get_dynpm_state)(struct radeon_device *rdev);
1982 uint32_t (*get_engine_clock)(struct radeon_device *rdev);
1983 void (*set_engine_clock)(struct radeon_device *rdev, uint32_t eng_clock);
1984 uint32_t (*get_memory_clock)(struct radeon_device *rdev);
1985 void (*set_memory_clock)(struct radeon_device *rdev, uint32_t mem_clock);
1986 int (*get_pcie_lanes)(struct radeon_device *rdev);
1987 void (*set_pcie_lanes)(struct radeon_device *rdev, int lanes);
1988 void (*set_clock_gating)(struct radeon_device *rdev, int enable);
1989 int (*set_uvd_clocks)(struct radeon_device *rdev, u32 vclk, u32 dclk);
1990 int (*set_vce_clocks)(struct radeon_device *rdev, u32 evclk, u32 ecclk);
1991 int (*get_temperature)(struct radeon_device *rdev);
1995 int (*init)(struct radeon_device *rdev);
1996 void (*setup_asic)(struct radeon_device *rdev);
1997 int (*enable)(struct radeon_device *rdev);
1998 int (*late_enable)(struct radeon_device *rdev);
1999 void (*disable)(struct radeon_device *rdev);
2000 int (*pre_set_power_state)(struct radeon_device *rdev);
2001 int (*set_power_state)(struct radeon_device *rdev);
2002 void (*post_set_power_state)(struct radeon_device *rdev);
2003 void (*display_configuration_changed)(struct radeon_device *rdev);
2004 void (*fini)(struct radeon_device *rdev);
2005 u32 (*get_sclk)(struct radeon_device *rdev, bool low);
2006 u32 (*get_mclk)(struct radeon_device *rdev, bool low);
2007 void (*print_power_state)(struct radeon_device *rdev, struct radeon_ps *ps);
2008 void (*debugfs_print_current_performance_level)(struct radeon_device *rdev, struct seq_file *m);
2009 int (*force_performance_level)(struct radeon_device *rdev, enum radeon_dpm_forced_level level);
2010 bool (*vblank_too_short)(struct radeon_device *rdev);
2011 void (*powergate_uvd)(struct radeon_device *rdev, bool gate);
2012 void (*enable_bapm)(struct radeon_device *rdev, bool enable);
2013 void (*fan_ctrl_set_mode)(struct radeon_device *rdev, u32 mode);
2014 u32 (*fan_ctrl_get_mode)(struct radeon_device *rdev);
2015 int (*set_fan_speed_percent)(struct radeon_device *rdev, u32 speed);
2016 int (*get_fan_speed_percent)(struct radeon_device *rdev, u32 *speed);
2017 u32 (*get_current_sclk)(struct radeon_device *rdev);
2018 u32 (*get_current_mclk)(struct radeon_device *rdev);
2019 u16 (*get_current_vddc)(struct radeon_device *rdev);
2023 void (*page_flip)(struct radeon_device *rdev, int crtc, u64 crtc_base, bool async);
2024 bool (*page_flip_pending)(struct radeon_device *rdev, int crtc);
2235 void radeon_agp_disable(struct radeon_device *rdev);
2236 int radeon_asic_init(struct radeon_device *rdev);
2485 int radeon_device_init(struct radeon_device *rdev,
2489 void radeon_device_fini(struct radeon_device *rdev);
2490 int radeon_gpu_wait_for_idle(struct radeon_device *rdev);
2494 uint32_t r100_mm_rreg_slow(struct radeon_device *rdev, uint32_t reg);
2495 void r100_mm_wreg_slow(struct radeon_device *rdev, uint32_t reg, uint32_t v);
2496 static inline uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg, in r100_mm_rreg() argument
2500 if ((reg < rdev->rmmio_size || reg < RADEON_MIN_MMIO_SIZE) && !always_indirect) in r100_mm_rreg()
2501 return readl(((void __iomem *)rdev->rmmio) + reg); in r100_mm_rreg()
2503 return r100_mm_rreg_slow(rdev, reg); in r100_mm_rreg()
2505 static inline void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v, in r100_mm_wreg() argument
2508 if ((reg < rdev->rmmio_size || reg < RADEON_MIN_MMIO_SIZE) && !always_indirect) in r100_mm_wreg()
2509 writel(v, ((void __iomem *)rdev->rmmio) + reg); in r100_mm_wreg()
2511 r100_mm_wreg_slow(rdev, reg, v); in r100_mm_wreg()
2514 u32 r100_io_rreg(struct radeon_device *rdev, u32 reg);
2515 void r100_io_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2517 u32 cik_mm_rdoorbell(struct radeon_device *rdev, u32 index);
2518 void cik_mm_wdoorbell(struct radeon_device *rdev, u32 index, u32 v);
2538 #define RREG8(reg) readb((rdev->rmmio) + (reg))
2539 #define WREG8(reg, v) writeb(v, (rdev->rmmio) + (reg))
2540 #define RREG16(reg) readw((rdev->rmmio) + (reg))
2541 #define WREG16(reg, v) writew(v, (rdev->rmmio) + (reg))
2542 #define RREG32(reg) r100_mm_rreg(rdev, (reg), false)
2543 #define RREG32_IDX(reg) r100_mm_rreg(rdev, (reg), true)
2545 r100_mm_rreg(rdev, (reg), false))
2546 #define WREG32(reg, v) r100_mm_wreg(rdev, (reg), (v), false)
2547 #define WREG32_IDX(reg, v) r100_mm_wreg(rdev, (reg), (v), true)
2550 #define RREG32_PLL(reg) rdev->pll_rreg(rdev, (reg))
2551 #define WREG32_PLL(reg, v) rdev->pll_wreg(rdev, (reg), (v))
2552 #define RREG32_MC(reg) rdev->mc_rreg(rdev, (reg))
2553 #define WREG32_MC(reg, v) rdev->mc_wreg(rdev, (reg), (v))
2554 #define RREG32_PCIE(reg) rv370_pcie_rreg(rdev, (reg))
2555 #define WREG32_PCIE(reg, v) rv370_pcie_wreg(rdev, (reg), (v))
2556 #define RREG32_PCIE_PORT(reg) rdev->pciep_rreg(rdev, (reg))
2557 #define WREG32_PCIE_PORT(reg, v) rdev->pciep_wreg(rdev, (reg), (v))
2558 #define RREG32_SMC(reg) tn_smc_rreg(rdev, (reg))
2559 #define WREG32_SMC(reg, v) tn_smc_wreg(rdev, (reg), (v))
2560 #define RREG32_RCU(reg) r600_rcu_rreg(rdev, (reg))
2561 #define WREG32_RCU(reg, v) r600_rcu_wreg(rdev, (reg), (v))
2562 #define RREG32_CG(reg) eg_cg_rreg(rdev, (reg))
2563 #define WREG32_CG(reg, v) eg_cg_wreg(rdev, (reg), (v))
2564 #define RREG32_PIF_PHY0(reg) eg_pif_phy0_rreg(rdev, (reg))
2565 #define WREG32_PIF_PHY0(reg, v) eg_pif_phy0_wreg(rdev, (reg), (v))
2566 #define RREG32_PIF_PHY1(reg) eg_pif_phy1_rreg(rdev, (reg))
2567 #define WREG32_PIF_PHY1(reg, v) eg_pif_phy1_wreg(rdev, (reg), (v))
2568 #define RREG32_UVD_CTX(reg) r600_uvd_ctx_rreg(rdev, (reg))
2569 #define WREG32_UVD_CTX(reg, v) r600_uvd_ctx_wreg(rdev, (reg), (v))
2570 #define RREG32_DIDT(reg) cik_didt_rreg(rdev, (reg))
2571 #define WREG32_DIDT(reg, v) cik_didt_wreg(rdev, (reg), (v))
2595 #define DREG32_SYS(sqf, rdev, reg) seq_printf((sqf), #reg " : 0x%08X\n", r100_mm_rreg((rdev), (reg)… argument
2596 #define RREG32_IO(reg) r100_io_rreg(rdev, (reg))
2597 #define WREG32_IO(reg, v) r100_io_wreg(rdev, (reg), (v))
2599 #define RDOORBELL32(index) cik_mm_rdoorbell(rdev, (index))
2600 #define WDOORBELL32(index, v) cik_mm_wdoorbell(rdev, (index), (v))
2610 uint32_t rv370_pcie_rreg(struct radeon_device *rdev, uint32_t reg);
2611 void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
2612 u32 tn_smc_rreg(struct radeon_device *rdev, u32 reg);
2613 void tn_smc_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2614 u32 r600_rcu_rreg(struct radeon_device *rdev, u32 reg);
2615 void r600_rcu_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2616 u32 eg_cg_rreg(struct radeon_device *rdev, u32 reg);
2617 void eg_cg_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2618 u32 eg_pif_phy0_rreg(struct radeon_device *rdev, u32 reg);
2619 void eg_pif_phy0_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2620 u32 eg_pif_phy1_rreg(struct radeon_device *rdev, u32 reg);
2621 void eg_pif_phy1_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2622 u32 r600_uvd_ctx_rreg(struct radeon_device *rdev, u32 reg);
2623 void r600_uvd_ctx_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2624 u32 cik_didt_rreg(struct radeon_device *rdev, u32 reg);
2625 void cik_didt_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2627 void r100_pll_errata_after_index(struct radeon_device *rdev);
2633 #define ASIC_IS_RN50(rdev) ((rdev->pdev->device == 0x515e) || \ argument
2634 (rdev->pdev->device == 0x5969))
2635 #define ASIC_IS_RV100(rdev) ((rdev->family == CHIP_RV100) || \ argument
2636 (rdev->family == CHIP_RV200) || \
2637 (rdev->family == CHIP_RS100) || \
2638 (rdev->family == CHIP_RS200) || \
2639 (rdev->family == CHIP_RV250) || \
2640 (rdev->family == CHIP_RV280) || \
2641 (rdev->family == CHIP_RS300))
2642 #define ASIC_IS_R300(rdev) ((rdev->family == CHIP_R300) || \ argument
2643 (rdev->family == CHIP_RV350) || \
2644 (rdev->family == CHIP_R350) || \
2645 (rdev->family == CHIP_RV380) || \
2646 (rdev->family == CHIP_R420) || \
2647 (rdev->family == CHIP_R423) || \
2648 (rdev->family == CHIP_RV410) || \
2649 (rdev->family == CHIP_RS400) || \
2650 (rdev->family == CHIP_RS480))
2651 #define ASIC_IS_X2(rdev) ((rdev->pdev->device == 0x9441) || \ argument
2652 (rdev->pdev->device == 0x9443) || \
2653 (rdev->pdev->device == 0x944B) || \
2654 (rdev->pdev->device == 0x9506) || \
2655 (rdev->pdev->device == 0x9509) || \
2656 (rdev->pdev->device == 0x950F) || \
2657 (rdev->pdev->device == 0x689C) || \
2658 (rdev->pdev->device == 0x689D))
2659 #define ASIC_IS_AVIVO(rdev) ((rdev->family >= CHIP_RS600)) argument
2660 #define ASIC_IS_DCE2(rdev) ((rdev->family == CHIP_RS600) || \ argument
2661 (rdev->family == CHIP_RS690) || \
2662 (rdev->family == CHIP_RS740) || \
2663 (rdev->family >= CHIP_R600))
2664 #define ASIC_IS_DCE3(rdev) ((rdev->family >= CHIP_RV620)) argument
2665 #define ASIC_IS_DCE32(rdev) ((rdev->family >= CHIP_RV730)) argument
2666 #define ASIC_IS_DCE4(rdev) ((rdev->family >= CHIP_CEDAR)) argument
2667 #define ASIC_IS_DCE41(rdev) ((rdev->family >= CHIP_PALM) && \ argument
2668 (rdev->flags & RADEON_IS_IGP))
2669 #define ASIC_IS_DCE5(rdev) ((rdev->family >= CHIP_BARTS)) argument
2670 #define ASIC_IS_DCE6(rdev) ((rdev->family >= CHIP_ARUBA)) argument
2671 #define ASIC_IS_DCE61(rdev) ((rdev->family >= CHIP_ARUBA) && \ argument
2672 (rdev->flags & RADEON_IS_IGP))
2673 #define ASIC_IS_DCE64(rdev) ((rdev->family == CHIP_OLAND)) argument
2674 #define ASIC_IS_NODCE(rdev) ((rdev->family == CHIP_HAINAN)) argument
2675 #define ASIC_IS_DCE8(rdev) ((rdev->family >= CHIP_BONAIRE)) argument
2676 #define ASIC_IS_DCE81(rdev) ((rdev->family == CHIP_KAVERI)) argument
2677 #define ASIC_IS_DCE82(rdev) ((rdev->family == CHIP_BONAIRE)) argument
2678 #define ASIC_IS_DCE83(rdev) ((rdev->family == CHIP_KABINI) || \ argument
2679 (rdev->family == CHIP_MULLINS))
2681 #define ASIC_IS_LOMBOK(rdev) ((rdev->pdev->device == 0x6849) || \ argument
2682 (rdev->pdev->device == 0x6850) || \
2683 (rdev->pdev->device == 0x6858) || \
2684 (rdev->pdev->device == 0x6859) || \
2685 (rdev->pdev->device == 0x6840) || \
2686 (rdev->pdev->device == 0x6841) || \
2687 (rdev->pdev->device == 0x6842) || \
2688 (rdev->pdev->device == 0x6843))
2693 #define RBIOS8(i) (rdev->bios[i])
2697 int radeon_combios_init(struct radeon_device *rdev);
2698 void radeon_combios_fini(struct radeon_device *rdev);
2699 int radeon_atombios_init(struct radeon_device *rdev);
2700 void radeon_atombios_fini(struct radeon_device *rdev);
2729 #define radeon_init(rdev) (rdev)->asic->init((rdev)) argument
2730 #define radeon_fini(rdev) (rdev)->asic->fini((rdev)) argument
2731 #define radeon_resume(rdev) (rdev)->asic->resume((rdev)) argument
2732 #define radeon_suspend(rdev) (rdev)->asic->suspend((rdev)) argument
2733 #define radeon_cs_parse(rdev, r, p) (rdev)->asic->ring[(r)]->cs_parse((p)) argument
2734 #define radeon_vga_set_state(rdev, state) (rdev)->asic->vga_set_state((rdev), (state)) argument
2735 #define radeon_asic_reset(rdev) (rdev)->asic->asic_reset((rdev), false) argument
2736 #define radeon_gart_tlb_flush(rdev) (rdev)->asic->gart.tlb_flush((rdev)) argument
2737 #define radeon_gart_get_page_entry(a, f) (rdev)->asic->gart.get_page_entry((a), (f))
2738 #define radeon_gart_set_page(rdev, i, e) (rdev)->asic->gart.set_page((rdev), (i), (e)) argument
2739 #define radeon_asic_vm_init(rdev) (rdev)->asic->vm.init((rdev)) argument
2740 #define radeon_asic_vm_fini(rdev) (rdev)->asic->vm.fini((rdev)) argument
2741 #define radeon_asic_vm_copy_pages(rdev, ib, pe, src, count) ((rdev)->asic->vm.copy_pages((rdev), (i… argument
2742 #define radeon_asic_vm_write_pages(rdev, ib, pe, addr, count, incr, flags) ((rdev)->asic->vm.write_… argument
2743 #define radeon_asic_vm_set_pages(rdev, ib, pe, addr, count, incr, flags) ((rdev)->asic->vm.set_page… argument
2744 #define radeon_asic_vm_pad_ib(rdev, ib) ((rdev)->asic->vm.pad_ib((ib))) argument
2745 #define radeon_ring_start(rdev, r, cp) (rdev)->asic->ring[(r)]->ring_start((rdev), (cp)) argument
2746 #define radeon_ring_test(rdev, r, cp) (rdev)->asic->ring[(r)]->ring_test((rdev), (cp)) argument
2747 #define radeon_ib_test(rdev, r, cp) (rdev)->asic->ring[(r)]->ib_test((rdev), (cp)) argument
2748 #define radeon_ring_ib_execute(rdev, r, ib) (rdev)->asic->ring[(r)]->ib_execute((rdev), (ib)) argument
2749 #define radeon_ring_ib_parse(rdev, r, ib) (rdev)->asic->ring[(r)]->ib_parse((rdev), (ib)) argument
2750 #define radeon_ring_is_lockup(rdev, r, cp) (rdev)->asic->ring[(r)]->is_lockup((rdev), (cp)) argument
2751 #define radeon_ring_vm_flush(rdev, r, vm_id, pd_addr) (rdev)->asic->ring[(r)->idx]->vm_flush((rdev)… argument
2752 #define radeon_ring_get_rptr(rdev, r) (rdev)->asic->ring[(r)->idx]->get_rptr((rdev), (r)) argument
2753 #define radeon_ring_get_wptr(rdev, r) (rdev)->asic->ring[(r)->idx]->get_wptr((rdev), (r)) argument
2754 #define radeon_ring_set_wptr(rdev, r) (rdev)->asic->ring[(r)->idx]->set_wptr((rdev), (r)) argument
2755 #define radeon_irq_set(rdev) (rdev)->asic->irq.set((rdev)) argument
2756 #define radeon_irq_process(rdev) (rdev)->asic->irq.process((rdev)) argument
2757 #define radeon_get_vblank_counter(rdev, crtc) (rdev)->asic->display.get_vblank_counter((rdev), (crt… argument
2758 #define radeon_set_backlight_level(rdev, e, l) (rdev)->asic->display.set_backlight_level((e), (l)) argument
2759 #define radeon_get_backlight_level(rdev, e) (rdev)->asic->display.get_backlight_level((e)) argument
2760 #define radeon_hdmi_enable(rdev, e, b) (rdev)->asic->display.hdmi_enable((e), (b)) argument
2761 #define radeon_hdmi_setmode(rdev, e, m) (rdev)->asic->display.hdmi_setmode((e), (m)) argument
2762 #define radeon_fence_ring_emit(rdev, r, fence) (rdev)->asic->ring[(r)]->emit_fence((rdev), (fence)) argument
2763 #define radeon_semaphore_ring_emit(rdev, r, cp, semaphore, emit_wait) (rdev)->asic->ring[(r)]->emit… argument
2764 #define radeon_copy_blit(rdev, s, d, np, resv) (rdev)->asic->copy.blit((rdev), (s), (d), (np), (res… argument
2765 #define radeon_copy_dma(rdev, s, d, np, resv) (rdev)->asic->copy.dma((rdev), (s), (d), (np), (resv)) argument
2766 #define radeon_copy(rdev, s, d, np, resv) (rdev)->asic->copy.copy((rdev), (s), (d), (np), (resv)) argument
2767 #define radeon_copy_blit_ring_index(rdev) (rdev)->asic->copy.blit_ring_index argument
2768 #define radeon_copy_dma_ring_index(rdev) (rdev)->asic->copy.dma_ring_index argument
2769 #define radeon_copy_ring_index(rdev) (rdev)->asic->copy.copy_ring_index argument
2770 #define radeon_get_engine_clock(rdev) (rdev)->asic->pm.get_engine_clock((rdev)) argument
2771 #define radeon_set_engine_clock(rdev, e) (rdev)->asic->pm.set_engine_clock((rdev), (e)) argument
2772 #define radeon_get_memory_clock(rdev) (rdev)->asic->pm.get_memory_clock((rdev)) argument
2773 #define radeon_set_memory_clock(rdev, e) (rdev)->asic->pm.set_memory_clock((rdev), (e)) argument
2774 #define radeon_get_pcie_lanes(rdev) (rdev)->asic->pm.get_pcie_lanes((rdev)) argument
2775 #define radeon_set_pcie_lanes(rdev, l) (rdev)->asic->pm.set_pcie_lanes((rdev), (l)) argument
2776 #define radeon_set_clock_gating(rdev, e) (rdev)->asic->pm.set_clock_gating((rdev), (e)) argument
2777 #define radeon_set_uvd_clocks(rdev, v, d) (rdev)->asic->pm.set_uvd_clocks((rdev), (v), (d)) argument
2778 #define radeon_set_vce_clocks(rdev, ev, ec) (rdev)->asic->pm.set_vce_clocks((rdev), (ev), (ec)) argument
2779 #define radeon_get_temperature(rdev) (rdev)->asic->pm.get_temperature((rdev)) argument
2780 #define radeon_set_surface_reg(rdev, r, f, p, o, s) ((rdev)->asic->surface.set_reg((rdev), (r), (f)… argument
2781 #define radeon_clear_surface_reg(rdev, r) ((rdev)->asic->surface.clear_reg((rdev), (r))) argument
2782 #define radeon_bandwidth_update(rdev) (rdev)->asic->display.bandwidth_update((rdev)) argument
2783 #define radeon_hpd_init(rdev) (rdev)->asic->hpd.init((rdev)) argument
2784 #define radeon_hpd_fini(rdev) (rdev)->asic->hpd.fini((rdev)) argument
2785 #define radeon_hpd_sense(rdev, h) (rdev)->asic->hpd.sense((rdev), (h)) argument
2786 #define radeon_hpd_set_polarity(rdev, h) (rdev)->asic->hpd.set_polarity((rdev), (h)) argument
2787 #define radeon_gui_idle(rdev) (rdev)->asic->gui_idle((rdev)) argument
2788 #define radeon_pm_misc(rdev) (rdev)->asic->pm.misc((rdev)) argument
2789 #define radeon_pm_prepare(rdev) (rdev)->asic->pm.prepare((rdev)) argument
2790 #define radeon_pm_finish(rdev) (rdev)->asic->pm.finish((rdev)) argument
2791 #define radeon_pm_init_profile(rdev) (rdev)->asic->pm.init_profile((rdev)) argument
2792 #define radeon_pm_get_dynpm_state(rdev) (rdev)->asic->pm.get_dynpm_state((rdev)) argument
2793 #define radeon_page_flip(rdev, crtc, base, async) (rdev)->asic->pflip.page_flip((rdev), (crtc), (ba… argument
2794 #define radeon_page_flip_pending(rdev, crtc) (rdev)->asic->pflip.page_flip_pending((rdev), (crtc)) argument
2795 #define radeon_wait_for_vblank(rdev, crtc) (rdev)->asic->display.wait_for_vblank((rdev), (crtc)) argument
2796 #define radeon_mc_wait_for_idle(rdev) (rdev)->asic->mc_wait_for_idle((rdev)) argument
2797 #define radeon_get_xclk(rdev) (rdev)->asic->get_xclk((rdev)) argument
2798 #define radeon_get_gpu_clock_counter(rdev) (rdev)->asic->get_gpu_clock_counter((rdev)) argument
2799 #define radeon_get_allowed_info_register(rdev, r, v) (rdev)->asic->get_allowed_info_register((rdev)… argument
2800 #define radeon_dpm_init(rdev) rdev->asic->dpm.init((rdev)) argument
2801 #define radeon_dpm_setup_asic(rdev) rdev->asic->dpm.setup_asic((rdev)) argument
2802 #define radeon_dpm_enable(rdev) rdev->asic->dpm.enable((rdev)) argument
2803 #define radeon_dpm_late_enable(rdev) rdev->asic->dpm.late_enable((rdev)) argument
2804 #define radeon_dpm_disable(rdev) rdev->asic->dpm.disable((rdev)) argument
2805 #define radeon_dpm_pre_set_power_state(rdev) rdev->asic->dpm.pre_set_power_state((rdev)) argument
2806 #define radeon_dpm_set_power_state(rdev) rdev->asic->dpm.set_power_state((rdev)) argument
2807 #define radeon_dpm_post_set_power_state(rdev) rdev->asic->dpm.post_set_power_state((rdev)) argument
2808 …define radeon_dpm_display_configuration_changed(rdev) rdev->asic->dpm.display_configuration_change… argument
2809 #define radeon_dpm_fini(rdev) rdev->asic->dpm.fini((rdev)) argument
2810 #define radeon_dpm_get_sclk(rdev, l) rdev->asic->dpm.get_sclk((rdev), (l)) argument
2811 #define radeon_dpm_get_mclk(rdev, l) rdev->asic->dpm.get_mclk((rdev), (l)) argument
2812 #define radeon_dpm_print_power_state(rdev, ps) rdev->asic->dpm.print_power_state((rdev), (ps)) argument
2813 …_debugfs_print_current_performance_level(rdev, m) rdev->asic->dpm.debugfs_print_current_performanc… argument
2814 #define radeon_dpm_force_performance_level(rdev, l) rdev->asic->dpm.force_performance_level((rdev),… argument
2815 #define radeon_dpm_vblank_too_short(rdev) rdev->asic->dpm.vblank_too_short((rdev)) argument
2816 #define radeon_dpm_powergate_uvd(rdev, g) rdev->asic->dpm.powergate_uvd((rdev), (g)) argument
2817 #define radeon_dpm_enable_bapm(rdev, e) rdev->asic->dpm.enable_bapm((rdev), (e)) argument
2818 #define radeon_dpm_get_current_sclk(rdev) rdev->asic->dpm.get_current_sclk((rdev)) argument
2819 #define radeon_dpm_get_current_mclk(rdev) rdev->asic->dpm.get_current_mclk((rdev)) argument
2823 extern int radeon_gpu_reset(struct radeon_device *rdev);
2824 extern void radeon_pci_config_reset(struct radeon_device *rdev);
2825 extern void r600_set_bios_scratch_engine_hung(struct radeon_device *rdev, bool hung);
2826 extern void radeon_agp_disable(struct radeon_device *rdev);
2827 extern int radeon_modeset_init(struct radeon_device *rdev);
2828 extern void radeon_modeset_fini(struct radeon_device *rdev);
2829 extern bool radeon_card_posted(struct radeon_device *rdev);
2830 extern void radeon_update_bandwidth_info(struct radeon_device *rdev);
2831 extern void radeon_update_display_priority(struct radeon_device *rdev);
2832 extern bool radeon_boot_test_post_card(struct radeon_device *rdev);
2833 extern void radeon_scratch_init(struct radeon_device *rdev);
2834 extern void radeon_wb_fini(struct radeon_device *rdev);
2835 extern int radeon_wb_init(struct radeon_device *rdev);
2836 extern void radeon_wb_disable(struct radeon_device *rdev);
2837 extern void radeon_surface_init(struct radeon_device *rdev);
2839 extern void radeon_legacy_set_clock_gating(struct radeon_device *rdev, int enable);
2840 extern void radeon_atom_set_clock_gating(struct radeon_device *rdev, int enable);
2843 extern int radeon_ttm_tt_set_userptr(struct radeon_device *rdev,
2846 extern bool radeon_ttm_tt_has_userptr(struct radeon_device *rdev, struct ttm_tt *ttm);
2847 extern bool radeon_ttm_tt_is_readonly(struct radeon_device *rdev, struct ttm_tt *ttm);
2849 extern void radeon_vram_location(struct radeon_device *rdev, struct radeon_mc *mc, u64 base);
2850 extern void radeon_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
2854 extern void radeon_ttm_set_active_vram_size(struct radeon_device *rdev, u64 size);
2855 extern void radeon_program_register_sequence(struct radeon_device *rdev,
2869 int radeon_vm_manager_init(struct radeon_device *rdev);
2870 void radeon_vm_manager_fini(struct radeon_device *rdev);
2871 int radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm);
2872 void radeon_vm_fini(struct radeon_device *rdev, struct radeon_vm *vm);
2873 struct radeon_bo_list *radeon_vm_get_bos(struct radeon_device *rdev,
2876 struct radeon_fence *radeon_vm_grab_id(struct radeon_device *rdev,
2878 void radeon_vm_flush(struct radeon_device *rdev,
2881 void radeon_vm_fence(struct radeon_device *rdev,
2884 uint64_t radeon_vm_map_gart(struct radeon_device *rdev, uint64_t addr);
2885 int radeon_vm_update_page_directory(struct radeon_device *rdev,
2887 int radeon_vm_clear_freed(struct radeon_device *rdev,
2889 int radeon_vm_clear_invalids(struct radeon_device *rdev,
2891 int radeon_vm_bo_update(struct radeon_device *rdev,
2894 void radeon_vm_bo_invalidate(struct radeon_device *rdev,
2898 struct radeon_bo_va *radeon_vm_bo_add(struct radeon_device *rdev,
2901 int radeon_vm_bo_set_addr(struct radeon_device *rdev,
2905 void radeon_vm_bo_rmv(struct radeon_device *rdev,
2910 struct r600_audio_pin *r600_audio_get_pin(struct radeon_device *rdev);
2911 struct r600_audio_pin *dce6_audio_get_pin(struct radeon_device *rdev);
2912 void r600_audio_enable(struct radeon_device *rdev,
2915 void dce6_audio_enable(struct radeon_device *rdev,
2922 int r600_vram_scratch_init(struct radeon_device *rdev);
2923 void r600_vram_scratch_fini(struct radeon_device *rdev);
2952 extern u32 r6xx_remap_render_backend(struct radeon_device *rdev,
2962 extern int ni_init_microcode(struct radeon_device *rdev);
2963 extern int ni_mc_load_microcode(struct radeon_device *rdev);
2967 extern int radeon_acpi_init(struct radeon_device *rdev);
2968 extern void radeon_acpi_fini(struct radeon_device *rdev);
2969 extern bool radeon_acpi_is_pcie_performance_request_supported(struct radeon_device *rdev);
2970 extern int radeon_acpi_pcie_performance_request(struct radeon_device *rdev,
2972 extern int radeon_acpi_pcie_notify_device_ready(struct radeon_device *rdev);
2974 static inline int radeon_acpi_init(struct radeon_device *rdev) { return 0; } in radeon_acpi_init() argument
2975 static inline void radeon_acpi_fini(struct radeon_device *rdev) { } in radeon_acpi_fini() argument
2992 void radeon_irq_kms_set_irq_n_enabled(struct radeon_device *rdev,