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.h93
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 */
643struct r100_asic { 645struct 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
650struct r300_asic {
651 const unsigned *reg_safe_bm;
652 unsigned reg_safe_bm_size;
653};
654
655struct 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
671struct 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
648union radeon_asic_config { 691union 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 */
938int radeon_modeset_init(struct radeon_device *rdev); 981extern int radeon_modeset_init(struct radeon_device *rdev);
939void radeon_modeset_fini(struct radeon_device *rdev); 982extern void radeon_modeset_fini(struct radeon_device *rdev);
940extern bool radeon_card_posted(struct radeon_device *rdev); 983extern bool radeon_card_posted(struct radeon_device *rdev);
984extern int radeon_clocks_init(struct radeon_device *rdev);
985extern void radeon_clocks_fini(struct radeon_device *rdev);
986extern void radeon_scratch_init(struct radeon_device *rdev);
987extern void radeon_surface_init(struct radeon_device *rdev);
988extern 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 */
943struct r100_mc_save { 991struct r100_mc_save {
@@ -951,10 +999,10 @@ struct r100_mc_save {
951extern void r100_cp_disable(struct radeon_device *rdev); 999extern void r100_cp_disable(struct radeon_device *rdev);
952extern int r100_cp_init(struct radeon_device *rdev, unsigned ring_size); 1000extern int r100_cp_init(struct radeon_device *rdev, unsigned ring_size);
953extern void r100_cp_fini(struct radeon_device *rdev); 1001extern void r100_cp_fini(struct radeon_device *rdev);
954void r100_pci_gart_tlb_flush(struct radeon_device *rdev); 1002extern void r100_pci_gart_tlb_flush(struct radeon_device *rdev);
955int r100_pci_gart_enable(struct radeon_device *rdev); 1003extern int r100_pci_gart_enable(struct radeon_device *rdev);
956void r100_pci_gart_disable(struct radeon_device *rdev); 1004extern void r100_pci_gart_disable(struct radeon_device *rdev);
957int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); 1005extern int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr);
958extern int r100_debugfs_mc_info_init(struct radeon_device *rdev); 1006extern int r100_debugfs_mc_info_init(struct radeon_device *rdev);
959extern int r100_gui_wait_for_idle(struct radeon_device *rdev); 1007extern int r100_gui_wait_for_idle(struct radeon_device *rdev);
960extern void r100_ib_fini(struct radeon_device *rdev); 1008extern void r100_ib_fini(struct radeon_device *rdev);
@@ -963,6 +1011,7 @@ extern void r100_irq_disable(struct radeon_device *rdev);
963extern int r100_irq_set(struct radeon_device *rdev); 1011extern int r100_irq_set(struct radeon_device *rdev);
964extern void r100_mc_stop(struct radeon_device *rdev, struct r100_mc_save *save); 1012extern void r100_mc_stop(struct radeon_device *rdev, struct r100_mc_save *save);
965extern void r100_mc_resume(struct radeon_device *rdev, struct r100_mc_save *save); 1013extern void r100_mc_resume(struct radeon_device *rdev, struct r100_mc_save *save);
1014extern void r100_vram_init_sizes(struct radeon_device *rdev);
966extern void r100_wb_disable(struct radeon_device *rdev); 1015extern void r100_wb_disable(struct radeon_device *rdev);
967extern void r100_wb_fini(struct radeon_device *rdev); 1016extern void r100_wb_fini(struct radeon_device *rdev);
968extern int r100_wb_init(struct radeon_device *rdev); 1017extern int r100_wb_init(struct radeon_device *rdev);
@@ -974,8 +1023,34 @@ extern void r300_vram_info(struct radeon_device *rdev);
974extern void rv370_pcie_gart_disable(struct radeon_device *rdev); 1023extern void rv370_pcie_gart_disable(struct radeon_device *rdev);
975 1024
976/* r420,r423,rv410 */ 1025/* r420,r423,rv410 */
977u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg); 1026extern u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg);
978void r420_mc_wreg(struct radeon_device *rdev, u32 reg, u32 v); 1027extern void r420_mc_wreg(struct radeon_device *rdev, u32 reg, u32 v);
979extern int r420_debugfs_pipes_info_init(struct radeon_device *rdev); 1028extern int r420_debugfs_pipes_info_init(struct radeon_device *rdev);
980 1029
1030/* rv515 */
1031extern void rv515_bandwidth_avivo_update(struct radeon_device *rdev);
1032
1033/* rs690, rs740 */
1034extern 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 */
1039extern bool r600_card_posted(struct radeon_device *rdev);
1040extern void r600_cp_stop(struct radeon_device *rdev);
1041extern void r600_ring_init(struct radeon_device *rdev, unsigned ring_size);
1042extern int r600_cp_resume(struct radeon_device *rdev);
1043extern int r600_count_pipe_bits(uint32_t val);
1044extern int r600_gart_clear_page(struct radeon_device *rdev, int i);
1045extern int r600_mc_wait_for_idle(struct radeon_device *rdev);
1046extern void r600_pcie_gart_tlb_flush(struct radeon_device *rdev);
1047extern int r600_ib_test(struct radeon_device *rdev);
1048extern int r600_ring_test(struct radeon_device *rdev);
1049extern int r600_wb_init(struct radeon_device *rdev);
1050extern void r600_wb_fini(struct radeon_device *rdev);
1051extern void r600_scratch_init(struct radeon_device *rdev);
1052extern int r600_blit_init(struct radeon_device *rdev);
1053extern void r600_blit_fini(struct radeon_device *rdev);
1054extern int r600_cp_init_microcode(struct radeon_device *rdev);
1055
981#endif 1056#endif