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
532 int radeon_align_pitch(struct radeon_device *rdev, int width, int cpp, bool tiled);
534 int radeon_gem_init(struct radeon_device *rdev);
535 void radeon_gem_fini(struct radeon_device *rdev);
536 int radeon_gem_object_create(struct radeon_device *rdev, unsigned long size,
557 int radeon_semaphore_create(struct radeon_device *rdev,
559 bool radeon_semaphore_emit_signal(struct radeon_device *rdev, int ring,
561 bool radeon_semaphore_emit_wait(struct radeon_device *rdev, int ring,
563 void radeon_semaphore_free(struct radeon_device *rdev,
579 int radeon_sync_resv(struct radeon_device *rdev,
583 int radeon_sync_rings(struct radeon_device *rdev,
586 void radeon_sync_free(struct radeon_device *rdev, struct radeon_sync *sync,
617 int radeon_gart_table_ram_alloc(struct radeon_device *rdev);
618 void radeon_gart_table_ram_free(struct radeon_device *rdev);
619 int radeon_gart_table_vram_alloc(struct radeon_device *rdev);
620 void radeon_gart_table_vram_free(struct radeon_device *rdev);
621 int radeon_gart_table_vram_pin(struct radeon_device *rdev);
622 void radeon_gart_table_vram_unpin(struct radeon_device *rdev);
623 int radeon_gart_init(struct radeon_device *rdev);
624 void radeon_gart_fini(struct radeon_device *rdev);
625 void radeon_gart_unbind(struct radeon_device *rdev, unsigned offset,
627 int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
657 bool radeon_combios_sideport_present(struct radeon_device *rdev);
658 bool radeon_atombios_sideport_present(struct radeon_device *rdev);
670 int radeon_scratch_get(struct radeon_device *rdev, uint32_t *reg);
671 void radeon_scratch_free(struct radeon_device *rdev, uint32_t reg);
687 int radeon_doorbell_get(struct radeon_device *rdev, u32 *page);
688 void radeon_doorbell_free(struct radeon_device *rdev, u32 doorbell);
697 struct radeon_device *rdev; member
764 int radeon_irq_kms_init(struct radeon_device *rdev);
765 void radeon_irq_kms_fini(struct radeon_device *rdev);
766 void radeon_irq_kms_sw_irq_get(struct radeon_device *rdev, int ring);
767 bool radeon_irq_kms_sw_irq_get_delayed(struct radeon_device *rdev, int ring);
768 void radeon_irq_kms_sw_irq_put(struct radeon_device *rdev, int ring);
769 void radeon_irq_kms_pflip_irq_get(struct radeon_device *rdev, int crtc);
770 void radeon_irq_kms_pflip_irq_put(struct radeon_device *rdev, int crtc);
771 void radeon_irq_kms_enable_afmt(struct radeon_device *rdev, int block);
772 void radeon_irq_kms_disable_afmt(struct radeon_device *rdev, int block);
773 void radeon_irq_kms_enable_hpd(struct radeon_device *rdev, unsigned hpd_mask);
774 void radeon_irq_kms_disable_hpd(struct radeon_device *rdev, unsigned hpd_mask);
793 struct radeon_device *rdev; member
965 int radeon_ib_get(struct radeon_device *rdev, int ring,
968 void radeon_ib_free(struct radeon_device *rdev, struct radeon_ib *ib);
969 int radeon_ib_schedule(struct radeon_device *rdev, struct radeon_ib *ib,
971 int radeon_ib_pool_init(struct radeon_device *rdev);
972 void radeon_ib_pool_fini(struct radeon_device *rdev);
973 int radeon_ib_ring_tests(struct radeon_device *rdev);
975 bool radeon_ring_supports_scratch_reg(struct radeon_device *rdev,
977 void radeon_ring_free_size(struct radeon_device *rdev, struct radeon_ring *cp);
978 int radeon_ring_alloc(struct radeon_device *rdev, struct radeon_ring *cp, unsigned ndw);
979 int radeon_ring_lock(struct radeon_device *rdev, struct radeon_ring *cp, unsigned ndw);
980 void radeon_ring_commit(struct radeon_device *rdev, struct radeon_ring *cp,
982 void radeon_ring_unlock_commit(struct radeon_device *rdev, struct radeon_ring *cp,
985 void radeon_ring_unlock_undo(struct radeon_device *rdev, struct radeon_ring *cp);
986 int radeon_ring_test(struct radeon_device *rdev, struct radeon_ring *cp);
987 void radeon_ring_lockup_update(struct radeon_device *rdev,
989 bool radeon_ring_test_lockup(struct radeon_device *rdev, struct radeon_ring *ring);
990 unsigned radeon_ring_backup(struct radeon_device *rdev, struct radeon_ring *ring,
992 int radeon_ring_restore(struct radeon_device *rdev, struct radeon_ring *ring,
994 int radeon_ring_init(struct radeon_device *rdev, struct radeon_ring *cp, unsigned ring_size,
996 void radeon_ring_fini(struct radeon_device *rdev, struct radeon_ring *cp);
1000 void r600_dma_stop(struct radeon_device *rdev);
1001 int r600_dma_resume(struct radeon_device *rdev);
1002 void r600_dma_fini(struct radeon_device *rdev);
1004 void cayman_dma_stop(struct radeon_device *rdev);
1005 int cayman_dma_resume(struct radeon_device *rdev);
1006 void cayman_dma_fini(struct radeon_device *rdev);
1019 struct radeon_device *rdev; member
1115 int radeon_agp_init(struct radeon_device *rdev);
1116 void radeon_agp_resume(struct radeon_device *rdev);
1117 void radeon_agp_suspend(struct radeon_device *rdev);
1118 void radeon_agp_fini(struct radeon_device *rdev);
1581 void radeon_dpm_enable_uvd(struct radeon_device *rdev, bool enable);
1582 void radeon_dpm_enable_vce(struct radeon_device *rdev, bool enable);
1652 int radeon_pm_get_type_index(struct radeon_device *rdev,
1676 int radeon_uvd_init(struct radeon_device *rdev);
1677 void radeon_uvd_fini(struct radeon_device *rdev);
1678 int radeon_uvd_suspend(struct radeon_device *rdev);
1679 int radeon_uvd_resume(struct radeon_device *rdev);
1680 int radeon_uvd_get_create_msg(struct radeon_device *rdev, int ring,
1682 int radeon_uvd_get_destroy_msg(struct radeon_device *rdev, int ring,
1686 void radeon_uvd_free_handles(struct radeon_device *rdev,
1689 void radeon_uvd_note_usage(struct radeon_device *rdev);
1690 int radeon_uvd_calc_upll_dividers(struct radeon_device *rdev,
1699 int radeon_uvd_send_upll_ctlreq(struct radeon_device *rdev,
1719 int radeon_vce_init(struct radeon_device *rdev);
1720 void radeon_vce_fini(struct radeon_device *rdev);
1721 int radeon_vce_suspend(struct radeon_device *rdev);
1722 int radeon_vce_resume(struct radeon_device *rdev);
1723 int radeon_vce_get_create_msg(struct radeon_device *rdev, int ring,
1725 int radeon_vce_get_destroy_msg(struct radeon_device *rdev, int ring,
1727 void radeon_vce_free_handles(struct radeon_device *rdev, struct drm_file *filp);
1728 void radeon_vce_note_usage(struct radeon_device *rdev);
1731 bool radeon_vce_semaphore_emit(struct radeon_device *rdev,
1735 void radeon_vce_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib);
1736 void radeon_vce_fence_emit(struct radeon_device *rdev,
1738 int radeon_vce_ring_test(struct radeon_device *rdev, struct radeon_ring *ring);
1739 int radeon_vce_ib_test(struct radeon_device *rdev, struct radeon_ring *ring);
1767 void radeon_benchmark(struct radeon_device *rdev, int test_number);
1773 void radeon_test_moves(struct radeon_device *rdev);
1774 void radeon_test_ring_sync(struct radeon_device *rdev,
1777 void radeon_test_syncing(struct radeon_device *rdev);
1796 void radeon_debugfs_fence_init(struct radeon_device *rdev);
1797 void radeon_gem_debugfs_init(struct radeon_device *rdev);
1804 u32 (*get_rptr)(struct radeon_device *rdev, struct radeon_ring *ring);
1805 u32 (*get_wptr)(struct radeon_device *rdev, struct radeon_ring *ring);
1806 void (*set_wptr)(struct radeon_device *rdev, struct radeon_ring *ring);
1809 int (*ib_parse)(struct radeon_device *rdev, struct radeon_ib *ib);
1813 void (*ib_execute)(struct radeon_device *rdev, struct radeon_ib *ib);
1814 void (*emit_fence)(struct radeon_device *rdev, struct radeon_fence *fence);
1815 void (*hdp_flush)(struct radeon_device *rdev, struct radeon_ring *ring);
1816 bool (*emit_semaphore)(struct radeon_device *rdev, struct radeon_ring *cp,
1818 void (*vm_flush)(struct radeon_device *rdev, struct radeon_ring *ring,
1822 int (*ring_test)(struct radeon_device *rdev, struct radeon_ring *cp);
1823 int (*ib_test)(struct radeon_device *rdev, struct radeon_ring *cp);
1824 bool (*is_lockup)(struct radeon_device *rdev, struct radeon_ring *cp);
1827 void (*ring_start)(struct radeon_device *rdev, struct radeon_ring *cp);
1834 int (*init)(struct radeon_device *rdev);
1835 void (*fini)(struct radeon_device *rdev);
1836 int (*resume)(struct radeon_device *rdev);
1837 int (*suspend)(struct radeon_device *rdev);
1838 void (*vga_set_state)(struct radeon_device *rdev, bool state);
1839 int (*asic_reset)(struct radeon_device *rdev, bool hard);
1841 void (*mmio_hdp_flush)(struct radeon_device *rdev);
1843 bool (*gui_idle)(struct radeon_device *rdev);
1845 int (*mc_wait_for_idle)(struct radeon_device *rdev);
1847 u32 (*get_xclk)(struct radeon_device *rdev);
1849 uint64_t (*get_gpu_clock_counter)(struct radeon_device *rdev);
1851 int (*get_allowed_info_register)(struct radeon_device *rdev, u32 reg, u32 *val);
1854 void (*tlb_flush)(struct radeon_device *rdev);
1856 void (*set_page)(struct radeon_device *rdev, unsigned i,
1860 int (*init)(struct radeon_device *rdev);
1861 void (*fini)(struct radeon_device *rdev);
1862 void (*copy_pages)(struct radeon_device *rdev,
1866 void (*write_pages)(struct radeon_device *rdev,
1871 void (*set_pages)(struct radeon_device *rdev,
1882 int (*set)(struct radeon_device *rdev);
1883 int (*process)(struct radeon_device *rdev);
1888 void (*bandwidth_update)(struct radeon_device *rdev);
1890 u32 (*get_vblank_counter)(struct radeon_device *rdev, int crtc);
1892 void (*wait_for_vblank)(struct radeon_device *rdev, int crtc);
1903 struct radeon_fence *(*blit)(struct radeon_device *rdev,
1909 struct radeon_fence *(*dma)(struct radeon_device *rdev,
1916 struct radeon_fence *(*copy)(struct radeon_device *rdev,
1926 int (*set_reg)(struct radeon_device *rdev, int reg,
1929 void (*clear_reg)(struct radeon_device *rdev, int reg);
1933 void (*init)(struct radeon_device *rdev);
1934 void (*fini)(struct radeon_device *rdev);
1935 bool (*sense)(struct radeon_device *rdev, enum radeon_hpd_id hpd);
1936 void (*set_polarity)(struct radeon_device *rdev, enum radeon_hpd_id hpd);
1940 void (*misc)(struct radeon_device *rdev);
1941 void (*prepare)(struct radeon_device *rdev);
1942 void (*finish)(struct radeon_device *rdev);
1943 void (*init_profile)(struct radeon_device *rdev);
1944 void (*get_dynpm_state)(struct radeon_device *rdev);
1945 uint32_t (*get_engine_clock)(struct radeon_device *rdev);
1946 void (*set_engine_clock)(struct radeon_device *rdev, uint32_t eng_clock);
1947 uint32_t (*get_memory_clock)(struct radeon_device *rdev);
1948 void (*set_memory_clock)(struct radeon_device *rdev, uint32_t mem_clock);
1949 int (*get_pcie_lanes)(struct radeon_device *rdev);
1950 void (*set_pcie_lanes)(struct radeon_device *rdev, int lanes);
1951 void (*set_clock_gating)(struct radeon_device *rdev, int enable);
1952 int (*set_uvd_clocks)(struct radeon_device *rdev, u32 vclk, u32 dclk);
1953 int (*set_vce_clocks)(struct radeon_device *rdev, u32 evclk, u32 ecclk);
1954 int (*get_temperature)(struct radeon_device *rdev);
1958 int (*init)(struct radeon_device *rdev);
1959 void (*setup_asic)(struct radeon_device *rdev);
1960 int (*enable)(struct radeon_device *rdev);
1961 int (*late_enable)(struct radeon_device *rdev);
1962 void (*disable)(struct radeon_device *rdev);
1963 int (*pre_set_power_state)(struct radeon_device *rdev);
1964 int (*set_power_state)(struct radeon_device *rdev);
1965 void (*post_set_power_state)(struct radeon_device *rdev);
1966 void (*display_configuration_changed)(struct radeon_device *rdev);
1967 void (*fini)(struct radeon_device *rdev);
1968 u32 (*get_sclk)(struct radeon_device *rdev, bool low);
1969 u32 (*get_mclk)(struct radeon_device *rdev, bool low);
1970 void (*print_power_state)(struct radeon_device *rdev, struct radeon_ps *ps);
1971 void (*debugfs_print_current_performance_level)(struct radeon_device *rdev, struct seq_file *m);
1972 int (*force_performance_level)(struct radeon_device *rdev, enum radeon_dpm_forced_level level);
1973 bool (*vblank_too_short)(struct radeon_device *rdev);
1974 void (*powergate_uvd)(struct radeon_device *rdev, bool gate);
1975 void (*enable_bapm)(struct radeon_device *rdev, bool enable);
1976 void (*fan_ctrl_set_mode)(struct radeon_device *rdev, u32 mode);
1977 u32 (*fan_ctrl_get_mode)(struct radeon_device *rdev);
1978 int (*set_fan_speed_percent)(struct radeon_device *rdev, u32 speed);
1979 int (*get_fan_speed_percent)(struct radeon_device *rdev, u32 *speed);
1980 u32 (*get_current_sclk)(struct radeon_device *rdev);
1981 u32 (*get_current_mclk)(struct radeon_device *rdev);
1982 u16 (*get_current_vddc)(struct radeon_device *rdev);
1986 void (*page_flip)(struct radeon_device *rdev, int crtc, u64 crtc_base, bool async);
1987 bool (*page_flip_pending)(struct radeon_device *rdev, int crtc);
2198 void radeon_agp_disable(struct radeon_device *rdev);
2199 int radeon_asic_init(struct radeon_device *rdev);
2444 int radeon_device_init(struct radeon_device *rdev,
2448 void radeon_device_fini(struct radeon_device *rdev);
2449 int radeon_gpu_wait_for_idle(struct radeon_device *rdev);
2453 uint32_t r100_mm_rreg_slow(struct radeon_device *rdev, uint32_t reg);
2454 void r100_mm_wreg_slow(struct radeon_device *rdev, uint32_t reg, uint32_t v);
2455 static inline uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg, in r100_mm_rreg() argument
2459 if ((reg < rdev->rmmio_size || reg < RADEON_MIN_MMIO_SIZE) && !always_indirect) in r100_mm_rreg()
2460 return readl(((void __iomem *)rdev->rmmio) + reg); in r100_mm_rreg()
2462 return r100_mm_rreg_slow(rdev, reg); in r100_mm_rreg()
2464 static inline void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v, in r100_mm_wreg() argument
2467 if ((reg < rdev->rmmio_size || reg < RADEON_MIN_MMIO_SIZE) && !always_indirect) in r100_mm_wreg()
2468 writel(v, ((void __iomem *)rdev->rmmio) + reg); in r100_mm_wreg()
2470 r100_mm_wreg_slow(rdev, reg, v); in r100_mm_wreg()
2473 u32 r100_io_rreg(struct radeon_device *rdev, u32 reg);
2474 void r100_io_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2476 u32 cik_mm_rdoorbell(struct radeon_device *rdev, u32 index);
2477 void cik_mm_wdoorbell(struct radeon_device *rdev, u32 index, u32 v);
2479 static inline struct drm_device *rdev_to_drm(struct radeon_device *rdev) in rdev_to_drm() argument
2481 return &rdev->ddev; in rdev_to_drm()
2502 #define RREG8(reg) readb((rdev->rmmio) + (reg))
2503 #define WREG8(reg, v) writeb(v, (rdev->rmmio) + (reg))
2504 #define RREG16(reg) readw((rdev->rmmio) + (reg))
2505 #define WREG16(reg, v) writew(v, (rdev->rmmio) + (reg))
2506 #define RREG32(reg) r100_mm_rreg(rdev, (reg), false)
2507 #define RREG32_IDX(reg) r100_mm_rreg(rdev, (reg), true)
2509 r100_mm_rreg(rdev, (reg), false))
2510 #define WREG32(reg, v) r100_mm_wreg(rdev, (reg), (v), false)
2511 #define WREG32_IDX(reg, v) r100_mm_wreg(rdev, (reg), (v), true)
2514 #define RREG32_PLL(reg) rdev->pll_rreg(rdev, (reg))
2515 #define WREG32_PLL(reg, v) rdev->pll_wreg(rdev, (reg), (v))
2516 #define RREG32_MC(reg) rdev->mc_rreg(rdev, (reg))
2517 #define WREG32_MC(reg, v) rdev->mc_wreg(rdev, (reg), (v))
2518 #define RREG32_PCIE(reg) rv370_pcie_rreg(rdev, (reg))
2519 #define WREG32_PCIE(reg, v) rv370_pcie_wreg(rdev, (reg), (v))
2520 #define RREG32_PCIE_PORT(reg) rdev->pciep_rreg(rdev, (reg))
2521 #define WREG32_PCIE_PORT(reg, v) rdev->pciep_wreg(rdev, (reg), (v))
2522 #define RREG32_SMC(reg) tn_smc_rreg(rdev, (reg))
2523 #define WREG32_SMC(reg, v) tn_smc_wreg(rdev, (reg), (v))
2524 #define RREG32_RCU(reg) r600_rcu_rreg(rdev, (reg))
2525 #define WREG32_RCU(reg, v) r600_rcu_wreg(rdev, (reg), (v))
2526 #define RREG32_CG(reg) eg_cg_rreg(rdev, (reg))
2527 #define WREG32_CG(reg, v) eg_cg_wreg(rdev, (reg), (v))
2528 #define RREG32_PIF_PHY0(reg) eg_pif_phy0_rreg(rdev, (reg))
2529 #define WREG32_PIF_PHY0(reg, v) eg_pif_phy0_wreg(rdev, (reg), (v))
2530 #define RREG32_PIF_PHY1(reg) eg_pif_phy1_rreg(rdev, (reg))
2531 #define WREG32_PIF_PHY1(reg, v) eg_pif_phy1_wreg(rdev, (reg), (v))
2532 #define RREG32_UVD_CTX(reg) r600_uvd_ctx_rreg(rdev, (reg))
2533 #define WREG32_UVD_CTX(reg, v) r600_uvd_ctx_wreg(rdev, (reg), (v))
2534 #define RREG32_DIDT(reg) cik_didt_rreg(rdev, (reg))
2535 #define WREG32_DIDT(reg, v) cik_didt_wreg(rdev, (reg), (v))
2559 #define DREG32_SYS(sqf, rdev, reg) seq_printf((sqf), #reg " : 0x%08X\n", r100_mm_rreg((rdev), (reg)… argument
2560 #define RREG32_IO(reg) r100_io_rreg(rdev, (reg))
2561 #define WREG32_IO(reg, v) r100_io_wreg(rdev, (reg), (v))
2563 #define RDOORBELL32(index) cik_mm_rdoorbell(rdev, (index))
2564 #define WDOORBELL32(index, v) cik_mm_wdoorbell(rdev, (index), (v))
2574 uint32_t rv370_pcie_rreg(struct radeon_device *rdev, uint32_t reg);
2575 void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
2576 u32 tn_smc_rreg(struct radeon_device *rdev, u32 reg);
2577 void tn_smc_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2578 u32 r600_rcu_rreg(struct radeon_device *rdev, u32 reg);
2579 void r600_rcu_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2580 u32 eg_cg_rreg(struct radeon_device *rdev, u32 reg);
2581 void eg_cg_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2582 u32 eg_pif_phy0_rreg(struct radeon_device *rdev, u32 reg);
2583 void eg_pif_phy0_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2584 u32 eg_pif_phy1_rreg(struct radeon_device *rdev, u32 reg);
2585 void eg_pif_phy1_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2586 u32 r600_uvd_ctx_rreg(struct radeon_device *rdev, u32 reg);
2587 void r600_uvd_ctx_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2588 u32 cik_didt_rreg(struct radeon_device *rdev, u32 reg);
2589 void cik_didt_wreg(struct radeon_device *rdev, u32 reg, u32 v);
2591 void r100_pll_errata_after_index(struct radeon_device *rdev);
2597 #define ASIC_IS_RN50(rdev) ((rdev->pdev->device == 0x515e) || \ argument
2598 (rdev->pdev->device == 0x5969))
2599 #define ASIC_IS_RV100(rdev) ((rdev->family == CHIP_RV100) || \ argument
2600 (rdev->family == CHIP_RV200) || \
2601 (rdev->family == CHIP_RS100) || \
2602 (rdev->family == CHIP_RS200) || \
2603 (rdev->family == CHIP_RV250) || \
2604 (rdev->family == CHIP_RV280) || \
2605 (rdev->family == CHIP_RS300))
2606 #define ASIC_IS_R300(rdev) ((rdev->family == CHIP_R300) || \ argument
2607 (rdev->family == CHIP_RV350) || \
2608 (rdev->family == CHIP_R350) || \
2609 (rdev->family == CHIP_RV380) || \
2610 (rdev->family == CHIP_R420) || \
2611 (rdev->family == CHIP_R423) || \
2612 (rdev->family == CHIP_RV410) || \
2613 (rdev->family == CHIP_RS400) || \
2614 (rdev->family == CHIP_RS480))
2615 #define ASIC_IS_X2(rdev) ((rdev->pdev->device == 0x9441) || \ argument
2616 (rdev->pdev->device == 0x9443) || \
2617 (rdev->pdev->device == 0x944B) || \
2618 (rdev->pdev->device == 0x9506) || \
2619 (rdev->pdev->device == 0x9509) || \
2620 (rdev->pdev->device == 0x950F) || \
2621 (rdev->pdev->device == 0x689C) || \
2622 (rdev->pdev->device == 0x689D))
2623 #define ASIC_IS_AVIVO(rdev) ((rdev->family >= CHIP_RS600)) argument
2624 #define ASIC_IS_DCE2(rdev) ((rdev->family == CHIP_RS600) || \ argument
2625 (rdev->family == CHIP_RS690) || \
2626 (rdev->family == CHIP_RS740) || \
2627 (rdev->family >= CHIP_R600))
2628 #define ASIC_IS_DCE3(rdev) ((rdev->family >= CHIP_RV620)) argument
2629 #define ASIC_IS_DCE32(rdev) ((rdev->family >= CHIP_RV730)) argument
2630 #define ASIC_IS_DCE4(rdev) ((rdev->family >= CHIP_CEDAR)) argument
2631 #define ASIC_IS_DCE41(rdev) ((rdev->family >= CHIP_PALM) && \ argument
2632 (rdev->flags & RADEON_IS_IGP))
2633 #define ASIC_IS_DCE5(rdev) ((rdev->family >= CHIP_BARTS)) argument
2634 #define ASIC_IS_DCE6(rdev) ((rdev->family >= CHIP_ARUBA)) argument
2635 #define ASIC_IS_DCE61(rdev) ((rdev->family >= CHIP_ARUBA) && \ argument
2636 (rdev->flags & RADEON_IS_IGP))
2637 #define ASIC_IS_DCE64(rdev) ((rdev->family == CHIP_OLAND)) argument
2638 #define ASIC_IS_NODCE(rdev) ((rdev->family == CHIP_HAINAN)) argument
2639 #define ASIC_IS_DCE8(rdev) ((rdev->family >= CHIP_BONAIRE)) argument
2640 #define ASIC_IS_DCE81(rdev) ((rdev->family == CHIP_KAVERI)) argument
2641 #define ASIC_IS_DCE82(rdev) ((rdev->family == CHIP_BONAIRE)) argument
2642 #define ASIC_IS_DCE83(rdev) ((rdev->family == CHIP_KABINI) || \ argument
2643 (rdev->family == CHIP_MULLINS))
2645 #define ASIC_IS_LOMBOK(rdev) ((rdev->pdev->device == 0x6849) || \ argument
2646 (rdev->pdev->device == 0x6850) || \
2647 (rdev->pdev->device == 0x6858) || \
2648 (rdev->pdev->device == 0x6859) || \
2649 (rdev->pdev->device == 0x6840) || \
2650 (rdev->pdev->device == 0x6841) || \
2651 (rdev->pdev->device == 0x6842) || \
2652 (rdev->pdev->device == 0x6843))
2657 #define RBIOS8(i) (rdev->bios[i])
2661 int radeon_combios_init(struct radeon_device *rdev);
2662 void radeon_combios_fini(struct radeon_device *rdev);
2663 int radeon_atombios_init(struct radeon_device *rdev);
2664 void radeon_atombios_fini(struct radeon_device *rdev);
2693 #define radeon_init(rdev) (rdev)->asic->init((rdev)) argument
2694 #define radeon_fini(rdev) (rdev)->asic->fini((rdev)) argument
2695 #define radeon_resume(rdev) (rdev)->asic->resume((rdev)) argument
2696 #define radeon_suspend(rdev) (rdev)->asic->suspend((rdev)) argument
2697 #define radeon_cs_parse(rdev, r, p) (rdev)->asic->ring[(r)]->cs_parse((p)) argument
2698 #define radeon_vga_set_state(rdev, state) (rdev)->asic->vga_set_state((rdev), (state)) argument
2699 #define radeon_asic_reset(rdev) (rdev)->asic->asic_reset((rdev), false) argument
2700 #define radeon_gart_tlb_flush(rdev) (rdev)->asic->gart.tlb_flush((rdev)) argument
2701 #define radeon_gart_get_page_entry(a, f) (rdev)->asic->gart.get_page_entry((a), (f))
2702 #define radeon_gart_set_page(rdev, i, e) (rdev)->asic->gart.set_page((rdev), (i), (e)) argument
2703 #define radeon_asic_vm_init(rdev) (rdev)->asic->vm.init((rdev)) argument
2704 #define radeon_asic_vm_fini(rdev) (rdev)->asic->vm.fini((rdev)) argument
2705 #define radeon_asic_vm_copy_pages(rdev, ib, pe, src, count) ((rdev)->asic->vm.copy_pages((rdev), (i… argument
2706 #define radeon_asic_vm_write_pages(rdev, ib, pe, addr, count, incr, flags) ((rdev)->asic->vm.write_… argument
2707 #define radeon_asic_vm_set_pages(rdev, ib, pe, addr, count, incr, flags) ((rdev)->asic->vm.set_page… argument
2708 #define radeon_asic_vm_pad_ib(rdev, ib) ((rdev)->asic->vm.pad_ib((ib))) argument
2709 #define radeon_ring_start(rdev, r, cp) (rdev)->asic->ring[(r)]->ring_start((rdev), (cp)) argument
2710 #define radeon_ring_test(rdev, r, cp) (rdev)->asic->ring[(r)]->ring_test((rdev), (cp)) argument
2711 #define radeon_ib_test(rdev, r, cp) (rdev)->asic->ring[(r)]->ib_test((rdev), (cp)) argument
2712 #define radeon_ring_ib_execute(rdev, r, ib) (rdev)->asic->ring[(r)]->ib_execute((rdev), (ib)) argument
2713 #define radeon_ring_ib_parse(rdev, r, ib) (rdev)->asic->ring[(r)]->ib_parse((rdev), (ib)) argument
2714 #define radeon_ring_is_lockup(rdev, r, cp) (rdev)->asic->ring[(r)]->is_lockup((rdev), (cp)) argument
2715 #define radeon_ring_vm_flush(rdev, r, vm_id, pd_addr) (rdev)->asic->ring[(r)->idx]->vm_flush((rdev)… argument
2716 #define radeon_ring_get_rptr(rdev, r) (rdev)->asic->ring[(r)->idx]->get_rptr((rdev), (r)) argument
2717 #define radeon_ring_get_wptr(rdev, r) (rdev)->asic->ring[(r)->idx]->get_wptr((rdev), (r)) argument
2718 #define radeon_ring_set_wptr(rdev, r) (rdev)->asic->ring[(r)->idx]->set_wptr((rdev), (r)) argument
2719 #define radeon_irq_set(rdev) (rdev)->asic->irq.set((rdev)) argument
2720 #define radeon_irq_process(rdev) (rdev)->asic->irq.process((rdev)) argument
2721 #define radeon_get_vblank_counter(rdev, crtc) (rdev)->asic->display.get_vblank_counter((rdev), (crt… argument
2722 #define radeon_set_backlight_level(rdev, e, l) (rdev)->asic->display.set_backlight_level((e), (l)) argument
2723 #define radeon_get_backlight_level(rdev, e) (rdev)->asic->display.get_backlight_level((e)) argument
2724 #define radeon_hdmi_enable(rdev, e, b) (rdev)->asic->display.hdmi_enable((e), (b)) argument
2725 #define radeon_hdmi_setmode(rdev, e, m) (rdev)->asic->display.hdmi_setmode((e), (m)) argument
2726 #define radeon_fence_ring_emit(rdev, r, fence) (rdev)->asic->ring[(r)]->emit_fence((rdev), (fence)) argument
2727 #define radeon_semaphore_ring_emit(rdev, r, cp, semaphore, emit_wait) (rdev)->asic->ring[(r)]->emit… argument
2728 #define radeon_copy_blit(rdev, s, d, np, resv) (rdev)->asic->copy.blit((rdev), (s), (d), (np), (res… argument
2729 #define radeon_copy_dma(rdev, s, d, np, resv) (rdev)->asic->copy.dma((rdev), (s), (d), (np), (resv)) argument
2730 #define radeon_copy(rdev, s, d, np, resv) (rdev)->asic->copy.copy((rdev), (s), (d), (np), (resv)) argument
2731 #define radeon_copy_blit_ring_index(rdev) (rdev)->asic->copy.blit_ring_index argument
2732 #define radeon_copy_dma_ring_index(rdev) (rdev)->asic->copy.dma_ring_index argument
2733 #define radeon_copy_ring_index(rdev) (rdev)->asic->copy.copy_ring_index argument
2734 #define radeon_get_engine_clock(rdev) (rdev)->asic->pm.get_engine_clock((rdev)) argument
2735 #define radeon_set_engine_clock(rdev, e) (rdev)->asic->pm.set_engine_clock((rdev), (e)) argument
2736 #define radeon_get_memory_clock(rdev) (rdev)->asic->pm.get_memory_clock((rdev)) argument
2737 #define radeon_set_memory_clock(rdev, e) (rdev)->asic->pm.set_memory_clock((rdev), (e)) argument
2738 #define radeon_get_pcie_lanes(rdev) (rdev)->asic->pm.get_pcie_lanes((rdev)) argument
2739 #define radeon_set_pcie_lanes(rdev, l) (rdev)->asic->pm.set_pcie_lanes((rdev), (l)) argument
2740 #define radeon_set_clock_gating(rdev, e) (rdev)->asic->pm.set_clock_gating((rdev), (e)) argument
2741 #define radeon_set_uvd_clocks(rdev, v, d) (rdev)->asic->pm.set_uvd_clocks((rdev), (v), (d)) argument
2742 #define radeon_set_vce_clocks(rdev, ev, ec) (rdev)->asic->pm.set_vce_clocks((rdev), (ev), (ec)) argument
2743 #define radeon_get_temperature(rdev) (rdev)->asic->pm.get_temperature((rdev)) argument
2744 #define radeon_set_surface_reg(rdev, r, f, p, o, s) ((rdev)->asic->surface.set_reg((rdev), (r), (f)… argument
2745 #define radeon_clear_surface_reg(rdev, r) ((rdev)->asic->surface.clear_reg((rdev), (r))) argument
2746 #define radeon_bandwidth_update(rdev) (rdev)->asic->display.bandwidth_update((rdev)) argument
2747 #define radeon_hpd_init(rdev) (rdev)->asic->hpd.init((rdev)) argument
2748 #define radeon_hpd_fini(rdev) (rdev)->asic->hpd.fini((rdev)) argument
2749 #define radeon_hpd_sense(rdev, h) (rdev)->asic->hpd.sense((rdev), (h)) argument
2750 #define radeon_hpd_set_polarity(rdev, h) (rdev)->asic->hpd.set_polarity((rdev), (h)) argument
2751 #define radeon_gui_idle(rdev) (rdev)->asic->gui_idle((rdev)) argument
2752 #define radeon_pm_misc(rdev) (rdev)->asic->pm.misc((rdev)) argument
2753 #define radeon_pm_prepare(rdev) (rdev)->asic->pm.prepare((rdev)) argument
2754 #define radeon_pm_finish(rdev) (rdev)->asic->pm.finish((rdev)) argument
2755 #define radeon_pm_init_profile(rdev) (rdev)->asic->pm.init_profile((rdev)) argument
2756 #define radeon_pm_get_dynpm_state(rdev) (rdev)->asic->pm.get_dynpm_state((rdev)) argument
2757 #define radeon_page_flip(rdev, crtc, base, async) (rdev)->asic->pflip.page_flip((rdev), (crtc), (ba… argument
2758 #define radeon_page_flip_pending(rdev, crtc) (rdev)->asic->pflip.page_flip_pending((rdev), (crtc)) argument
2759 #define radeon_wait_for_vblank(rdev, crtc) (rdev)->asic->display.wait_for_vblank((rdev), (crtc)) argument
2760 #define radeon_mc_wait_for_idle(rdev) (rdev)->asic->mc_wait_for_idle((rdev)) argument
2761 #define radeon_get_xclk(rdev) (rdev)->asic->get_xclk((rdev)) argument
2762 #define radeon_get_gpu_clock_counter(rdev) (rdev)->asic->get_gpu_clock_counter((rdev)) argument
2763 #define radeon_get_allowed_info_register(rdev, r, v) (rdev)->asic->get_allowed_info_register((rdev)… argument
2764 #define radeon_dpm_init(rdev) rdev->asic->dpm.init((rdev)) argument
2765 #define radeon_dpm_setup_asic(rdev) rdev->asic->dpm.setup_asic((rdev)) argument
2766 #define radeon_dpm_enable(rdev) rdev->asic->dpm.enable((rdev)) argument
2767 #define radeon_dpm_late_enable(rdev) rdev->asic->dpm.late_enable((rdev)) argument
2768 #define radeon_dpm_disable(rdev) rdev->asic->dpm.disable((rdev)) argument
2769 #define radeon_dpm_pre_set_power_state(rdev) rdev->asic->dpm.pre_set_power_state((rdev)) argument
2770 #define radeon_dpm_set_power_state(rdev) rdev->asic->dpm.set_power_state((rdev)) argument
2771 #define radeon_dpm_post_set_power_state(rdev) rdev->asic->dpm.post_set_power_state((rdev)) argument
2772 …define radeon_dpm_display_configuration_changed(rdev) rdev->asic->dpm.display_configuration_change… argument
2773 #define radeon_dpm_fini(rdev) rdev->asic->dpm.fini((rdev)) argument
2774 #define radeon_dpm_get_sclk(rdev, l) rdev->asic->dpm.get_sclk((rdev), (l)) argument
2775 #define radeon_dpm_get_mclk(rdev, l) rdev->asic->dpm.get_mclk((rdev), (l)) argument
2776 #define radeon_dpm_print_power_state(rdev, ps) rdev->asic->dpm.print_power_state((rdev), (ps)) argument
2777 …_debugfs_print_current_performance_level(rdev, m) rdev->asic->dpm.debugfs_print_current_performanc… argument
2778 #define radeon_dpm_force_performance_level(rdev, l) rdev->asic->dpm.force_performance_level((rdev),… argument
2779 #define radeon_dpm_vblank_too_short(rdev) rdev->asic->dpm.vblank_too_short((rdev)) argument
2780 #define radeon_dpm_powergate_uvd(rdev, g) rdev->asic->dpm.powergate_uvd((rdev), (g)) argument
2781 #define radeon_dpm_enable_bapm(rdev, e) rdev->asic->dpm.enable_bapm((rdev), (e)) argument
2782 #define radeon_dpm_get_current_sclk(rdev) rdev->asic->dpm.get_current_sclk((rdev)) argument
2783 #define radeon_dpm_get_current_mclk(rdev) rdev->asic->dpm.get_current_mclk((rdev)) argument
2787 extern int radeon_gpu_reset(struct radeon_device *rdev);
2788 extern void radeon_pci_config_reset(struct radeon_device *rdev);
2789 extern void r600_set_bios_scratch_engine_hung(struct radeon_device *rdev, bool hung);
2790 extern void radeon_agp_disable(struct radeon_device *rdev);
2791 extern int radeon_modeset_init(struct radeon_device *rdev);
2792 extern void radeon_modeset_fini(struct radeon_device *rdev);
2793 extern bool radeon_card_posted(struct radeon_device *rdev);
2794 extern void radeon_update_bandwidth_info(struct radeon_device *rdev);
2795 extern void radeon_update_display_priority(struct radeon_device *rdev);
2796 extern bool radeon_boot_test_post_card(struct radeon_device *rdev);
2797 extern void radeon_scratch_init(struct radeon_device *rdev);
2798 extern void radeon_wb_fini(struct radeon_device *rdev);
2799 extern int radeon_wb_init(struct radeon_device *rdev);
2800 extern void radeon_wb_disable(struct radeon_device *rdev);
2801 extern void radeon_surface_init(struct radeon_device *rdev);
2803 extern void radeon_legacy_set_clock_gating(struct radeon_device *rdev, int enable);
2804 extern void radeon_atom_set_clock_gating(struct radeon_device *rdev, int enable);
2807 extern int radeon_ttm_tt_set_userptr(struct radeon_device *rdev,
2810 extern bool radeon_ttm_tt_has_userptr(struct radeon_device *rdev, struct ttm_tt *ttm);
2811 extern bool radeon_ttm_tt_is_readonly(struct radeon_device *rdev, struct ttm_tt *ttm);
2813 extern void radeon_vram_location(struct radeon_device *rdev, struct radeon_mc *mc, u64 base);
2814 extern void radeon_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
2818 extern void radeon_ttm_set_active_vram_size(struct radeon_device *rdev, u64 size);
2819 extern void radeon_program_register_sequence(struct radeon_device *rdev,
2833 int radeon_vm_manager_init(struct radeon_device *rdev);
2834 void radeon_vm_manager_fini(struct radeon_device *rdev);
2835 int radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm);
2836 void radeon_vm_fini(struct radeon_device *rdev, struct radeon_vm *vm);
2837 struct radeon_bo_list *radeon_vm_get_bos(struct radeon_device *rdev,
2840 struct radeon_fence *radeon_vm_grab_id(struct radeon_device *rdev,
2842 void radeon_vm_flush(struct radeon_device *rdev,
2845 void radeon_vm_fence(struct radeon_device *rdev,
2848 uint64_t radeon_vm_map_gart(struct radeon_device *rdev, uint64_t addr);
2849 int radeon_vm_update_page_directory(struct radeon_device *rdev,
2851 int radeon_vm_clear_freed(struct radeon_device *rdev,
2853 int radeon_vm_clear_invalids(struct radeon_device *rdev,
2855 int radeon_vm_bo_update(struct radeon_device *rdev,
2858 void radeon_vm_bo_invalidate(struct radeon_device *rdev,
2862 struct radeon_bo_va *radeon_vm_bo_add(struct radeon_device *rdev,
2865 int radeon_vm_bo_set_addr(struct radeon_device *rdev,
2869 void radeon_vm_bo_rmv(struct radeon_device *rdev,
2874 struct r600_audio_pin *r600_audio_get_pin(struct radeon_device *rdev);
2875 struct r600_audio_pin *dce6_audio_get_pin(struct radeon_device *rdev);
2876 void r600_audio_enable(struct radeon_device *rdev,
2879 void dce6_audio_enable(struct radeon_device *rdev,
2886 int r600_vram_scratch_init(struct radeon_device *rdev);
2887 void r600_vram_scratch_fini(struct radeon_device *rdev);
2916 extern u32 r6xx_remap_render_backend(struct radeon_device *rdev,
2926 extern int ni_init_microcode(struct radeon_device *rdev);
2927 extern int ni_mc_load_microcode(struct radeon_device *rdev);
2931 extern int radeon_acpi_init(struct radeon_device *rdev);
2932 extern void radeon_acpi_fini(struct radeon_device *rdev);
2933 extern bool radeon_acpi_is_pcie_performance_request_supported(struct radeon_device *rdev);
2934 extern int radeon_acpi_pcie_performance_request(struct radeon_device *rdev,
2936 extern int radeon_acpi_pcie_notify_device_ready(struct radeon_device *rdev);
2938 static inline int radeon_acpi_init(struct radeon_device *rdev) { return 0; } in radeon_acpi_init() argument
2939 static inline void radeon_acpi_fini(struct radeon_device *rdev) { } in radeon_acpi_fini() argument
2956 void radeon_irq_kms_set_irq_n_enabled(struct radeon_device *rdev,
2962 void radeon_audio_component_init(struct radeon_device *rdev);
2963 void radeon_audio_component_fini(struct radeon_device *rdev);