diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon.h')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 93 |
1 files changed, 84 insertions, 9 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index e314756dacc3..8cec5bf2922b 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -50,7 +50,6 @@ | |||
50 | #include <linux/kref.h> | 50 | #include <linux/kref.h> |
51 | 51 | ||
52 | #include "radeon_mode.h" | 52 | #include "radeon_mode.h" |
53 | #include "radeon_share.h" | ||
54 | #include "radeon_reg.h" | 53 | #include "radeon_reg.h" |
55 | 54 | ||
56 | /* | 55 | /* |
@@ -640,11 +639,55 @@ struct radeon_asic { | |||
640 | void (*bandwidth_update)(struct radeon_device *rdev); | 639 | void (*bandwidth_update)(struct radeon_device *rdev); |
641 | }; | 640 | }; |
642 | 641 | ||
642 | /* | ||
643 | * Asic structures | ||
644 | */ | ||
643 | struct r100_asic { | 645 | struct r100_asic { |
644 | const unsigned *reg_safe_bm; | 646 | const unsigned *reg_safe_bm; |
645 | unsigned reg_safe_bm_size; | 647 | unsigned reg_safe_bm_size; |
646 | }; | 648 | }; |
647 | 649 | ||
650 | struct r300_asic { | ||
651 | const unsigned *reg_safe_bm; | ||
652 | unsigned reg_safe_bm_size; | ||
653 | }; | ||
654 | |||
655 | struct r600_asic { | ||
656 | unsigned max_pipes; | ||
657 | unsigned max_tile_pipes; | ||
658 | unsigned max_simds; | ||
659 | unsigned max_backends; | ||
660 | unsigned max_gprs; | ||
661 | unsigned max_threads; | ||
662 | unsigned max_stack_entries; | ||
663 | unsigned max_hw_contexts; | ||
664 | unsigned max_gs_threads; | ||
665 | unsigned sx_max_export_size; | ||
666 | unsigned sx_max_export_pos_size; | ||
667 | unsigned sx_max_export_smx_size; | ||
668 | unsigned sq_num_cf_insts; | ||
669 | }; | ||
670 | |||
671 | struct rv770_asic { | ||
672 | unsigned max_pipes; | ||
673 | unsigned max_tile_pipes; | ||
674 | unsigned max_simds; | ||
675 | unsigned max_backends; | ||
676 | unsigned max_gprs; | ||
677 | unsigned max_threads; | ||
678 | unsigned max_stack_entries; | ||
679 | unsigned max_hw_contexts; | ||
680 | unsigned max_gs_threads; | ||
681 | unsigned sx_max_export_size; | ||
682 | unsigned sx_max_export_pos_size; | ||
683 | unsigned sx_max_export_smx_size; | ||
684 | unsigned sq_num_cf_insts; | ||
685 | unsigned sx_num_of_sets; | ||
686 | unsigned sc_prim_fifo_size; | ||
687 | unsigned sc_hiz_tile_fifo_size; | ||
688 | unsigned sc_earlyz_tile_fifo_fize; | ||
689 | }; | ||
690 | |||
648 | union radeon_asic_config { | 691 | union radeon_asic_config { |
649 | struct r300_asic r300; | 692 | struct r300_asic r300; |
650 | struct r100_asic r100; | 693 | struct r100_asic r100; |
@@ -935,9 +978,14 @@ static inline void radeon_ring_write(struct radeon_device *rdev, uint32_t v) | |||
935 | #define radeon_bandwidth_update(rdev) (rdev)->asic->bandwidth_update((rdev)) | 978 | #define radeon_bandwidth_update(rdev) (rdev)->asic->bandwidth_update((rdev)) |
936 | 979 | ||
937 | /* Common functions */ | 980 | /* Common functions */ |
938 | int radeon_modeset_init(struct radeon_device *rdev); | 981 | extern int radeon_modeset_init(struct radeon_device *rdev); |
939 | void radeon_modeset_fini(struct radeon_device *rdev); | 982 | extern void radeon_modeset_fini(struct radeon_device *rdev); |
940 | extern bool radeon_card_posted(struct radeon_device *rdev); | 983 | extern bool radeon_card_posted(struct radeon_device *rdev); |
984 | extern int radeon_clocks_init(struct radeon_device *rdev); | ||
985 | extern void radeon_clocks_fini(struct radeon_device *rdev); | ||
986 | extern void radeon_scratch_init(struct radeon_device *rdev); | ||
987 | extern void radeon_surface_init(struct radeon_device *rdev); | ||
988 | extern int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data); | ||
941 | 989 | ||
942 | /* r100,rv100,rs100,rv200,rs200,r200,rv250,rs300,rv280 */ | 990 | /* r100,rv100,rs100,rv200,rs200,r200,rv250,rs300,rv280 */ |
943 | struct r100_mc_save { | 991 | struct r100_mc_save { |
@@ -951,10 +999,10 @@ struct r100_mc_save { | |||
951 | extern void r100_cp_disable(struct radeon_device *rdev); | 999 | extern void r100_cp_disable(struct radeon_device *rdev); |
952 | extern int r100_cp_init(struct radeon_device *rdev, unsigned ring_size); | 1000 | extern int r100_cp_init(struct radeon_device *rdev, unsigned ring_size); |
953 | extern void r100_cp_fini(struct radeon_device *rdev); | 1001 | extern void r100_cp_fini(struct radeon_device *rdev); |
954 | void r100_pci_gart_tlb_flush(struct radeon_device *rdev); | 1002 | extern void r100_pci_gart_tlb_flush(struct radeon_device *rdev); |
955 | int r100_pci_gart_enable(struct radeon_device *rdev); | 1003 | extern int r100_pci_gart_enable(struct radeon_device *rdev); |
956 | void r100_pci_gart_disable(struct radeon_device *rdev); | 1004 | extern void r100_pci_gart_disable(struct radeon_device *rdev); |
957 | int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); | 1005 | extern int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); |
958 | extern int r100_debugfs_mc_info_init(struct radeon_device *rdev); | 1006 | extern int r100_debugfs_mc_info_init(struct radeon_device *rdev); |
959 | extern int r100_gui_wait_for_idle(struct radeon_device *rdev); | 1007 | extern int r100_gui_wait_for_idle(struct radeon_device *rdev); |
960 | extern void r100_ib_fini(struct radeon_device *rdev); | 1008 | extern void r100_ib_fini(struct radeon_device *rdev); |
@@ -963,6 +1011,7 @@ extern void r100_irq_disable(struct radeon_device *rdev); | |||
963 | extern int r100_irq_set(struct radeon_device *rdev); | 1011 | extern int r100_irq_set(struct radeon_device *rdev); |
964 | extern void r100_mc_stop(struct radeon_device *rdev, struct r100_mc_save *save); | 1012 | extern void r100_mc_stop(struct radeon_device *rdev, struct r100_mc_save *save); |
965 | extern void r100_mc_resume(struct radeon_device *rdev, struct r100_mc_save *save); | 1013 | extern void r100_mc_resume(struct radeon_device *rdev, struct r100_mc_save *save); |
1014 | extern void r100_vram_init_sizes(struct radeon_device *rdev); | ||
966 | extern void r100_wb_disable(struct radeon_device *rdev); | 1015 | extern void r100_wb_disable(struct radeon_device *rdev); |
967 | extern void r100_wb_fini(struct radeon_device *rdev); | 1016 | extern void r100_wb_fini(struct radeon_device *rdev); |
968 | extern int r100_wb_init(struct radeon_device *rdev); | 1017 | extern int r100_wb_init(struct radeon_device *rdev); |
@@ -974,8 +1023,34 @@ extern void r300_vram_info(struct radeon_device *rdev); | |||
974 | extern void rv370_pcie_gart_disable(struct radeon_device *rdev); | 1023 | extern void rv370_pcie_gart_disable(struct radeon_device *rdev); |
975 | 1024 | ||
976 | /* r420,r423,rv410 */ | 1025 | /* r420,r423,rv410 */ |
977 | u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg); | 1026 | extern u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg); |
978 | void r420_mc_wreg(struct radeon_device *rdev, u32 reg, u32 v); | 1027 | extern void r420_mc_wreg(struct radeon_device *rdev, u32 reg, u32 v); |
979 | extern int r420_debugfs_pipes_info_init(struct radeon_device *rdev); | 1028 | extern int r420_debugfs_pipes_info_init(struct radeon_device *rdev); |
980 | 1029 | ||
1030 | /* rv515 */ | ||
1031 | extern void rv515_bandwidth_avivo_update(struct radeon_device *rdev); | ||
1032 | |||
1033 | /* rs690, rs740 */ | ||
1034 | extern void rs690_line_buffer_adjust(struct radeon_device *rdev, | ||
1035 | struct drm_display_mode *mode1, | ||
1036 | struct drm_display_mode *mode2); | ||
1037 | |||
1038 | /* r600, rv610, rv630, rv620, rv635, rv670, rs780, rs880 */ | ||
1039 | extern bool r600_card_posted(struct radeon_device *rdev); | ||
1040 | extern void r600_cp_stop(struct radeon_device *rdev); | ||
1041 | extern void r600_ring_init(struct radeon_device *rdev, unsigned ring_size); | ||
1042 | extern int r600_cp_resume(struct radeon_device *rdev); | ||
1043 | extern int r600_count_pipe_bits(uint32_t val); | ||
1044 | extern int r600_gart_clear_page(struct radeon_device *rdev, int i); | ||
1045 | extern int r600_mc_wait_for_idle(struct radeon_device *rdev); | ||
1046 | extern void r600_pcie_gart_tlb_flush(struct radeon_device *rdev); | ||
1047 | extern int r600_ib_test(struct radeon_device *rdev); | ||
1048 | extern int r600_ring_test(struct radeon_device *rdev); | ||
1049 | extern int r600_wb_init(struct radeon_device *rdev); | ||
1050 | extern void r600_wb_fini(struct radeon_device *rdev); | ||
1051 | extern void r600_scratch_init(struct radeon_device *rdev); | ||
1052 | extern int r600_blit_init(struct radeon_device *rdev); | ||
1053 | extern void r600_blit_fini(struct radeon_device *rdev); | ||
1054 | extern int r600_cp_init_microcode(struct radeon_device *rdev); | ||
1055 | |||
981 | #endif | 1056 | #endif |