• Home
  • Raw
  • Download

Lines Matching refs:rdev

246 bool radeon_get_bios(struct radeon_device *rdev);
256 int radeon_dummy_page_init(struct radeon_device *rdev);
257 void radeon_dummy_page_fini(struct radeon_device *rdev);
282 int radeon_pm_init(struct radeon_device *rdev);
283 int radeon_pm_late_init(struct radeon_device *rdev);
284 void radeon_pm_fini(struct radeon_device *rdev);
285 void radeon_pm_compute_clocks(struct radeon_device *rdev);
286 void radeon_pm_suspend(struct radeon_device *rdev);
287 void radeon_pm_resume(struct radeon_device *rdev);
288 void radeon_combios_get_power_modes(struct radeon_device *rdev);
289 void radeon_atombios_get_power_modes(struct radeon_device *rdev);
290 int radeon_atom_get_clock_dividers(struct radeon_device *rdev,
295 int radeon_atom_get_memory_pll_dividers(struct radeon_device *rdev,
299 void radeon_atom_set_voltage(struct radeon_device *rdev, u16 voltage_level, u8 voltage_type);
300 int radeon_atom_get_voltage_gpio_settings(struct radeon_device *rdev,
303 void radeon_atom_set_engine_dram_timings(struct radeon_device *rdev,
305 int radeon_atom_get_voltage_step(struct radeon_device *rdev,
307 int radeon_atom_get_max_vddc(struct radeon_device *rdev, u8 voltage_type,
309 int radeon_atom_get_leakage_vddc_based_on_leakage_idx(struct radeon_device *rdev,
312 int radeon_atom_get_leakage_id_from_vbios(struct radeon_device *rdev,
314 int radeon_atom_get_leakage_vddc_based_on_leakage_params(struct radeon_device *rdev,
318 int radeon_atom_get_voltage_evv(struct radeon_device *rdev,
321 int radeon_atom_round_to_true_voltage(struct radeon_device *rdev,
325 int radeon_atom_get_min_voltage(struct radeon_device *rdev,
327 int radeon_atom_get_max_voltage(struct radeon_device *rdev,
329 int radeon_atom_get_voltage_table(struct radeon_device *rdev,
332 bool radeon_atom_is_voltage_gpio(struct radeon_device *rdev,
334 int radeon_atom_get_svi2_info(struct radeon_device *rdev,
337 void radeon_atom_update_memory_dll(struct radeon_device *rdev,
339 void radeon_atom_set_ac_timing(struct radeon_device *rdev,
341 int radeon_atom_init_mc_reg_table(struct radeon_device *rdev,
344 int radeon_atom_get_memory_info(struct radeon_device *rdev,
346 int radeon_atom_get_mclk_range_table(struct radeon_device *rdev,
349 int radeon_atom_get_max_vddc(struct radeon_device *rdev, u8 voltage_type,
351 void rs690_pm_info(struct radeon_device *rdev);
360 struct radeon_device *rdev; member
374 struct radeon_device *rdev; member
383 int radeon_fence_driver_start_ring(struct radeon_device *rdev, int ring);
384 int radeon_fence_driver_init(struct radeon_device *rdev);
385 void radeon_fence_driver_fini(struct radeon_device *rdev);
386 void radeon_fence_driver_force_completion(struct radeon_device *rdev, int ring);
387 int radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence **fence, int ring);
388 void radeon_fence_process(struct radeon_device *rdev, int ring);
392 int radeon_fence_wait_next(struct radeon_device *rdev, int ring);
393 int radeon_fence_wait_empty(struct radeon_device *rdev, int ring);
394 int radeon_fence_wait_any(struct radeon_device *rdev,
399 unsigned radeon_fence_count_emitted(struct radeon_device *rdev, int ring);
510 struct radeon_device *rdev; member
521 int radeon_gem_debugfs_init(struct radeon_device *rdev);
579 int radeon_gem_init(struct radeon_device *rdev);
580 void radeon_gem_fini(struct radeon_device *rdev);
581 int radeon_gem_object_create(struct radeon_device *rdev, unsigned long size,
602 int radeon_semaphore_create(struct radeon_device *rdev,
604 bool radeon_semaphore_emit_signal(struct radeon_device *rdev, int ring,
606 bool radeon_semaphore_emit_wait(struct radeon_device *rdev, int ring,
608 void radeon_semaphore_free(struct radeon_device *rdev,
624 int radeon_sync_resv(struct radeon_device *rdev,
628 int radeon_sync_rings(struct radeon_device *rdev,
631 void radeon_sync_free(struct radeon_device *rdev, struct radeon_sync *sync,
662 int radeon_gart_table_ram_alloc(struct radeon_device *rdev);
663 void radeon_gart_table_ram_free(struct radeon_device *rdev);
664 int radeon_gart_table_vram_alloc(struct radeon_device *rdev);
665 void radeon_gart_table_vram_free(struct radeon_device *rdev);
666 int radeon_gart_table_vram_pin(struct radeon_device *rdev);
667 void radeon_gart_table_vram_unpin(struct radeon_device *rdev);
668 int radeon_gart_init(struct radeon_device *rdev);
669 void radeon_gart_fini(struct radeon_device *rdev);
670 void radeon_gart_unbind(struct radeon_device *rdev, unsigned offset,
672 int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
702 bool radeon_combios_sideport_present(struct radeon_device *rdev);
703 bool radeon_atombios_sideport_present(struct radeon_device *rdev);
715 int radeon_scratch_get(struct radeon_device *rdev, uint32_t *reg);
716 void radeon_scratch_free(struct radeon_device *rdev, uint32_t reg);
732 int radeon_doorbell_get(struct radeon_device *rdev, u32 *page);
733 void radeon_doorbell_free(struct radeon_device *rdev, u32 doorbell);
734 void radeon_doorbell_get_kfd_info(struct radeon_device *rdev,
746 struct radeon_device *rdev; member
813 int radeon_irq_kms_init(struct radeon_device *rdev);
814 void radeon_irq_kms_fini(struct radeon_device *rdev);
815 void radeon_irq_kms_sw_irq_get(struct radeon_device *rdev, int ring);
816 bool radeon_irq_kms_sw_irq_get_delayed(struct radeon_device *rdev, int ring);
817 void radeon_irq_kms_sw_irq_put(struct radeon_device *rdev, int ring);
818 void radeon_irq_kms_pflip_irq_get(struct radeon_device *rdev, int crtc);
819 void radeon_irq_kms_pflip_irq_put(struct radeon_device *rdev, int crtc);
820 void radeon_irq_kms_enable_afmt(struct radeon_device *rdev, int block);
821 void radeon_irq_kms_disable_afmt(struct radeon_device *rdev, int block);
822 void radeon_irq_kms_enable_hpd(struct radeon_device *rdev, unsigned hpd_mask);
823 void radeon_irq_kms_disable_hpd(struct radeon_device *rdev, unsigned hpd_mask);
1013 int radeon_ib_get(struct radeon_device *rdev, int ring,
1016 void radeon_ib_free(struct radeon_device *rdev, struct radeon_ib *ib);
1017 int radeon_ib_schedule(struct radeon_device *rdev, struct radeon_ib *ib,
1019 int radeon_ib_pool_init(struct radeon_device *rdev);
1020 void radeon_ib_pool_fini(struct radeon_device *rdev);
1021 int radeon_ib_ring_tests(struct radeon_device *rdev);
1023 bool radeon_ring_supports_scratch_reg(struct radeon_device *rdev,
1025 void radeon_ring_free_size(struct radeon_device *rdev, struct radeon_ring *cp);
1026 int radeon_ring_alloc(struct radeon_device *rdev, struct radeon_ring *cp, unsigned ndw);
1027 int radeon_ring_lock(struct radeon_device *rdev, struct radeon_ring *cp, unsigned ndw);
1028 void radeon_ring_commit(struct radeon_device *rdev, struct radeon_ring *cp,
1030 void radeon_ring_unlock_commit(struct radeon_device *rdev, struct radeon_ring *cp,
1033 void radeon_ring_unlock_undo(struct radeon_device *rdev, struct radeon_ring *cp);
1034 int radeon_ring_test(struct radeon_device *rdev, struct radeon_ring *cp);
1035 void radeon_ring_lockup_update(struct radeon_device *rdev,
1037 bool radeon_ring_test_lockup(struct radeon_device *rdev, struct radeon_ring *ring);
1038 unsigned radeon_ring_backup(struct radeon_device *rdev, struct radeon_ring *ring,
1040 int radeon_ring_restore(struct radeon_device *rdev, struct radeon_ring *ring,
1042 int radeon_ring_init(struct radeon_device *rdev, struct radeon_ring *cp, unsigned ring_size,
1044 void radeon_ring_fini(struct radeon_device *rdev, struct radeon_ring *cp);
1048 void r600_dma_stop(struct radeon_device *rdev);
1049 int r600_dma_resume(struct radeon_device *rdev);
1050 void r600_dma_fini(struct radeon_device *rdev);
1052 void cayman_dma_stop(struct radeon_device *rdev);
1053 int cayman_dma_resume(struct radeon_device *rdev);
1054 void cayman_dma_fini(struct radeon_device *rdev);
1067 struct radeon_device *rdev; member
1126 int radeon_agp_init(struct radeon_device *rdev);
1127 void radeon_agp_resume(struct radeon_device *rdev);
1128 void radeon_agp_suspend(struct radeon_device *rdev);
1129 void radeon_agp_fini(struct radeon_device *rdev);
1593 void radeon_dpm_enable_uvd(struct radeon_device *rdev, bool enable);
1594 void radeon_dpm_enable_vce(struct radeon_device *rdev, bool enable);
1660 int radeon_pm_get_type_index(struct radeon_device *rdev,
1684 int radeon_uvd_init(struct radeon_device *rdev);
1685 void radeon_uvd_fini(struct radeon_device *rdev);
1686 int radeon_uvd_suspend(struct radeon_device *rdev);
1687 int radeon_uvd_resume(struct radeon_device *rdev);
1688 int radeon_uvd_get_create_msg(struct radeon_device *rdev, int ring,
1690 int radeon_uvd_get_destroy_msg(struct radeon_device *rdev, int ring,
1694 void radeon_uvd_free_handles(struct radeon_device *rdev,
1697 void radeon_uvd_note_usage(struct radeon_device *rdev);
1698 int radeon_uvd_calc_upll_dividers(struct radeon_device *rdev,
1707 int radeon_uvd_send_upll_ctlreq(struct radeon_device *rdev,
1727 int radeon_vce_init(struct radeon_device *rdev);
1728 void radeon_vce_fini(struct radeon_device *rdev);
1729 int radeon_vce_suspend(struct radeon_device *rdev);
1730 int radeon_vce_resume(struct radeon_device *rdev);
1731 int radeon_vce_get_create_msg(struct radeon_device *rdev, int ring,
1733 int radeon_vce_get_destroy_msg(struct radeon_device *rdev, int ring,
1735 void radeon_vce_free_handles(struct radeon_device *rdev, struct drm_file *filp);
1736 void radeon_vce_note_usage(struct radeon_device *rdev);
1739 bool radeon_vce_semaphore_emit(struct radeon_device *rdev,
1743 void radeon_vce_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib);
1744 void radeon_vce_fence_emit(struct radeon_device *rdev,
1746 int radeon_vce_ring_test(struct radeon_device *rdev, struct radeon_ring *ring);
1747 int radeon_vce_ib_test(struct radeon_device *rdev, struct radeon_ring *ring);
1772 void radeon_benchmark(struct radeon_device *rdev, int test_number);
1778 void radeon_test_moves(struct radeon_device *rdev);
1779 void radeon_test_ring_sync(struct radeon_device *rdev,
1782 void radeon_test_syncing(struct radeon_device *rdev);
1806 int radeon_debugfs_add_files(struct radeon_device *rdev,
1809 int radeon_debugfs_fence_init(struct radeon_device *rdev);
1816 u32 (*get_rptr)(struct radeon_device *rdev, struct radeon_ring *ring);
1817 u32 (*get_wptr)(struct radeon_device *rdev, struct radeon_ring *ring);
1818 void (*set_wptr)(struct radeon_device *rdev, struct radeon_ring *ring);
1821 int (*ib_parse)(struct radeon_device *rdev, struct radeon_ib *ib);
1825 void (*ib_execute)(struct radeon_device *rdev, struct radeon_ib *ib);
1826 void (*emit_fence)(struct radeon_device *rdev, struct radeon_fence *fence);
1827 void (*hdp_flush)(struct radeon_device *rdev, struct radeon_ring *ring);
1828 bool (*emit_semaphore)(struct radeon_device *rdev, struct radeon_ring *cp,
1830 void (*vm_flush)(struct radeon_device *rdev, struct radeon_ring *ring,
1834 int (*ring_test)(struct radeon_device *rdev, struct radeon_ring *cp);
1835 int (*ib_test)(struct radeon_device *rdev, struct radeon_ring *cp);
1836 bool (*is_lockup)(struct radeon_device *rdev, struct radeon_ring *cp);
1839 void (*ring_start)(struct radeon_device *rdev, struct radeon_ring *cp);
1846 int (*init)(struct radeon_device *rdev);
1847 void (*fini)(struct radeon_device *rdev);
1848 int (*resume)(struct radeon_device *rdev);
1849 int (*suspend)(struct radeon_device *rdev);
1850 void (*vga_set_state)(struct radeon_device *rdev, bool state);
1851 int (*asic_reset)(struct radeon_device *rdev, bool hard);
1853 void (*mmio_hdp_flush)(struct radeon_device *rdev);
1855 bool (*gui_idle)(struct radeon_device *rdev);
1857 int (*mc_wait_for_idle)(struct radeon_device *rdev);
1859 u32 (*get_xclk)(struct radeon_device *rdev);
1861 uint64_t (*get_gpu_clock_counter)(struct radeon_device *rdev);
1863 int (*get_allowed_info_register)(struct radeon_device *rdev, u32 reg, u32 *val);
1866 void (*tlb_flush)(struct radeon_device *rdev);
1868 void (*set_page)(struct radeon_device *rdev, unsigned i,
1872 int (*init)(struct radeon_device *rdev);
1873 void (*fini)(struct radeon_device *rdev);
1874 void (*copy_pages)(struct radeon_device *rdev,
1878 void (*write_pages)(struct radeon_device *rdev,
1883 void (*set_pages)(struct radeon_device *rdev,
1894 int (*set)(struct radeon_device *rdev);
1895 int (*process)(struct radeon_device *rdev);
1900 void (*bandwidth_update)(struct radeon_device *rdev);
1902 u32 (*get_vblank_counter)(struct radeon_device *rdev, int crtc);
1904 void (*wait_for_vblank)(struct radeon_device *rdev, int crtc);
1915 struct radeon_fence *(*blit)(struct radeon_device *rdev,
1921 struct radeon_fence *(*dma)(struct radeon_device *rdev,
1928 struct radeon_fence *(*copy)(struct radeon_device *rdev,
1938 int (*set_reg)(struct radeon_device *rdev, int reg,
1941 void (*clear_reg)(struct radeon_device *rdev, int reg);
1945 void (*init)(struct radeon_device *rdev);
1946 void (*fini)(struct radeon_device *rdev);
1947 bool (*sense)(struct radeon_device *rdev, enum radeon_hpd_id hpd);
1948 void (*set_polarity)(struct radeon_device *rdev, enum radeon_hpd_id hpd);
1952 void (*misc)(struct radeon_device *rdev);
1953 void (*prepare)(struct radeon_device *rdev);
1954 void (*finish)(struct radeon_device *rdev);
1955 void (*init_profile)(struct radeon_device *rdev);
1956 void (*get_dynpm_state)(struct radeon_device *rdev);
1957 uint32_t (*get_engine_clock)(struct radeon_device *rdev);
1958 void (*set_engine_clock)(struct radeon_device *rdev, uint32_t eng_clock);
1959 uint32_t (*get_memory_clock)(struct radeon_device *rdev);
1960 void (*set_memory_clock)(struct radeon_device *rdev, uint32_t mem_clock);
1961 int (*get_pcie_lanes)(struct radeon_device *rdev);
1962 void (*set_pcie_lanes)(struct radeon_device *rdev, int lanes);
1963 void (*set_clock_gating)(struct radeon_device *rdev, int enable);
1964 int (*set_uvd_clocks)(struct radeon_device *rdev, u32 vclk, u32 dclk);
1965 int (*set_vce_clocks)(struct radeon_device *rdev, u32 evclk, u32 ecclk);
1966 int (*get_temperature)(struct radeon_device *rdev);
1970 int (*init)(struct radeon_device *rdev);
1971 void (*setup_asic)(struct radeon_device *rdev);
1972 int (*enable)(struct radeon_device *rdev);
1973 int (*late_enable)(struct radeon_device *rdev);
1974 void (*disable)(struct radeon_device *rdev);
1975 int (*pre_set_power_state)(struct radeon_device *rdev);
1976 int (*set_power_state)(struct radeon_device *rdev);
1977 void (*post_set_power_state)(struct radeon_device *rdev);
1978 void (*display_configuration_changed)(struct radeon_device *rdev);
1979 void (*fini)(struct radeon_device *rdev);
1980 u32 (*get_sclk)(struct radeon_device *rdev, bool low);
1981 u32 (*get_mclk)(struct radeon_device *rdev, bool low);
1982 void (*print_power_state)(struct radeon_device *rdev, struct radeon_ps *ps);
1983 void (*debugfs_print_current_performance_level)(struct radeon_device *rdev, struct seq_file *m);
1984 int (*force_performance_level)(struct radeon_device *rdev, enum radeon_dpm_forced_level level);
1985 bool (*vblank_too_short)(struct radeon_device *rdev);
1986 void (*powergate_uvd)(struct radeon_device *rdev, bool gate);
1987 void (*enable_bapm)(struct radeon_device *rdev, bool enable);
1988 void (*fan_ctrl_set_mode)(struct radeon_device *rdev, u32 mode);
1989 u32 (*fan_ctrl_get_mode)(struct radeon_device *rdev);
1990 int (*set_fan_speed_percent)(struct radeon_device *rdev, u32 speed);
1991 int (*get_fan_speed_percent)(struct radeon_device *rdev, u32 *speed);
1992 u32 (*get_current_sclk)(struct radeon_device *rdev);
1993 u32 (*get_current_mclk)(struct radeon_device *rdev);
1997 void (*page_flip)(struct radeon_device *rdev, int crtc, u64 crtc_base, bool async);
1998 bool (*page_flip_pending)(struct radeon_device *rdev, int crtc);
2209 void radeon_agp_disable(struct radeon_device *rdev);
2210 int radeon_asic_init(struct radeon_device *rdev);
2467 int radeon_device_init(struct radeon_device *rdev,
2471 void radeon_device_fini(struct radeon_device *rdev);
2472 int radeon_gpu_wait_for_idle(struct radeon_device *rdev);
2476 uint32_t r100_mm_rreg_slow(struct radeon_device *rdev, uint32_t reg);
2477 void r100_mm_wreg_slow(struct radeon_device *rdev, uint32_t reg, uint32_t v);
2478 static inline uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg, in r100_mm_rreg() argument
2482 if ((reg < rdev->rmmio_size || reg < RADEON_MIN_MMIO_SIZE) && !always_indirect) in r100_mm_rreg()
2483 return readl(((void __iomem *)rdev->rmmio) + reg); in r100_mm_rreg()
2485 return r100_mm_rreg_slow(rdev, reg); in r100_mm_rreg()
2487 static inline void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v, in r100_mm_wreg() argument
2490 if ((reg < rdev->rmmio_size || reg < RADEON_MIN_MMIO_SIZE) && !always_indirect) in r100_mm_wreg()
2491 writel(v, ((void __iomem *)rdev->rmmio) + reg); in r100_mm_wreg()
2493 r100_mm_wreg_slow(rdev, reg, v); in r100_mm_wreg()
2496 u32 r100_io_rreg(struct radeon_device *rdev, u32 reg);
2497 void r100_io_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2499 u32 cik_mm_rdoorbell(struct radeon_device *rdev, u32 index);
2500 void cik_mm_wdoorbell(struct radeon_device *rdev, u32 index, u32 v);
2520 #define RREG8(reg) readb((rdev->rmmio) + (reg))
2521 #define WREG8(reg, v) writeb(v, (rdev->rmmio) + (reg))
2522 #define RREG16(reg) readw((rdev->rmmio) + (reg))
2523 #define WREG16(reg, v) writew(v, (rdev->rmmio) + (reg))
2524 #define RREG32(reg) r100_mm_rreg(rdev, (reg), false)
2525 #define RREG32_IDX(reg) r100_mm_rreg(rdev, (reg), true)
2527 r100_mm_rreg(rdev, (reg), false))
2528 #define WREG32(reg, v) r100_mm_wreg(rdev, (reg), (v), false)
2529 #define WREG32_IDX(reg, v) r100_mm_wreg(rdev, (reg), (v), true)
2532 #define RREG32_PLL(reg) rdev->pll_rreg(rdev, (reg))
2533 #define WREG32_PLL(reg, v) rdev->pll_wreg(rdev, (reg), (v))
2534 #define RREG32_MC(reg) rdev->mc_rreg(rdev, (reg))
2535 #define WREG32_MC(reg, v) rdev->mc_wreg(rdev, (reg), (v))
2536 #define RREG32_PCIE(reg) rv370_pcie_rreg(rdev, (reg))
2537 #define WREG32_PCIE(reg, v) rv370_pcie_wreg(rdev, (reg), (v))
2538 #define RREG32_PCIE_PORT(reg) rdev->pciep_rreg(rdev, (reg))
2539 #define WREG32_PCIE_PORT(reg, v) rdev->pciep_wreg(rdev, (reg), (v))
2540 #define RREG32_SMC(reg) tn_smc_rreg(rdev, (reg))
2541 #define WREG32_SMC(reg, v) tn_smc_wreg(rdev, (reg), (v))
2542 #define RREG32_RCU(reg) r600_rcu_rreg(rdev, (reg))
2543 #define WREG32_RCU(reg, v) r600_rcu_wreg(rdev, (reg), (v))
2544 #define RREG32_CG(reg) eg_cg_rreg(rdev, (reg))
2545 #define WREG32_CG(reg, v) eg_cg_wreg(rdev, (reg), (v))
2546 #define RREG32_PIF_PHY0(reg) eg_pif_phy0_rreg(rdev, (reg))
2547 #define WREG32_PIF_PHY0(reg, v) eg_pif_phy0_wreg(rdev, (reg), (v))
2548 #define RREG32_PIF_PHY1(reg) eg_pif_phy1_rreg(rdev, (reg))
2549 #define WREG32_PIF_PHY1(reg, v) eg_pif_phy1_wreg(rdev, (reg), (v))
2550 #define RREG32_UVD_CTX(reg) r600_uvd_ctx_rreg(rdev, (reg))
2551 #define WREG32_UVD_CTX(reg, v) r600_uvd_ctx_wreg(rdev, (reg), (v))
2552 #define RREG32_DIDT(reg) cik_didt_rreg(rdev, (reg))
2553 #define WREG32_DIDT(reg, v) cik_didt_wreg(rdev, (reg), (v))
2577 #define DREG32_SYS(sqf, rdev, reg) seq_printf((sqf), #reg " : 0x%08X\n", r100_mm_rreg((rdev), (reg)… argument
2578 #define RREG32_IO(reg) r100_io_rreg(rdev, (reg))
2579 #define WREG32_IO(reg, v) r100_io_wreg(rdev, (reg), (v))
2581 #define RDOORBELL32(index) cik_mm_rdoorbell(rdev, (index))
2582 #define WDOORBELL32(index, v) cik_mm_wdoorbell(rdev, (index), (v))
2592 uint32_t rv370_pcie_rreg(struct radeon_device *rdev, uint32_t reg);
2593 void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
2594 u32 tn_smc_rreg(struct radeon_device *rdev, u32 reg);
2595 void tn_smc_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2596 u32 r600_rcu_rreg(struct radeon_device *rdev, u32 reg);
2597 void r600_rcu_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2598 u32 eg_cg_rreg(struct radeon_device *rdev, u32 reg);
2599 void eg_cg_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2600 u32 eg_pif_phy0_rreg(struct radeon_device *rdev, u32 reg);
2601 void eg_pif_phy0_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2602 u32 eg_pif_phy1_rreg(struct radeon_device *rdev, u32 reg);
2603 void eg_pif_phy1_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2604 u32 r600_uvd_ctx_rreg(struct radeon_device *rdev, u32 reg);
2605 void r600_uvd_ctx_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2606 u32 cik_didt_rreg(struct radeon_device *rdev, u32 reg);
2607 void cik_didt_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2609 void r100_pll_errata_after_index(struct radeon_device *rdev);
2615 #define ASIC_IS_RN50(rdev) ((rdev->pdev->device == 0x515e) || \ argument
2616 (rdev->pdev->device == 0x5969))
2617 #define ASIC_IS_RV100(rdev) ((rdev->family == CHIP_RV100) || \ argument
2618 (rdev->family == CHIP_RV200) || \
2619 (rdev->family == CHIP_RS100) || \
2620 (rdev->family == CHIP_RS200) || \
2621 (rdev->family == CHIP_RV250) || \
2622 (rdev->family == CHIP_RV280) || \
2623 (rdev->family == CHIP_RS300))
2624 #define ASIC_IS_R300(rdev) ((rdev->family == CHIP_R300) || \ argument
2625 (rdev->family == CHIP_RV350) || \
2626 (rdev->family == CHIP_R350) || \
2627 (rdev->family == CHIP_RV380) || \
2628 (rdev->family == CHIP_R420) || \
2629 (rdev->family == CHIP_R423) || \
2630 (rdev->family == CHIP_RV410) || \
2631 (rdev->family == CHIP_RS400) || \
2632 (rdev->family == CHIP_RS480))
2633 #define ASIC_IS_X2(rdev) ((rdev->ddev->pdev->device == 0x9441) || \ argument
2634 (rdev->ddev->pdev->device == 0x9443) || \
2635 (rdev->ddev->pdev->device == 0x944B) || \
2636 (rdev->ddev->pdev->device == 0x9506) || \
2637 (rdev->ddev->pdev->device == 0x9509) || \
2638 (rdev->ddev->pdev->device == 0x950F) || \
2639 (rdev->ddev->pdev->device == 0x689C) || \
2640 (rdev->ddev->pdev->device == 0x689D))
2641 #define ASIC_IS_AVIVO(rdev) ((rdev->family >= CHIP_RS600)) argument
2642 #define ASIC_IS_DCE2(rdev) ((rdev->family == CHIP_RS600) || \ argument
2643 (rdev->family == CHIP_RS690) || \
2644 (rdev->family == CHIP_RS740) || \
2645 (rdev->family >= CHIP_R600))
2646 #define ASIC_IS_DCE3(rdev) ((rdev->family >= CHIP_RV620)) argument
2647 #define ASIC_IS_DCE32(rdev) ((rdev->family >= CHIP_RV730)) argument
2648 #define ASIC_IS_DCE4(rdev) ((rdev->family >= CHIP_CEDAR)) argument
2649 #define ASIC_IS_DCE41(rdev) ((rdev->family >= CHIP_PALM) && \ argument
2650 (rdev->flags & RADEON_IS_IGP))
2651 #define ASIC_IS_DCE5(rdev) ((rdev->family >= CHIP_BARTS)) argument
2652 #define ASIC_IS_DCE6(rdev) ((rdev->family >= CHIP_ARUBA)) argument
2653 #define ASIC_IS_DCE61(rdev) ((rdev->family >= CHIP_ARUBA) && \ argument
2654 (rdev->flags & RADEON_IS_IGP))
2655 #define ASIC_IS_DCE64(rdev) ((rdev->family == CHIP_OLAND)) argument
2656 #define ASIC_IS_NODCE(rdev) ((rdev->family == CHIP_HAINAN)) argument
2657 #define ASIC_IS_DCE8(rdev) ((rdev->family >= CHIP_BONAIRE)) argument
2658 #define ASIC_IS_DCE81(rdev) ((rdev->family == CHIP_KAVERI)) argument
2659 #define ASIC_IS_DCE82(rdev) ((rdev->family == CHIP_BONAIRE)) argument
2660 #define ASIC_IS_DCE83(rdev) ((rdev->family == CHIP_KABINI) || \ argument
2661 (rdev->family == CHIP_MULLINS))
2663 #define ASIC_IS_LOMBOK(rdev) ((rdev->ddev->pdev->device == 0x6849) || \ argument
2664 (rdev->ddev->pdev->device == 0x6850) || \
2665 (rdev->ddev->pdev->device == 0x6858) || \
2666 (rdev->ddev->pdev->device == 0x6859) || \
2667 (rdev->ddev->pdev->device == 0x6840) || \
2668 (rdev->ddev->pdev->device == 0x6841) || \
2669 (rdev->ddev->pdev->device == 0x6842) || \
2670 (rdev->ddev->pdev->device == 0x6843))
2675 #define RBIOS8(i) (rdev->bios[i])
2679 int radeon_combios_init(struct radeon_device *rdev);
2680 void radeon_combios_fini(struct radeon_device *rdev);
2681 int radeon_atombios_init(struct radeon_device *rdev);
2682 void radeon_atombios_fini(struct radeon_device *rdev);
2711 #define radeon_init(rdev) (rdev)->asic->init((rdev)) argument
2712 #define radeon_fini(rdev) (rdev)->asic->fini((rdev)) argument
2713 #define radeon_resume(rdev) (rdev)->asic->resume((rdev)) argument
2714 #define radeon_suspend(rdev) (rdev)->asic->suspend((rdev)) argument
2715 #define radeon_cs_parse(rdev, r, p) (rdev)->asic->ring[(r)]->cs_parse((p)) argument
2716 #define radeon_vga_set_state(rdev, state) (rdev)->asic->vga_set_state((rdev), (state)) argument
2717 #define radeon_asic_reset(rdev) (rdev)->asic->asic_reset((rdev), false) argument
2718 #define radeon_gart_tlb_flush(rdev) (rdev)->asic->gart.tlb_flush((rdev)) argument
2719 #define radeon_gart_get_page_entry(a, f) (rdev)->asic->gart.get_page_entry((a), (f))
2720 #define radeon_gart_set_page(rdev, i, e) (rdev)->asic->gart.set_page((rdev), (i), (e)) argument
2721 #define radeon_asic_vm_init(rdev) (rdev)->asic->vm.init((rdev)) argument
2722 #define radeon_asic_vm_fini(rdev) (rdev)->asic->vm.fini((rdev)) argument
2723 #define radeon_asic_vm_copy_pages(rdev, ib, pe, src, count) ((rdev)->asic->vm.copy_pages((rdev), (i… argument
2724 #define radeon_asic_vm_write_pages(rdev, ib, pe, addr, count, incr, flags) ((rdev)->asic->vm.write_… argument
2725 #define radeon_asic_vm_set_pages(rdev, ib, pe, addr, count, incr, flags) ((rdev)->asic->vm.set_page… argument
2726 #define radeon_asic_vm_pad_ib(rdev, ib) ((rdev)->asic->vm.pad_ib((ib))) argument
2727 #define radeon_ring_start(rdev, r, cp) (rdev)->asic->ring[(r)]->ring_start((rdev), (cp)) argument
2728 #define radeon_ring_test(rdev, r, cp) (rdev)->asic->ring[(r)]->ring_test((rdev), (cp)) argument
2729 #define radeon_ib_test(rdev, r, cp) (rdev)->asic->ring[(r)]->ib_test((rdev), (cp)) argument
2730 #define radeon_ring_ib_execute(rdev, r, ib) (rdev)->asic->ring[(r)]->ib_execute((rdev), (ib)) argument
2731 #define radeon_ring_ib_parse(rdev, r, ib) (rdev)->asic->ring[(r)]->ib_parse((rdev), (ib)) argument
2732 #define radeon_ring_is_lockup(rdev, r, cp) (rdev)->asic->ring[(r)]->is_lockup((rdev), (cp)) argument
2733 #define radeon_ring_vm_flush(rdev, r, vm_id, pd_addr) (rdev)->asic->ring[(r)->idx]->vm_flush((rdev)… argument
2734 #define radeon_ring_get_rptr(rdev, r) (rdev)->asic->ring[(r)->idx]->get_rptr((rdev), (r)) argument
2735 #define radeon_ring_get_wptr(rdev, r) (rdev)->asic->ring[(r)->idx]->get_wptr((rdev), (r)) argument
2736 #define radeon_ring_set_wptr(rdev, r) (rdev)->asic->ring[(r)->idx]->set_wptr((rdev), (r)) argument
2737 #define radeon_irq_set(rdev) (rdev)->asic->irq.set((rdev)) argument
2738 #define radeon_irq_process(rdev) (rdev)->asic->irq.process((rdev)) argument
2739 #define radeon_get_vblank_counter(rdev, crtc) (rdev)->asic->display.get_vblank_counter((rdev), (crt… argument
2740 #define radeon_set_backlight_level(rdev, e, l) (rdev)->asic->display.set_backlight_level((e), (l)) argument
2741 #define radeon_get_backlight_level(rdev, e) (rdev)->asic->display.get_backlight_level((e)) argument
2742 #define radeon_hdmi_enable(rdev, e, b) (rdev)->asic->display.hdmi_enable((e), (b)) argument
2743 #define radeon_hdmi_setmode(rdev, e, m) (rdev)->asic->display.hdmi_setmode((e), (m)) argument
2744 #define radeon_fence_ring_emit(rdev, r, fence) (rdev)->asic->ring[(r)]->emit_fence((rdev), (fence)) argument
2745 #define radeon_semaphore_ring_emit(rdev, r, cp, semaphore, emit_wait) (rdev)->asic->ring[(r)]->emit… argument
2746 #define radeon_copy_blit(rdev, s, d, np, resv) (rdev)->asic->copy.blit((rdev), (s), (d), (np), (res… argument
2747 #define radeon_copy_dma(rdev, s, d, np, resv) (rdev)->asic->copy.dma((rdev), (s), (d), (np), (resv)) argument
2748 #define radeon_copy(rdev, s, d, np, resv) (rdev)->asic->copy.copy((rdev), (s), (d), (np), (resv)) argument
2749 #define radeon_copy_blit_ring_index(rdev) (rdev)->asic->copy.blit_ring_index argument
2750 #define radeon_copy_dma_ring_index(rdev) (rdev)->asic->copy.dma_ring_index argument
2751 #define radeon_copy_ring_index(rdev) (rdev)->asic->copy.copy_ring_index argument
2752 #define radeon_get_engine_clock(rdev) (rdev)->asic->pm.get_engine_clock((rdev)) argument
2753 #define radeon_set_engine_clock(rdev, e) (rdev)->asic->pm.set_engine_clock((rdev), (e)) argument
2754 #define radeon_get_memory_clock(rdev) (rdev)->asic->pm.get_memory_clock((rdev)) argument
2755 #define radeon_set_memory_clock(rdev, e) (rdev)->asic->pm.set_memory_clock((rdev), (e)) argument
2756 #define radeon_get_pcie_lanes(rdev) (rdev)->asic->pm.get_pcie_lanes((rdev)) argument
2757 #define radeon_set_pcie_lanes(rdev, l) (rdev)->asic->pm.set_pcie_lanes((rdev), (l)) argument
2758 #define radeon_set_clock_gating(rdev, e) (rdev)->asic->pm.set_clock_gating((rdev), (e)) argument
2759 #define radeon_set_uvd_clocks(rdev, v, d) (rdev)->asic->pm.set_uvd_clocks((rdev), (v), (d)) argument
2760 #define radeon_set_vce_clocks(rdev, ev, ec) (rdev)->asic->pm.set_vce_clocks((rdev), (ev), (ec)) argument
2761 #define radeon_get_temperature(rdev) (rdev)->asic->pm.get_temperature((rdev)) argument
2762 #define radeon_set_surface_reg(rdev, r, f, p, o, s) ((rdev)->asic->surface.set_reg((rdev), (r), (f)… argument
2763 #define radeon_clear_surface_reg(rdev, r) ((rdev)->asic->surface.clear_reg((rdev), (r))) argument
2764 #define radeon_bandwidth_update(rdev) (rdev)->asic->display.bandwidth_update((rdev)) argument
2765 #define radeon_hpd_init(rdev) (rdev)->asic->hpd.init((rdev)) argument
2766 #define radeon_hpd_fini(rdev) (rdev)->asic->hpd.fini((rdev)) argument
2767 #define radeon_hpd_sense(rdev, h) (rdev)->asic->hpd.sense((rdev), (h)) argument
2768 #define radeon_hpd_set_polarity(rdev, h) (rdev)->asic->hpd.set_polarity((rdev), (h)) argument
2769 #define radeon_gui_idle(rdev) (rdev)->asic->gui_idle((rdev)) argument
2770 #define radeon_pm_misc(rdev) (rdev)->asic->pm.misc((rdev)) argument
2771 #define radeon_pm_prepare(rdev) (rdev)->asic->pm.prepare((rdev)) argument
2772 #define radeon_pm_finish(rdev) (rdev)->asic->pm.finish((rdev)) argument
2773 #define radeon_pm_init_profile(rdev) (rdev)->asic->pm.init_profile((rdev)) argument
2774 #define radeon_pm_get_dynpm_state(rdev) (rdev)->asic->pm.get_dynpm_state((rdev)) argument
2775 #define radeon_page_flip(rdev, crtc, base, async) (rdev)->asic->pflip.page_flip((rdev), (crtc), (ba… argument
2776 #define radeon_page_flip_pending(rdev, crtc) (rdev)->asic->pflip.page_flip_pending((rdev), (crtc)) argument
2777 #define radeon_wait_for_vblank(rdev, crtc) (rdev)->asic->display.wait_for_vblank((rdev), (crtc)) argument
2778 #define radeon_mc_wait_for_idle(rdev) (rdev)->asic->mc_wait_for_idle((rdev)) argument
2779 #define radeon_get_xclk(rdev) (rdev)->asic->get_xclk((rdev)) argument
2780 #define radeon_get_gpu_clock_counter(rdev) (rdev)->asic->get_gpu_clock_counter((rdev)) argument
2781 #define radeon_get_allowed_info_register(rdev, r, v) (rdev)->asic->get_allowed_info_register((rdev)… argument
2782 #define radeon_dpm_init(rdev) rdev->asic->dpm.init((rdev)) argument
2783 #define radeon_dpm_setup_asic(rdev) rdev->asic->dpm.setup_asic((rdev)) argument
2784 #define radeon_dpm_enable(rdev) rdev->asic->dpm.enable((rdev)) argument
2785 #define radeon_dpm_late_enable(rdev) rdev->asic->dpm.late_enable((rdev)) argument
2786 #define radeon_dpm_disable(rdev) rdev->asic->dpm.disable((rdev)) argument
2787 #define radeon_dpm_pre_set_power_state(rdev) rdev->asic->dpm.pre_set_power_state((rdev)) argument
2788 #define radeon_dpm_set_power_state(rdev) rdev->asic->dpm.set_power_state((rdev)) argument
2789 #define radeon_dpm_post_set_power_state(rdev) rdev->asic->dpm.post_set_power_state((rdev)) argument
2790 …define radeon_dpm_display_configuration_changed(rdev) rdev->asic->dpm.display_configuration_change… argument
2791 #define radeon_dpm_fini(rdev) rdev->asic->dpm.fini((rdev)) argument
2792 #define radeon_dpm_get_sclk(rdev, l) rdev->asic->dpm.get_sclk((rdev), (l)) argument
2793 #define radeon_dpm_get_mclk(rdev, l) rdev->asic->dpm.get_mclk((rdev), (l)) argument
2794 #define radeon_dpm_print_power_state(rdev, ps) rdev->asic->dpm.print_power_state((rdev), (ps)) argument
2795 …_debugfs_print_current_performance_level(rdev, m) rdev->asic->dpm.debugfs_print_current_performanc… argument
2796 #define radeon_dpm_force_performance_level(rdev, l) rdev->asic->dpm.force_performance_level((rdev),… argument
2797 #define radeon_dpm_vblank_too_short(rdev) rdev->asic->dpm.vblank_too_short((rdev)) argument
2798 #define radeon_dpm_powergate_uvd(rdev, g) rdev->asic->dpm.powergate_uvd((rdev), (g)) argument
2799 #define radeon_dpm_enable_bapm(rdev, e) rdev->asic->dpm.enable_bapm((rdev), (e)) argument
2800 #define radeon_dpm_get_current_sclk(rdev) rdev->asic->dpm.get_current_sclk((rdev)) argument
2801 #define radeon_dpm_get_current_mclk(rdev) rdev->asic->dpm.get_current_mclk((rdev)) argument
2805 extern int radeon_gpu_reset(struct radeon_device *rdev);
2806 extern void radeon_pci_config_reset(struct radeon_device *rdev);
2807 extern void r600_set_bios_scratch_engine_hung(struct radeon_device *rdev, bool hung);
2808 extern void radeon_agp_disable(struct radeon_device *rdev);
2809 extern int radeon_modeset_init(struct radeon_device *rdev);
2810 extern void radeon_modeset_fini(struct radeon_device *rdev);
2811 extern bool radeon_card_posted(struct radeon_device *rdev);
2812 extern void radeon_update_bandwidth_info(struct radeon_device *rdev);
2813 extern void radeon_update_display_priority(struct radeon_device *rdev);
2814 extern bool radeon_boot_test_post_card(struct radeon_device *rdev);
2815 extern void radeon_scratch_init(struct radeon_device *rdev);
2816 extern void radeon_wb_fini(struct radeon_device *rdev);
2817 extern int radeon_wb_init(struct radeon_device *rdev);
2818 extern void radeon_wb_disable(struct radeon_device *rdev);
2819 extern void radeon_surface_init(struct radeon_device *rdev);
2821 extern void radeon_legacy_set_clock_gating(struct radeon_device *rdev, int enable);
2822 extern void radeon_atom_set_clock_gating(struct radeon_device *rdev, int enable);
2829 extern void radeon_vram_location(struct radeon_device *rdev, struct radeon_mc *mc, u64 base);
2830 extern void radeon_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
2834 extern void radeon_ttm_set_active_vram_size(struct radeon_device *rdev, u64 size);
2835 extern void radeon_program_register_sequence(struct radeon_device *rdev,
2842 int radeon_vm_manager_init(struct radeon_device *rdev);
2843 void radeon_vm_manager_fini(struct radeon_device *rdev);
2844 int radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm);
2845 void radeon_vm_fini(struct radeon_device *rdev, struct radeon_vm *vm);
2846 struct radeon_bo_list *radeon_vm_get_bos(struct radeon_device *rdev,
2849 struct radeon_fence *radeon_vm_grab_id(struct radeon_device *rdev,
2851 void radeon_vm_flush(struct radeon_device *rdev,
2854 void radeon_vm_fence(struct radeon_device *rdev,
2857 uint64_t radeon_vm_map_gart(struct radeon_device *rdev, uint64_t addr);
2858 int radeon_vm_update_page_directory(struct radeon_device *rdev,
2860 int radeon_vm_clear_freed(struct radeon_device *rdev,
2862 int radeon_vm_clear_invalids(struct radeon_device *rdev,
2864 int radeon_vm_bo_update(struct radeon_device *rdev,
2867 void radeon_vm_bo_invalidate(struct radeon_device *rdev,
2871 struct radeon_bo_va *radeon_vm_bo_add(struct radeon_device *rdev,
2874 int radeon_vm_bo_set_addr(struct radeon_device *rdev,
2878 void radeon_vm_bo_rmv(struct radeon_device *rdev,
2883 struct r600_audio_pin *r600_audio_get_pin(struct radeon_device *rdev);
2884 struct r600_audio_pin *dce6_audio_get_pin(struct radeon_device *rdev);
2885 void r600_audio_enable(struct radeon_device *rdev,
2888 void dce6_audio_enable(struct radeon_device *rdev,
2895 int r600_vram_scratch_init(struct radeon_device *rdev);
2896 void r600_vram_scratch_fini(struct radeon_device *rdev);
2927 extern u32 r6xx_remap_render_backend(struct radeon_device *rdev,
2937 extern int ni_init_microcode(struct radeon_device *rdev);
2938 extern int ni_mc_load_microcode(struct radeon_device *rdev);
2942 extern int radeon_acpi_init(struct radeon_device *rdev);
2943 extern void radeon_acpi_fini(struct radeon_device *rdev);
2944 extern bool radeon_acpi_is_pcie_performance_request_supported(struct radeon_device *rdev);
2945 extern int radeon_acpi_pcie_performance_request(struct radeon_device *rdev,
2947 extern int radeon_acpi_pcie_notify_device_ready(struct radeon_device *rdev);
2949 static inline int radeon_acpi_init(struct radeon_device *rdev) { return 0; } in radeon_acpi_init() argument
2950 static inline void radeon_acpi_fini(struct radeon_device *rdev) { } in radeon_acpi_fini() argument
2967 void radeon_irq_kms_set_irq_n_enabled(struct radeon_device *rdev,