aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon.h')
-rw-r--r--drivers/gpu/drm/radeon/radeon.h66
1 files changed, 17 insertions, 49 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 829e26e8a4bb..034218c3dbbb 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -91,6 +91,8 @@ extern int radeon_tv;
91extern int radeon_new_pll; 91extern int radeon_new_pll;
92extern int radeon_dynpm; 92extern int radeon_dynpm;
93extern int radeon_audio; 93extern int radeon_audio;
94extern int radeon_disp_priority;
95extern int radeon_hw_i2c;
94 96
95/* 97/*
96 * Copy from radeon_drv.h so we don't have to include both and have conflicting 98 * Copy from radeon_drv.h so we don't have to include both and have conflicting
@@ -168,6 +170,7 @@ struct radeon_clock {
168 * Power management 170 * Power management
169 */ 171 */
170int radeon_pm_init(struct radeon_device *rdev); 172int radeon_pm_init(struct radeon_device *rdev);
173void radeon_pm_fini(struct radeon_device *rdev);
171void radeon_pm_compute_clocks(struct radeon_device *rdev); 174void radeon_pm_compute_clocks(struct radeon_device *rdev);
172void radeon_combios_get_power_modes(struct radeon_device *rdev); 175void radeon_combios_get_power_modes(struct radeon_device *rdev);
173void radeon_atombios_get_power_modes(struct radeon_device *rdev); 176void radeon_atombios_get_power_modes(struct radeon_device *rdev);
@@ -687,6 +690,7 @@ struct radeon_pm {
687 bool downclocked; 690 bool downclocked;
688 int active_crtcs; 691 int active_crtcs;
689 int req_vblank; 692 int req_vblank;
693 bool vblank_sync;
690 fixed20_12 max_bandwidth; 694 fixed20_12 max_bandwidth;
691 fixed20_12 igp_sideport_mclk; 695 fixed20_12 igp_sideport_mclk;
692 fixed20_12 igp_system_mclk; 696 fixed20_12 igp_system_mclk;
@@ -697,6 +701,7 @@ struct radeon_pm {
697 fixed20_12 ht_bandwidth; 701 fixed20_12 ht_bandwidth;
698 fixed20_12 core_bandwidth; 702 fixed20_12 core_bandwidth;
699 fixed20_12 sclk; 703 fixed20_12 sclk;
704 fixed20_12 mclk;
700 fixed20_12 needed_bandwidth; 705 fixed20_12 needed_bandwidth;
701 /* XXX: use a define for num power modes */ 706 /* XXX: use a define for num power modes */
702 struct radeon_power_state power_state[8]; 707 struct radeon_power_state power_state[8];
@@ -707,6 +712,7 @@ struct radeon_pm {
707 struct radeon_power_state *requested_power_state; 712 struct radeon_power_state *requested_power_state;
708 struct radeon_pm_clock_info *requested_clock_mode; 713 struct radeon_pm_clock_info *requested_clock_mode;
709 struct radeon_power_state *default_power_state; 714 struct radeon_power_state *default_power_state;
715 struct radeon_i2c_chan *i2c_bus;
710}; 716};
711 717
712 718
@@ -729,8 +735,6 @@ int radeon_debugfs_add_files(struct radeon_device *rdev,
729 struct drm_info_list *files, 735 struct drm_info_list *files,
730 unsigned nfiles); 736 unsigned nfiles);
731int radeon_debugfs_fence_init(struct radeon_device *rdev); 737int radeon_debugfs_fence_init(struct radeon_device *rdev);
732int r100_debugfs_rbbm_init(struct radeon_device *rdev);
733int r100_debugfs_cp_init(struct radeon_device *rdev);
734 738
735 739
736/* 740/*
@@ -782,7 +786,7 @@ struct radeon_asic {
782 int (*set_surface_reg)(struct radeon_device *rdev, int reg, 786 int (*set_surface_reg)(struct radeon_device *rdev, int reg,
783 uint32_t tiling_flags, uint32_t pitch, 787 uint32_t tiling_flags, uint32_t pitch,
784 uint32_t offset, uint32_t obj_size); 788 uint32_t offset, uint32_t obj_size);
785 int (*clear_surface_reg)(struct radeon_device *rdev, int reg); 789 void (*clear_surface_reg)(struct radeon_device *rdev, int reg);
786 void (*bandwidth_update)(struct radeon_device *rdev); 790 void (*bandwidth_update)(struct radeon_device *rdev);
787 void (*hpd_init)(struct radeon_device *rdev); 791 void (*hpd_init)(struct radeon_device *rdev);
788 void (*hpd_fini)(struct radeon_device *rdev); 792 void (*hpd_fini)(struct radeon_device *rdev);
@@ -862,6 +866,12 @@ union radeon_asic_config {
862 struct rv770_asic rv770; 866 struct rv770_asic rv770;
863}; 867};
864 868
869/*
870 * asic initizalization from radeon_asic.c
871 */
872void radeon_agp_disable(struct radeon_device *rdev);
873int radeon_asic_init(struct radeon_device *rdev);
874
865 875
866/* 876/*
867 * IOCTL. 877 * IOCTL.
@@ -1172,6 +1182,8 @@ extern void radeon_gart_restore(struct radeon_device *rdev);
1172extern int radeon_modeset_init(struct radeon_device *rdev); 1182extern int radeon_modeset_init(struct radeon_device *rdev);
1173extern void radeon_modeset_fini(struct radeon_device *rdev); 1183extern void radeon_modeset_fini(struct radeon_device *rdev);
1174extern bool radeon_card_posted(struct radeon_device *rdev); 1184extern bool radeon_card_posted(struct radeon_device *rdev);
1185extern void radeon_update_bandwidth_info(struct radeon_device *rdev);
1186extern void radeon_update_display_priority(struct radeon_device *rdev);
1175extern bool radeon_boot_test_post_card(struct radeon_device *rdev); 1187extern bool radeon_boot_test_post_card(struct radeon_device *rdev);
1176extern int radeon_clocks_init(struct radeon_device *rdev); 1188extern int radeon_clocks_init(struct radeon_device *rdev);
1177extern void radeon_clocks_fini(struct radeon_device *rdev); 1189extern void radeon_clocks_fini(struct radeon_device *rdev);
@@ -1188,51 +1200,6 @@ extern int radeon_resume_kms(struct drm_device *dev);
1188extern int radeon_suspend_kms(struct drm_device *dev, pm_message_t state); 1200extern int radeon_suspend_kms(struct drm_device *dev, pm_message_t state);
1189 1201
1190/* r100,rv100,rs100,rv200,rs200,r200,rv250,rs300,rv280 */ 1202/* r100,rv100,rs100,rv200,rs200,r200,rv250,rs300,rv280 */
1191struct r100_mc_save {
1192 u32 GENMO_WT;
1193 u32 CRTC_EXT_CNTL;
1194 u32 CRTC_GEN_CNTL;
1195 u32 CRTC2_GEN_CNTL;
1196 u32 CUR_OFFSET;
1197 u32 CUR2_OFFSET;
1198};
1199extern void r100_cp_disable(struct radeon_device *rdev);
1200extern int r100_cp_init(struct radeon_device *rdev, unsigned ring_size);
1201extern void r100_cp_fini(struct radeon_device *rdev);
1202extern void r100_pci_gart_tlb_flush(struct radeon_device *rdev);
1203extern int r100_pci_gart_init(struct radeon_device *rdev);
1204extern void r100_pci_gart_fini(struct radeon_device *rdev);
1205extern int r100_pci_gart_enable(struct radeon_device *rdev);
1206extern void r100_pci_gart_disable(struct radeon_device *rdev);
1207extern int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr);
1208extern int r100_debugfs_mc_info_init(struct radeon_device *rdev);
1209extern int r100_gui_wait_for_idle(struct radeon_device *rdev);
1210extern void r100_ib_fini(struct radeon_device *rdev);
1211extern int r100_ib_init(struct radeon_device *rdev);
1212extern void r100_irq_disable(struct radeon_device *rdev);
1213extern int r100_irq_set(struct radeon_device *rdev);
1214extern void r100_mc_stop(struct radeon_device *rdev, struct r100_mc_save *save);
1215extern void r100_mc_resume(struct radeon_device *rdev, struct r100_mc_save *save);
1216extern void r100_vram_init_sizes(struct radeon_device *rdev);
1217extern void r100_wb_disable(struct radeon_device *rdev);
1218extern void r100_wb_fini(struct radeon_device *rdev);
1219extern int r100_wb_init(struct radeon_device *rdev);
1220extern void r100_hdp_reset(struct radeon_device *rdev);
1221extern int r100_rb2d_reset(struct radeon_device *rdev);
1222extern int r100_cp_reset(struct radeon_device *rdev);
1223extern void r100_vga_render_disable(struct radeon_device *rdev);
1224extern int r100_cs_track_check_pkt3_indx_buffer(struct radeon_cs_parser *p,
1225 struct radeon_cs_packet *pkt,
1226 struct radeon_bo *robj);
1227extern int r100_cs_parse_packet0(struct radeon_cs_parser *p,
1228 struct radeon_cs_packet *pkt,
1229 const unsigned *auth, unsigned n,
1230 radeon_packet0_check_t check);
1231extern int r100_cs_packet_parse(struct radeon_cs_parser *p,
1232 struct radeon_cs_packet *pkt,
1233 unsigned idx);
1234extern void r100_enable_bm(struct radeon_device *rdev);
1235extern void r100_set_common_regs(struct radeon_device *rdev);
1236 1203
1237/* rv200,rv250,rv280 */ 1204/* rv200,rv250,rv280 */
1238extern void r200_set_safe_registers(struct radeon_device *rdev); 1205extern void r200_set_safe_registers(struct radeon_device *rdev);
@@ -1322,7 +1289,8 @@ extern int r600_audio_tmds_index(struct drm_encoder *encoder);
1322extern void r600_audio_set_clock(struct drm_encoder *encoder, int clock); 1289extern void r600_audio_set_clock(struct drm_encoder *encoder, int clock);
1323extern void r600_audio_fini(struct radeon_device *rdev); 1290extern void r600_audio_fini(struct radeon_device *rdev);
1324extern void r600_hdmi_init(struct drm_encoder *encoder); 1291extern void r600_hdmi_init(struct drm_encoder *encoder);
1325extern void r600_hdmi_enable(struct drm_encoder *encoder, int enable); 1292extern void r600_hdmi_enable(struct drm_encoder *encoder);
1293extern void r600_hdmi_disable(struct drm_encoder *encoder);
1326extern void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode); 1294extern void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode);
1327extern int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder); 1295extern int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder);
1328extern void r600_hdmi_update_audio_settings(struct drm_encoder *encoder, 1296extern void r600_hdmi_update_audio_settings(struct drm_encoder *encoder,