#include <linux/debugfs.h>
#include <linux/firmware.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <drm/drm_device.h>
#include <drm/drm_file.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_vblank.h>
#include <drm/radeon_drm.h>
#include "atom.h"
#include "r100_reg_safe.h"
#include "r100d.h"
#include "radeon.h"
#include "radeon_asic.h"
#include "radeon_reg.h"
#include "rn50_reg_safe.h"
#include "rs100d.h"
#include "rv200d.h"
#include "rv250d.h"
#define FIRMWARE_R100 …
#define FIRMWARE_R200 …
#define FIRMWARE_R300 …
#define FIRMWARE_R420 …
#define FIRMWARE_RS690 …
#define FIRMWARE_RS600 …
#define FIRMWARE_R520 …
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
#include "r100_track.h"
static bool r100_is_in_vblank(struct radeon_device *rdev, int crtc)
{ … }
static bool r100_is_counter_moving(struct radeon_device *rdev, int crtc)
{ … }
void r100_wait_for_vblank(struct radeon_device *rdev, int crtc)
{ … }
void r100_page_flip(struct radeon_device *rdev, int crtc_id, u64 crtc_base, bool async)
{ … }
bool r100_page_flip_pending(struct radeon_device *rdev, int crtc_id)
{ … }
void r100_pm_get_dynpm_state(struct radeon_device *rdev)
{ … }
void r100_pm_init_profile(struct radeon_device *rdev)
{ … }
void r100_pm_misc(struct radeon_device *rdev)
{ … }
void r100_pm_prepare(struct radeon_device *rdev)
{ … }
void r100_pm_finish(struct radeon_device *rdev)
{ … }
bool r100_gui_idle(struct radeon_device *rdev)
{ … }
bool r100_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd)
{ … }
void r100_hpd_set_polarity(struct radeon_device *rdev,
enum radeon_hpd_id hpd)
{ … }
void r100_hpd_init(struct radeon_device *rdev)
{ … }
void r100_hpd_fini(struct radeon_device *rdev)
{ … }
void r100_pci_gart_tlb_flush(struct radeon_device *rdev)
{ … }
int r100_pci_gart_init(struct radeon_device *rdev)
{ … }
int r100_pci_gart_enable(struct radeon_device *rdev)
{ … }
void r100_pci_gart_disable(struct radeon_device *rdev)
{ … }
uint64_t r100_pci_gart_get_page_entry(uint64_t addr, uint32_t flags)
{ … }
void r100_pci_gart_set_page(struct radeon_device *rdev, unsigned i,
uint64_t entry)
{ … }
void r100_pci_gart_fini(struct radeon_device *rdev)
{ … }
int r100_irq_set(struct radeon_device *rdev)
{ … }
void r100_irq_disable(struct radeon_device *rdev)
{ … }
static uint32_t r100_irq_ack(struct radeon_device *rdev)
{ … }
int r100_irq_process(struct radeon_device *rdev)
{ … }
u32 r100_get_vblank_counter(struct radeon_device *rdev, int crtc)
{ … }
static void r100_ring_hdp_flush(struct radeon_device *rdev, struct radeon_ring *ring)
{ … }
void r100_fence_ring_emit(struct radeon_device *rdev,
struct radeon_fence *fence)
{ … }
bool r100_semaphore_ring_emit(struct radeon_device *rdev,
struct radeon_ring *ring,
struct radeon_semaphore *semaphore,
bool emit_wait)
{ … }
struct radeon_fence *r100_copy_blit(struct radeon_device *rdev,
uint64_t src_offset,
uint64_t dst_offset,
unsigned num_gpu_pages,
struct dma_resv *resv)
{ … }
static int r100_cp_wait_for_idle(struct radeon_device *rdev)
{ … }
void r100_ring_start(struct radeon_device *rdev, struct radeon_ring *ring)
{ … }
static int r100_cp_init_microcode(struct radeon_device *rdev)
{ … }
u32 r100_gfx_get_rptr(struct radeon_device *rdev,
struct radeon_ring *ring)
{ … }
u32 r100_gfx_get_wptr(struct radeon_device *rdev,
struct radeon_ring *ring)
{ … }
void r100_gfx_set_wptr(struct radeon_device *rdev,
struct radeon_ring *ring)
{ … }
static void r100_cp_load_microcode(struct radeon_device *rdev)
{ … }
int r100_cp_init(struct radeon_device *rdev, unsigned ring_size)
{ … }
void r100_cp_fini(struct radeon_device *rdev)
{ … }
void r100_cp_disable(struct radeon_device *rdev)
{ … }
int r100_reloc_pitch_offset(struct radeon_cs_parser *p,
struct radeon_cs_packet *pkt,
unsigned idx,
unsigned reg)
{ … }
int r100_packet3_load_vbpntr(struct radeon_cs_parser *p,
struct radeon_cs_packet *pkt,
int idx)
{ … }
int r100_cs_parse_packet0(struct radeon_cs_parser *p,
struct radeon_cs_packet *pkt,
const unsigned *auth, unsigned n,
radeon_packet0_check_t check)
{ … }
int r100_cs_packet_parse_vline(struct radeon_cs_parser *p)
{ … }
static int r100_get_vtx_size(uint32_t vtx_fmt)
{ … }
static int r100_packet0_check(struct radeon_cs_parser *p,
struct radeon_cs_packet *pkt,
unsigned idx, unsigned reg)
{ … }
int r100_cs_track_check_pkt3_indx_buffer(struct radeon_cs_parser *p,
struct radeon_cs_packet *pkt,
struct radeon_bo *robj)
{ … }
static int r100_packet3_check(struct radeon_cs_parser *p,
struct radeon_cs_packet *pkt)
{ … }
int r100_cs_parse(struct radeon_cs_parser *p)
{ … }
static void r100_cs_track_texture_print(struct r100_cs_track_texture *t)
{ … }
static int r100_track_compress_size(int compress_format, int w, int h)
{ … }
static int r100_cs_track_cube(struct radeon_device *rdev,
struct r100_cs_track *track, unsigned idx)
{ … }
static int r100_cs_track_texture_check(struct radeon_device *rdev,
struct r100_cs_track *track)
{ … }
int r100_cs_track_check(struct radeon_device *rdev, struct r100_cs_track *track)
{ … }
void r100_cs_track_clear(struct radeon_device *rdev, struct r100_cs_track *track)
{ … }
static void r100_errata(struct radeon_device *rdev)
{ … }
static int r100_rbbm_fifo_wait_for_entry(struct radeon_device *rdev, unsigned n)
{ … }
int r100_gui_wait_for_idle(struct radeon_device *rdev)
{ … }
int r100_mc_wait_for_idle(struct radeon_device *rdev)
{ … }
bool r100_gpu_is_lockup(struct radeon_device *rdev, struct radeon_ring *ring)
{ … }
void r100_enable_bm(struct radeon_device *rdev)
{ … }
void r100_bm_disable(struct radeon_device *rdev)
{ … }
int r100_asic_reset(struct radeon_device *rdev, bool hard)
{ … }
void r100_set_common_regs(struct radeon_device *rdev)
{ … }
static void r100_vram_get_type(struct radeon_device *rdev)
{ … }
static u32 r100_get_accessible_vram(struct radeon_device *rdev)
{ … }
void r100_vram_init_sizes(struct radeon_device *rdev)
{ … }
void r100_vga_set_state(struct radeon_device *rdev, bool state)
{ … }
static void r100_mc_init(struct radeon_device *rdev)
{ … }
void r100_pll_errata_after_index(struct radeon_device *rdev)
{ … }
static void r100_pll_errata_after_data(struct radeon_device *rdev)
{ … }
uint32_t r100_pll_rreg(struct radeon_device *rdev, uint32_t reg)
{ … }
void r100_pll_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
{ … }
static void r100_set_safe_registers(struct radeon_device *rdev)
{ … }
#if defined(CONFIG_DEBUG_FS)
static int r100_debugfs_rbbm_info_show(struct seq_file *m, void *unused)
{ … }
static int r100_debugfs_cp_ring_info_show(struct seq_file *m, void *unused)
{ … }
static int r100_debugfs_cp_csq_fifo_show(struct seq_file *m, void *unused)
{ … }
static int r100_debugfs_mc_info_show(struct seq_file *m, void *unused)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
DEFINE_SHOW_ATTRIBUTE(…);
DEFINE_SHOW_ATTRIBUTE(…);
DEFINE_SHOW_ATTRIBUTE(…);
#endif
void r100_debugfs_rbbm_init(struct radeon_device *rdev)
{ … }
void r100_debugfs_cp_init(struct radeon_device *rdev)
{ … }
void r100_debugfs_mc_info_init(struct radeon_device *rdev)
{ … }
int r100_set_surface_reg(struct radeon_device *rdev, int reg,
uint32_t tiling_flags, uint32_t pitch,
uint32_t offset, uint32_t obj_size)
{ … }
void r100_clear_surface_reg(struct radeon_device *rdev, int reg)
{ … }
void r100_bandwidth_update(struct radeon_device *rdev)
{ … }
int r100_ring_test(struct radeon_device *rdev, struct radeon_ring *ring)
{ … }
void r100_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib)
{ … }
int r100_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
{ … }
void r100_mc_stop(struct radeon_device *rdev, struct r100_mc_save *save)
{ … }
void r100_mc_resume(struct radeon_device *rdev, struct r100_mc_save *save)
{ … }
void r100_vga_render_disable(struct radeon_device *rdev)
{ … }
static void r100_mc_program(struct radeon_device *rdev)
{ … }
static void r100_clock_startup(struct radeon_device *rdev)
{ … }
static int r100_startup(struct radeon_device *rdev)
{ … }
int r100_resume(struct radeon_device *rdev)
{ … }
int r100_suspend(struct radeon_device *rdev)
{ … }
void r100_fini(struct radeon_device *rdev)
{ … }
void r100_restore_sanity(struct radeon_device *rdev)
{ … }
int r100_init(struct radeon_device *rdev)
{ … }
uint32_t r100_mm_rreg_slow(struct radeon_device *rdev, uint32_t reg)
{ … }
void r100_mm_wreg_slow(struct radeon_device *rdev, uint32_t reg, uint32_t v)
{ … }
u32 r100_io_rreg(struct radeon_device *rdev, u32 reg)
{ … }
void r100_io_wreg(struct radeon_device *rdev, u32 reg, u32 v)
{ … }