diff options
-rw-r--r-- | drivers/gpu/drm/radeon/r300.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r520.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600_cs.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 93 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_share.h | 116 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/rs400.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/rv515.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/rv770.c | 1 |
9 files changed, 84 insertions, 132 deletions
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c index 92f9cb74a7d2..ced3322bd5fb 100644 --- a/drivers/gpu/drm/radeon/r300.c +++ b/drivers/gpu/drm/radeon/r300.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include "radeon_reg.h" | 31 | #include "radeon_reg.h" |
32 | #include "radeon.h" | 32 | #include "radeon.h" |
33 | #include "radeon_drm.h" | 33 | #include "radeon_drm.h" |
34 | #include "radeon_share.h" | ||
35 | #include "r100_track.h" | 34 | #include "r100_track.h" |
36 | #include "r300d.h" | 35 | #include "r300d.h" |
37 | 36 | ||
diff --git a/drivers/gpu/drm/radeon/r520.c b/drivers/gpu/drm/radeon/r520.c index ebd6b0f7bdff..0e1686d1c873 100644 --- a/drivers/gpu/drm/radeon/r520.c +++ b/drivers/gpu/drm/radeon/r520.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include "drmP.h" | 28 | #include "drmP.h" |
29 | #include "radeon_reg.h" | 29 | #include "radeon_reg.h" |
30 | #include "radeon.h" | 30 | #include "radeon.h" |
31 | #include "radeon_share.h" | ||
32 | 31 | ||
33 | /* r520,rv530,rv560,rv570,r580 depends on : */ | 32 | /* r520,rv530,rv560,rv570,r580 depends on : */ |
34 | void r100_hdp_reset(struct radeon_device *rdev); | 33 | void r100_hdp_reset(struct radeon_device *rdev); |
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index d8fcef44a69f..1bc25678986b 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include "radeon_drm.h" | 32 | #include "radeon_drm.h" |
33 | #include "radeon.h" | 33 | #include "radeon.h" |
34 | #include "radeon_mode.h" | 34 | #include "radeon_mode.h" |
35 | #include "radeon_share.h" | ||
36 | #include "r600d.h" | 35 | #include "r600d.h" |
37 | #include "avivod.h" | 36 | #include "avivod.h" |
38 | #include "atom.h" | 37 | #include "atom.h" |
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index 39bf6349351b..33b89cd8743e 100644 --- a/drivers/gpu/drm/radeon/r600_cs.c +++ b/drivers/gpu/drm/radeon/r600_cs.c | |||
@@ -27,7 +27,6 @@ | |||
27 | */ | 27 | */ |
28 | #include "drmP.h" | 28 | #include "drmP.h" |
29 | #include "radeon.h" | 29 | #include "radeon.h" |
30 | #include "radeon_share.h" | ||
31 | #include "r600d.h" | 30 | #include "r600d.h" |
32 | #include "avivod.h" | 31 | #include "avivod.h" |
33 | 32 | ||
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 |
diff --git a/drivers/gpu/drm/radeon/radeon_share.h b/drivers/gpu/drm/radeon/radeon_share.h deleted file mode 100644 index 5f9e358ab506..000000000000 --- a/drivers/gpu/drm/radeon/radeon_share.h +++ /dev/null | |||
@@ -1,116 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2008 Advanced Micro Devices, Inc. | ||
3 | * Copyright 2008 Red Hat Inc. | ||
4 | * Copyright 2009 Jerome Glisse. | ||
5 | * | ||
6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
7 | * copy of this software and associated documentation files (the "Software"), | ||
8 | * to deal in the Software without restriction, including without limitation | ||
9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
11 | * Software is furnished to do so, subject to the following conditions: | ||
12 | * | ||
13 | * The above copyright notice and this permission notice shall be included in | ||
14 | * all copies or substantial portions of the Software. | ||
15 | * | ||
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
19 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
20 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
21 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
22 | * OTHER DEALINGS IN THE SOFTWARE. | ||
23 | * | ||
24 | * Authors: Dave Airlie | ||
25 | * Alex Deucher | ||
26 | * Jerome Glisse | ||
27 | */ | ||
28 | #ifndef __RADEON_SHARE_H__ | ||
29 | #define __RADEON_SHARE_H__ | ||
30 | |||
31 | /* Common */ | ||
32 | struct radeon_device; | ||
33 | struct radeon_cs_parser; | ||
34 | int radeon_clocks_init(struct radeon_device *rdev); | ||
35 | void radeon_clocks_fini(struct radeon_device *rdev); | ||
36 | void radeon_scratch_init(struct radeon_device *rdev); | ||
37 | void radeon_surface_init(struct radeon_device *rdev); | ||
38 | int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data); | ||
39 | |||
40 | |||
41 | /* R100, RV100, RS100, RV200, RS200, R200, RV250, RS300, RV280 */ | ||
42 | void r100_vram_init_sizes(struct radeon_device *rdev); | ||
43 | |||
44 | |||
45 | /* R300, R350, RV350, RV380 */ | ||
46 | struct r300_asic { | ||
47 | const unsigned *reg_safe_bm; | ||
48 | unsigned reg_safe_bm_size; | ||
49 | }; | ||
50 | |||
51 | |||
52 | /* RS690, RS740 */ | ||
53 | void rs690_line_buffer_adjust(struct radeon_device *rdev, | ||
54 | struct drm_display_mode *mode1, | ||
55 | struct drm_display_mode *mode2); | ||
56 | |||
57 | |||
58 | /* RV515 */ | ||
59 | void rv515_bandwidth_avivo_update(struct radeon_device *rdev); | ||
60 | |||
61 | |||
62 | /* R600, RV610, RV630, RV620, RV635, RV670, RS780, RS880 */ | ||
63 | bool r600_card_posted(struct radeon_device *rdev); | ||
64 | void r600_cp_stop(struct radeon_device *rdev); | ||
65 | void r600_ring_init(struct radeon_device *rdev, unsigned ring_size); | ||
66 | int r600_cp_resume(struct radeon_device *rdev); | ||
67 | int r600_count_pipe_bits(uint32_t val); | ||
68 | int r600_gart_clear_page(struct radeon_device *rdev, int i); | ||
69 | int r600_mc_wait_for_idle(struct radeon_device *rdev); | ||
70 | void r600_pcie_gart_tlb_flush(struct radeon_device *rdev); | ||
71 | int r600_ib_test(struct radeon_device *rdev); | ||
72 | int r600_ring_test(struct radeon_device *rdev); | ||
73 | int r600_wb_init(struct radeon_device *rdev); | ||
74 | void r600_wb_fini(struct radeon_device *rdev); | ||
75 | void r600_scratch_init(struct radeon_device *rdev); | ||
76 | int r600_blit_init(struct radeon_device *rdev); | ||
77 | void r600_blit_fini(struct radeon_device *rdev); | ||
78 | int r600_cp_init_microcode(struct radeon_device *rdev); | ||
79 | struct r600_asic { | ||
80 | unsigned max_pipes; | ||
81 | unsigned max_tile_pipes; | ||
82 | unsigned max_simds; | ||
83 | unsigned max_backends; | ||
84 | unsigned max_gprs; | ||
85 | unsigned max_threads; | ||
86 | unsigned max_stack_entries; | ||
87 | unsigned max_hw_contexts; | ||
88 | unsigned max_gs_threads; | ||
89 | unsigned sx_max_export_size; | ||
90 | unsigned sx_max_export_pos_size; | ||
91 | unsigned sx_max_export_smx_size; | ||
92 | unsigned sq_num_cf_insts; | ||
93 | }; | ||
94 | |||
95 | /* RV770, RV7300, RV710 */ | ||
96 | struct rv770_asic { | ||
97 | unsigned max_pipes; | ||
98 | unsigned max_tile_pipes; | ||
99 | unsigned max_simds; | ||
100 | unsigned max_backends; | ||
101 | unsigned max_gprs; | ||
102 | unsigned max_threads; | ||
103 | unsigned max_stack_entries; | ||
104 | unsigned max_hw_contexts; | ||
105 | unsigned max_gs_threads; | ||
106 | unsigned sx_max_export_size; | ||
107 | unsigned sx_max_export_pos_size; | ||
108 | unsigned sx_max_export_smx_size; | ||
109 | unsigned sq_num_cf_insts; | ||
110 | unsigned sx_num_of_sets; | ||
111 | unsigned sc_prim_fifo_size; | ||
112 | unsigned sc_hiz_tile_fifo_size; | ||
113 | unsigned sc_earlyz_tile_fifo_fize; | ||
114 | }; | ||
115 | |||
116 | #endif | ||
diff --git a/drivers/gpu/drm/radeon/rs400.c b/drivers/gpu/drm/radeon/rs400.c index 8c3ea7e36060..e1e4ce427828 100644 --- a/drivers/gpu/drm/radeon/rs400.c +++ b/drivers/gpu/drm/radeon/rs400.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <drm/drmP.h> | 29 | #include <drm/drmP.h> |
30 | #include "radeon_reg.h" | 30 | #include "radeon_reg.h" |
31 | #include "radeon.h" | 31 | #include "radeon.h" |
32 | #include "radeon_share.h" | ||
33 | 32 | ||
34 | /* rs400,rs480 depends on : */ | 33 | /* rs400,rs480 depends on : */ |
35 | void r100_hdp_reset(struct radeon_device *rdev); | 34 | void r100_hdp_reset(struct radeon_device *rdev); |
diff --git a/drivers/gpu/drm/radeon/rv515.c b/drivers/gpu/drm/radeon/rv515.c index 99e397f16384..03d490269ed0 100644 --- a/drivers/gpu/drm/radeon/rv515.c +++ b/drivers/gpu/drm/radeon/rv515.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include "drmP.h" | 29 | #include "drmP.h" |
30 | #include "rv515d.h" | 30 | #include "rv515d.h" |
31 | #include "radeon.h" | 31 | #include "radeon.h" |
32 | #include "radeon_share.h" | ||
33 | 32 | ||
34 | #include "rv515_reg_safe.h" | 33 | #include "rv515_reg_safe.h" |
35 | /* rv515 depends on : */ | 34 | /* rv515 depends on : */ |
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index 57765f6d5b20..5ba5204091ec 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
30 | #include "drmP.h" | 30 | #include "drmP.h" |
31 | #include "radeon.h" | 31 | #include "radeon.h" |
32 | #include "radeon_share.h" | ||
33 | #include "rv770d.h" | 32 | #include "rv770d.h" |
34 | #include "avivod.h" | 33 | #include "avivod.h" |
35 | #include "atom.h" | 34 | #include "atom.h" |