Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 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_ASIC_H__ |
| 29 | #define __RADEON_ASIC_H__ |
| 30 | |
| 31 | /* |
| 32 | * common functions |
| 33 | */ |
| 34 | void radeon_legacy_set_engine_clock(struct radeon_device *rdev, uint32_t eng_clock); |
| 35 | void radeon_legacy_set_clock_gating(struct radeon_device *rdev, int enable); |
| 36 | |
| 37 | void radeon_atom_set_engine_clock(struct radeon_device *rdev, uint32_t eng_clock); |
| 38 | void radeon_atom_set_memory_clock(struct radeon_device *rdev, uint32_t mem_clock); |
| 39 | void radeon_atom_set_clock_gating(struct radeon_device *rdev, int enable); |
| 40 | |
| 41 | /* |
| 42 | * r100,rv100,rs100,rv200,rs200,r200,rv250,rs300,rv280 |
| 43 | */ |
Jerome Glisse | d455090 | 2009-10-01 10:12:06 +0200 | [diff] [blame] | 44 | extern int r100_init(struct radeon_device *rdev); |
| 45 | extern void r100_fini(struct radeon_device *rdev); |
| 46 | extern int r100_suspend(struct radeon_device *rdev); |
| 47 | extern int r100_resume(struct radeon_device *rdev); |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 48 | uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg); |
| 49 | void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 50 | int r100_gpu_reset(struct radeon_device *rdev); |
Michel Dänzer | 7ed220d | 2009-08-13 11:10:51 +0200 | [diff] [blame] | 51 | u32 r100_get_vblank_counter(struct radeon_device *rdev, int crtc); |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 52 | void r100_pci_gart_tlb_flush(struct radeon_device *rdev); |
| 53 | int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 54 | void r100_cp_commit(struct radeon_device *rdev); |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 55 | void r100_ring_start(struct radeon_device *rdev); |
| 56 | int r100_irq_set(struct radeon_device *rdev); |
| 57 | int r100_irq_process(struct radeon_device *rdev); |
| 58 | void r100_fence_ring_emit(struct radeon_device *rdev, |
| 59 | struct radeon_fence *fence); |
| 60 | int r100_cs_parse(struct radeon_cs_parser *p); |
| 61 | void r100_pll_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); |
| 62 | uint32_t r100_pll_rreg(struct radeon_device *rdev, uint32_t reg); |
| 63 | int r100_copy_blit(struct radeon_device *rdev, |
| 64 | uint64_t src_offset, |
| 65 | uint64_t dst_offset, |
| 66 | unsigned num_pages, |
| 67 | struct radeon_fence *fence); |
Dave Airlie | e024e11 | 2009-06-24 09:48:08 +1000 | [diff] [blame] | 68 | int r100_set_surface_reg(struct radeon_device *rdev, int reg, |
| 69 | uint32_t tiling_flags, uint32_t pitch, |
| 70 | uint32_t offset, uint32_t obj_size); |
| 71 | int r100_clear_surface_reg(struct radeon_device *rdev, int reg); |
Jerome Glisse | c93bb85 | 2009-07-13 21:04:08 +0200 | [diff] [blame] | 72 | void r100_bandwidth_update(struct radeon_device *rdev); |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 73 | void r100_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); |
| 74 | int r100_ib_test(struct radeon_device *rdev); |
| 75 | int r100_ring_test(struct radeon_device *rdev); |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 76 | |
| 77 | static struct radeon_asic r100_asic = { |
Jerome Glisse | 068a117 | 2009-06-17 13:28:30 +0200 | [diff] [blame] | 78 | .init = &r100_init, |
Jerome Glisse | d455090 | 2009-10-01 10:12:06 +0200 | [diff] [blame] | 79 | .fini = &r100_fini, |
| 80 | .suspend = &r100_suspend, |
| 81 | .resume = &r100_resume, |
| 82 | .errata = NULL, |
| 83 | .vram_info = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 84 | .gpu_reset = &r100_gpu_reset, |
Jerome Glisse | d455090 | 2009-10-01 10:12:06 +0200 | [diff] [blame] | 85 | .mc_init = NULL, |
| 86 | .mc_fini = NULL, |
| 87 | .wb_init = NULL, |
| 88 | .wb_fini = NULL, |
| 89 | .gart_init = NULL, |
| 90 | .gart_fini = NULL, |
| 91 | .gart_enable = NULL, |
| 92 | .gart_disable = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 93 | .gart_tlb_flush = &r100_pci_gart_tlb_flush, |
| 94 | .gart_set_page = &r100_pci_gart_set_page, |
Jerome Glisse | d455090 | 2009-10-01 10:12:06 +0200 | [diff] [blame] | 95 | .cp_init = NULL, |
| 96 | .cp_fini = NULL, |
| 97 | .cp_disable = NULL, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 98 | .cp_commit = &r100_cp_commit, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 99 | .ring_start = &r100_ring_start, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 100 | .ring_test = &r100_ring_test, |
| 101 | .ring_ib_execute = &r100_ring_ib_execute, |
Jerome Glisse | d455090 | 2009-10-01 10:12:06 +0200 | [diff] [blame] | 102 | .ib_test = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 103 | .irq_set = &r100_irq_set, |
| 104 | .irq_process = &r100_irq_process, |
Michel Dänzer | 7ed220d | 2009-08-13 11:10:51 +0200 | [diff] [blame] | 105 | .get_vblank_counter = &r100_get_vblank_counter, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 106 | .fence_ring_emit = &r100_fence_ring_emit, |
| 107 | .cs_parse = &r100_cs_parse, |
| 108 | .copy_blit = &r100_copy_blit, |
| 109 | .copy_dma = NULL, |
| 110 | .copy = &r100_copy_blit, |
| 111 | .set_engine_clock = &radeon_legacy_set_engine_clock, |
| 112 | .set_memory_clock = NULL, |
| 113 | .set_pcie_lanes = NULL, |
| 114 | .set_clock_gating = &radeon_legacy_set_clock_gating, |
Dave Airlie | e024e11 | 2009-06-24 09:48:08 +1000 | [diff] [blame] | 115 | .set_surface_reg = r100_set_surface_reg, |
| 116 | .clear_surface_reg = r100_clear_surface_reg, |
Jerome Glisse | c93bb85 | 2009-07-13 21:04:08 +0200 | [diff] [blame] | 117 | .bandwidth_update = &r100_bandwidth_update, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 118 | }; |
| 119 | |
| 120 | |
| 121 | /* |
| 122 | * r300,r350,rv350,rv380 |
| 123 | */ |
Jerome Glisse | 207bf9e | 2009-09-30 15:35:32 +0200 | [diff] [blame] | 124 | extern int r300_init(struct radeon_device *rdev); |
| 125 | extern void r300_fini(struct radeon_device *rdev); |
| 126 | extern int r300_suspend(struct radeon_device *rdev); |
| 127 | extern int r300_resume(struct radeon_device *rdev); |
| 128 | extern int r300_gpu_reset(struct radeon_device *rdev); |
| 129 | extern void r300_ring_start(struct radeon_device *rdev); |
| 130 | extern void r300_fence_ring_emit(struct radeon_device *rdev, |
| 131 | struct radeon_fence *fence); |
| 132 | extern int r300_cs_parse(struct radeon_cs_parser *p); |
| 133 | extern void rv370_pcie_gart_tlb_flush(struct radeon_device *rdev); |
| 134 | extern int rv370_pcie_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); |
| 135 | extern uint32_t rv370_pcie_rreg(struct radeon_device *rdev, uint32_t reg); |
| 136 | extern void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); |
| 137 | extern void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes); |
| 138 | extern int r300_copy_dma(struct radeon_device *rdev, |
| 139 | uint64_t src_offset, |
| 140 | uint64_t dst_offset, |
| 141 | unsigned num_pages, |
| 142 | struct radeon_fence *fence); |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 143 | static struct radeon_asic r300_asic = { |
Jerome Glisse | 068a117 | 2009-06-17 13:28:30 +0200 | [diff] [blame] | 144 | .init = &r300_init, |
Jerome Glisse | 207bf9e | 2009-09-30 15:35:32 +0200 | [diff] [blame] | 145 | .fini = &r300_fini, |
| 146 | .suspend = &r300_suspend, |
| 147 | .resume = &r300_resume, |
| 148 | .errata = NULL, |
| 149 | .vram_info = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 150 | .gpu_reset = &r300_gpu_reset, |
Jerome Glisse | 207bf9e | 2009-09-30 15:35:32 +0200 | [diff] [blame] | 151 | .mc_init = NULL, |
| 152 | .mc_fini = NULL, |
| 153 | .wb_init = NULL, |
| 154 | .wb_fini = NULL, |
| 155 | .gart_init = NULL, |
| 156 | .gart_fini = NULL, |
| 157 | .gart_enable = NULL, |
| 158 | .gart_disable = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 159 | .gart_tlb_flush = &r100_pci_gart_tlb_flush, |
| 160 | .gart_set_page = &r100_pci_gart_set_page, |
Jerome Glisse | 207bf9e | 2009-09-30 15:35:32 +0200 | [diff] [blame] | 161 | .cp_init = NULL, |
| 162 | .cp_fini = NULL, |
| 163 | .cp_disable = NULL, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 164 | .cp_commit = &r100_cp_commit, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 165 | .ring_start = &r300_ring_start, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 166 | .ring_test = &r100_ring_test, |
| 167 | .ring_ib_execute = &r100_ring_ib_execute, |
Jerome Glisse | 207bf9e | 2009-09-30 15:35:32 +0200 | [diff] [blame] | 168 | .ib_test = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 169 | .irq_set = &r100_irq_set, |
| 170 | .irq_process = &r100_irq_process, |
Michel Dänzer | 7ed220d | 2009-08-13 11:10:51 +0200 | [diff] [blame] | 171 | .get_vblank_counter = &r100_get_vblank_counter, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 172 | .fence_ring_emit = &r300_fence_ring_emit, |
| 173 | .cs_parse = &r300_cs_parse, |
| 174 | .copy_blit = &r100_copy_blit, |
| 175 | .copy_dma = &r300_copy_dma, |
| 176 | .copy = &r100_copy_blit, |
| 177 | .set_engine_clock = &radeon_legacy_set_engine_clock, |
| 178 | .set_memory_clock = NULL, |
| 179 | .set_pcie_lanes = &rv370_set_pcie_lanes, |
| 180 | .set_clock_gating = &radeon_legacy_set_clock_gating, |
Dave Airlie | e024e11 | 2009-06-24 09:48:08 +1000 | [diff] [blame] | 181 | .set_surface_reg = r100_set_surface_reg, |
| 182 | .clear_surface_reg = r100_clear_surface_reg, |
Jerome Glisse | c93bb85 | 2009-07-13 21:04:08 +0200 | [diff] [blame] | 183 | .bandwidth_update = &r100_bandwidth_update, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 184 | }; |
| 185 | |
| 186 | /* |
| 187 | * r420,r423,rv410 |
| 188 | */ |
Jerome Glisse | 9f022dd | 2009-09-11 15:35:22 +0200 | [diff] [blame] | 189 | extern int r420_init(struct radeon_device *rdev); |
| 190 | extern void r420_fini(struct radeon_device *rdev); |
| 191 | extern int r420_suspend(struct radeon_device *rdev); |
| 192 | extern int r420_resume(struct radeon_device *rdev); |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 193 | static struct radeon_asic r420_asic = { |
Jerome Glisse | 9f022dd | 2009-09-11 15:35:22 +0200 | [diff] [blame] | 194 | .init = &r420_init, |
| 195 | .fini = &r420_fini, |
| 196 | .suspend = &r420_suspend, |
| 197 | .resume = &r420_resume, |
| 198 | .errata = NULL, |
| 199 | .vram_info = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 200 | .gpu_reset = &r300_gpu_reset, |
Jerome Glisse | 9f022dd | 2009-09-11 15:35:22 +0200 | [diff] [blame] | 201 | .mc_init = NULL, |
| 202 | .mc_fini = NULL, |
| 203 | .wb_init = NULL, |
| 204 | .wb_fini = NULL, |
Jerome Glisse | 4aac047 | 2009-09-14 18:29:49 +0200 | [diff] [blame] | 205 | .gart_enable = NULL, |
| 206 | .gart_disable = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 207 | .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, |
| 208 | .gart_set_page = &rv370_pcie_gart_set_page, |
Jerome Glisse | 9f022dd | 2009-09-11 15:35:22 +0200 | [diff] [blame] | 209 | .cp_init = NULL, |
| 210 | .cp_fini = NULL, |
| 211 | .cp_disable = NULL, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 212 | .cp_commit = &r100_cp_commit, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 213 | .ring_start = &r300_ring_start, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 214 | .ring_test = &r100_ring_test, |
| 215 | .ring_ib_execute = &r100_ring_ib_execute, |
Jerome Glisse | 9f022dd | 2009-09-11 15:35:22 +0200 | [diff] [blame] | 216 | .ib_test = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 217 | .irq_set = &r100_irq_set, |
| 218 | .irq_process = &r100_irq_process, |
Michel Dänzer | 7ed220d | 2009-08-13 11:10:51 +0200 | [diff] [blame] | 219 | .get_vblank_counter = &r100_get_vblank_counter, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 220 | .fence_ring_emit = &r300_fence_ring_emit, |
| 221 | .cs_parse = &r300_cs_parse, |
| 222 | .copy_blit = &r100_copy_blit, |
| 223 | .copy_dma = &r300_copy_dma, |
| 224 | .copy = &r100_copy_blit, |
| 225 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 226 | .set_memory_clock = &radeon_atom_set_memory_clock, |
| 227 | .set_pcie_lanes = &rv370_set_pcie_lanes, |
| 228 | .set_clock_gating = &radeon_atom_set_clock_gating, |
Dave Airlie | e024e11 | 2009-06-24 09:48:08 +1000 | [diff] [blame] | 229 | .set_surface_reg = r100_set_surface_reg, |
| 230 | .clear_surface_reg = r100_clear_surface_reg, |
Jerome Glisse | c93bb85 | 2009-07-13 21:04:08 +0200 | [diff] [blame] | 231 | .bandwidth_update = &r100_bandwidth_update, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 232 | }; |
| 233 | |
| 234 | |
| 235 | /* |
| 236 | * rs400,rs480 |
| 237 | */ |
Jerome Glisse | ca6ffc6 | 2009-10-01 10:20:52 +0200 | [diff] [blame] | 238 | extern int rs400_init(struct radeon_device *rdev); |
| 239 | extern void rs400_fini(struct radeon_device *rdev); |
| 240 | extern int rs400_suspend(struct radeon_device *rdev); |
| 241 | extern int rs400_resume(struct radeon_device *rdev); |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 242 | void rs400_gart_tlb_flush(struct radeon_device *rdev); |
| 243 | int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); |
| 244 | uint32_t rs400_mc_rreg(struct radeon_device *rdev, uint32_t reg); |
| 245 | void rs400_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); |
| 246 | static struct radeon_asic rs400_asic = { |
Jerome Glisse | ca6ffc6 | 2009-10-01 10:20:52 +0200 | [diff] [blame] | 247 | .init = &rs400_init, |
| 248 | .fini = &rs400_fini, |
| 249 | .suspend = &rs400_suspend, |
| 250 | .resume = &rs400_resume, |
| 251 | .errata = NULL, |
| 252 | .vram_info = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 253 | .gpu_reset = &r300_gpu_reset, |
Jerome Glisse | ca6ffc6 | 2009-10-01 10:20:52 +0200 | [diff] [blame] | 254 | .mc_init = NULL, |
| 255 | .mc_fini = NULL, |
| 256 | .wb_init = NULL, |
| 257 | .wb_fini = NULL, |
| 258 | .gart_init = NULL, |
| 259 | .gart_fini = NULL, |
| 260 | .gart_enable = NULL, |
| 261 | .gart_disable = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 262 | .gart_tlb_flush = &rs400_gart_tlb_flush, |
| 263 | .gart_set_page = &rs400_gart_set_page, |
Jerome Glisse | ca6ffc6 | 2009-10-01 10:20:52 +0200 | [diff] [blame] | 264 | .cp_init = NULL, |
| 265 | .cp_fini = NULL, |
| 266 | .cp_disable = NULL, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 267 | .cp_commit = &r100_cp_commit, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 268 | .ring_start = &r300_ring_start, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 269 | .ring_test = &r100_ring_test, |
| 270 | .ring_ib_execute = &r100_ring_ib_execute, |
Jerome Glisse | ca6ffc6 | 2009-10-01 10:20:52 +0200 | [diff] [blame] | 271 | .ib_test = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 272 | .irq_set = &r100_irq_set, |
| 273 | .irq_process = &r100_irq_process, |
Michel Dänzer | 7ed220d | 2009-08-13 11:10:51 +0200 | [diff] [blame] | 274 | .get_vblank_counter = &r100_get_vblank_counter, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 275 | .fence_ring_emit = &r300_fence_ring_emit, |
| 276 | .cs_parse = &r300_cs_parse, |
| 277 | .copy_blit = &r100_copy_blit, |
| 278 | .copy_dma = &r300_copy_dma, |
| 279 | .copy = &r100_copy_blit, |
| 280 | .set_engine_clock = &radeon_legacy_set_engine_clock, |
| 281 | .set_memory_clock = NULL, |
| 282 | .set_pcie_lanes = NULL, |
| 283 | .set_clock_gating = &radeon_legacy_set_clock_gating, |
Dave Airlie | e024e11 | 2009-06-24 09:48:08 +1000 | [diff] [blame] | 284 | .set_surface_reg = r100_set_surface_reg, |
| 285 | .clear_surface_reg = r100_clear_surface_reg, |
Jerome Glisse | c93bb85 | 2009-07-13 21:04:08 +0200 | [diff] [blame] | 286 | .bandwidth_update = &r100_bandwidth_update, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 287 | }; |
| 288 | |
| 289 | |
| 290 | /* |
| 291 | * rs600. |
| 292 | */ |
Dave Airlie | 3f7dc91a | 2009-08-27 11:10:15 +1000 | [diff] [blame] | 293 | int rs600_init(struct radeon_device *rdev); |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 294 | void rs600_errata(struct radeon_device *rdev); |
| 295 | void rs600_vram_info(struct radeon_device *rdev); |
| 296 | int rs600_mc_init(struct radeon_device *rdev); |
| 297 | void rs600_mc_fini(struct radeon_device *rdev); |
| 298 | int rs600_irq_set(struct radeon_device *rdev); |
Michel Dänzer | 7ed220d | 2009-08-13 11:10:51 +0200 | [diff] [blame] | 299 | int rs600_irq_process(struct radeon_device *rdev); |
| 300 | u32 rs600_get_vblank_counter(struct radeon_device *rdev, int crtc); |
Jerome Glisse | 4aac047 | 2009-09-14 18:29:49 +0200 | [diff] [blame] | 301 | int rs600_gart_init(struct radeon_device *rdev); |
| 302 | void rs600_gart_fini(struct radeon_device *rdev); |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 303 | int rs600_gart_enable(struct radeon_device *rdev); |
| 304 | void rs600_gart_disable(struct radeon_device *rdev); |
| 305 | void rs600_gart_tlb_flush(struct radeon_device *rdev); |
| 306 | int rs600_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); |
| 307 | uint32_t rs600_mc_rreg(struct radeon_device *rdev, uint32_t reg); |
| 308 | void rs600_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); |
Jerome Glisse | c93bb85 | 2009-07-13 21:04:08 +0200 | [diff] [blame] | 309 | void rs600_bandwidth_update(struct radeon_device *rdev); |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 310 | static struct radeon_asic rs600_asic = { |
Dave Airlie | 3f7dc91a | 2009-08-27 11:10:15 +1000 | [diff] [blame] | 311 | .init = &rs600_init, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 312 | .errata = &rs600_errata, |
| 313 | .vram_info = &rs600_vram_info, |
| 314 | .gpu_reset = &r300_gpu_reset, |
| 315 | .mc_init = &rs600_mc_init, |
| 316 | .mc_fini = &rs600_mc_fini, |
| 317 | .wb_init = &r100_wb_init, |
| 318 | .wb_fini = &r100_wb_fini, |
Jerome Glisse | 4aac047 | 2009-09-14 18:29:49 +0200 | [diff] [blame] | 319 | .gart_init = &rs600_gart_init, |
| 320 | .gart_fini = &rs600_gart_fini, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 321 | .gart_enable = &rs600_gart_enable, |
| 322 | .gart_disable = &rs600_gart_disable, |
| 323 | .gart_tlb_flush = &rs600_gart_tlb_flush, |
| 324 | .gart_set_page = &rs600_gart_set_page, |
| 325 | .cp_init = &r100_cp_init, |
| 326 | .cp_fini = &r100_cp_fini, |
| 327 | .cp_disable = &r100_cp_disable, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 328 | .cp_commit = &r100_cp_commit, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 329 | .ring_start = &r300_ring_start, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 330 | .ring_test = &r100_ring_test, |
| 331 | .ring_ib_execute = &r100_ring_ib_execute, |
| 332 | .ib_test = &r100_ib_test, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 333 | .irq_set = &rs600_irq_set, |
Michel Dänzer | 7ed220d | 2009-08-13 11:10:51 +0200 | [diff] [blame] | 334 | .irq_process = &rs600_irq_process, |
| 335 | .get_vblank_counter = &rs600_get_vblank_counter, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 336 | .fence_ring_emit = &r300_fence_ring_emit, |
| 337 | .cs_parse = &r300_cs_parse, |
| 338 | .copy_blit = &r100_copy_blit, |
| 339 | .copy_dma = &r300_copy_dma, |
| 340 | .copy = &r100_copy_blit, |
| 341 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 342 | .set_memory_clock = &radeon_atom_set_memory_clock, |
| 343 | .set_pcie_lanes = NULL, |
| 344 | .set_clock_gating = &radeon_atom_set_clock_gating, |
Jerome Glisse | c93bb85 | 2009-07-13 21:04:08 +0200 | [diff] [blame] | 345 | .bandwidth_update = &rs600_bandwidth_update, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 346 | }; |
| 347 | |
| 348 | |
| 349 | /* |
| 350 | * rs690,rs740 |
| 351 | */ |
Jerome Glisse | 3bc6853 | 2009-10-01 09:39:24 +0200 | [diff] [blame^] | 352 | int rs690_init(struct radeon_device *rdev); |
| 353 | void rs690_fini(struct radeon_device *rdev); |
| 354 | int rs690_resume(struct radeon_device *rdev); |
| 355 | int rs690_suspend(struct radeon_device *rdev); |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 356 | uint32_t rs690_mc_rreg(struct radeon_device *rdev, uint32_t reg); |
| 357 | void rs690_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); |
Jerome Glisse | c93bb85 | 2009-07-13 21:04:08 +0200 | [diff] [blame] | 358 | void rs690_bandwidth_update(struct radeon_device *rdev); |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 359 | static struct radeon_asic rs690_asic = { |
Jerome Glisse | 3bc6853 | 2009-10-01 09:39:24 +0200 | [diff] [blame^] | 360 | .init = &rs690_init, |
| 361 | .fini = &rs690_fini, |
| 362 | .suspend = &rs690_suspend, |
| 363 | .resume = &rs690_resume, |
| 364 | .errata = NULL, |
| 365 | .vram_info = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 366 | .gpu_reset = &r300_gpu_reset, |
Jerome Glisse | 3bc6853 | 2009-10-01 09:39:24 +0200 | [diff] [blame^] | 367 | .mc_init = NULL, |
| 368 | .mc_fini = NULL, |
| 369 | .wb_init = NULL, |
| 370 | .wb_fini = NULL, |
| 371 | .gart_init = NULL, |
| 372 | .gart_fini = NULL, |
| 373 | .gart_enable = NULL, |
| 374 | .gart_disable = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 375 | .gart_tlb_flush = &rs400_gart_tlb_flush, |
| 376 | .gart_set_page = &rs400_gart_set_page, |
Jerome Glisse | 3bc6853 | 2009-10-01 09:39:24 +0200 | [diff] [blame^] | 377 | .cp_init = NULL, |
| 378 | .cp_fini = NULL, |
| 379 | .cp_disable = NULL, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 380 | .cp_commit = &r100_cp_commit, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 381 | .ring_start = &r300_ring_start, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 382 | .ring_test = &r100_ring_test, |
| 383 | .ring_ib_execute = &r100_ring_ib_execute, |
Jerome Glisse | 3bc6853 | 2009-10-01 09:39:24 +0200 | [diff] [blame^] | 384 | .ib_test = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 385 | .irq_set = &rs600_irq_set, |
Michel Dänzer | 7ed220d | 2009-08-13 11:10:51 +0200 | [diff] [blame] | 386 | .irq_process = &rs600_irq_process, |
| 387 | .get_vblank_counter = &rs600_get_vblank_counter, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 388 | .fence_ring_emit = &r300_fence_ring_emit, |
| 389 | .cs_parse = &r300_cs_parse, |
| 390 | .copy_blit = &r100_copy_blit, |
| 391 | .copy_dma = &r300_copy_dma, |
| 392 | .copy = &r300_copy_dma, |
| 393 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 394 | .set_memory_clock = &radeon_atom_set_memory_clock, |
| 395 | .set_pcie_lanes = NULL, |
| 396 | .set_clock_gating = &radeon_atom_set_clock_gating, |
Dave Airlie | e024e11 | 2009-06-24 09:48:08 +1000 | [diff] [blame] | 397 | .set_surface_reg = r100_set_surface_reg, |
| 398 | .clear_surface_reg = r100_clear_surface_reg, |
Jerome Glisse | c93bb85 | 2009-07-13 21:04:08 +0200 | [diff] [blame] | 399 | .bandwidth_update = &rs690_bandwidth_update, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 400 | }; |
| 401 | |
| 402 | |
| 403 | /* |
| 404 | * rv515 |
| 405 | */ |
Jerome Glisse | 068a117 | 2009-06-17 13:28:30 +0200 | [diff] [blame] | 406 | int rv515_init(struct radeon_device *rdev); |
Jerome Glisse | d39c3b8 | 2009-09-28 18:34:43 +0200 | [diff] [blame] | 407 | void rv515_fini(struct radeon_device *rdev); |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 408 | int rv515_gpu_reset(struct radeon_device *rdev); |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 409 | uint32_t rv515_mc_rreg(struct radeon_device *rdev, uint32_t reg); |
| 410 | void rv515_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); |
| 411 | void rv515_ring_start(struct radeon_device *rdev); |
| 412 | uint32_t rv515_pcie_rreg(struct radeon_device *rdev, uint32_t reg); |
| 413 | void rv515_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); |
Jerome Glisse | c93bb85 | 2009-07-13 21:04:08 +0200 | [diff] [blame] | 414 | void rv515_bandwidth_update(struct radeon_device *rdev); |
Jerome Glisse | d39c3b8 | 2009-09-28 18:34:43 +0200 | [diff] [blame] | 415 | int rv515_resume(struct radeon_device *rdev); |
| 416 | int rv515_suspend(struct radeon_device *rdev); |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 417 | static struct radeon_asic rv515_asic = { |
Jerome Glisse | 068a117 | 2009-06-17 13:28:30 +0200 | [diff] [blame] | 418 | .init = &rv515_init, |
Jerome Glisse | d39c3b8 | 2009-09-28 18:34:43 +0200 | [diff] [blame] | 419 | .fini = &rv515_fini, |
| 420 | .suspend = &rv515_suspend, |
| 421 | .resume = &rv515_resume, |
| 422 | .errata = NULL, |
| 423 | .vram_info = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 424 | .gpu_reset = &rv515_gpu_reset, |
Jerome Glisse | d39c3b8 | 2009-09-28 18:34:43 +0200 | [diff] [blame] | 425 | .mc_init = NULL, |
| 426 | .mc_fini = NULL, |
| 427 | .wb_init = NULL, |
| 428 | .wb_fini = NULL, |
Jerome Glisse | 4aac047 | 2009-09-14 18:29:49 +0200 | [diff] [blame] | 429 | .gart_init = &rv370_pcie_gart_init, |
| 430 | .gart_fini = &rv370_pcie_gart_fini, |
Jerome Glisse | d39c3b8 | 2009-09-28 18:34:43 +0200 | [diff] [blame] | 431 | .gart_enable = NULL, |
| 432 | .gart_disable = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 433 | .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, |
| 434 | .gart_set_page = &rv370_pcie_gart_set_page, |
Jerome Glisse | d39c3b8 | 2009-09-28 18:34:43 +0200 | [diff] [blame] | 435 | .cp_init = NULL, |
| 436 | .cp_fini = NULL, |
| 437 | .cp_disable = NULL, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 438 | .cp_commit = &r100_cp_commit, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 439 | .ring_start = &rv515_ring_start, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 440 | .ring_test = &r100_ring_test, |
| 441 | .ring_ib_execute = &r100_ring_ib_execute, |
Jerome Glisse | d39c3b8 | 2009-09-28 18:34:43 +0200 | [diff] [blame] | 442 | .ib_test = NULL, |
Michel Dänzer | 7ed220d | 2009-08-13 11:10:51 +0200 | [diff] [blame] | 443 | .irq_set = &rs600_irq_set, |
| 444 | .irq_process = &rs600_irq_process, |
| 445 | .get_vblank_counter = &rs600_get_vblank_counter, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 446 | .fence_ring_emit = &r300_fence_ring_emit, |
Jerome Glisse | 068a117 | 2009-06-17 13:28:30 +0200 | [diff] [blame] | 447 | .cs_parse = &r300_cs_parse, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 448 | .copy_blit = &r100_copy_blit, |
| 449 | .copy_dma = &r300_copy_dma, |
| 450 | .copy = &r100_copy_blit, |
| 451 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 452 | .set_memory_clock = &radeon_atom_set_memory_clock, |
| 453 | .set_pcie_lanes = &rv370_set_pcie_lanes, |
| 454 | .set_clock_gating = &radeon_atom_set_clock_gating, |
Dave Airlie | e024e11 | 2009-06-24 09:48:08 +1000 | [diff] [blame] | 455 | .set_surface_reg = r100_set_surface_reg, |
| 456 | .clear_surface_reg = r100_clear_surface_reg, |
Jerome Glisse | c93bb85 | 2009-07-13 21:04:08 +0200 | [diff] [blame] | 457 | .bandwidth_update = &rv515_bandwidth_update, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 458 | }; |
| 459 | |
| 460 | |
| 461 | /* |
| 462 | * r520,rv530,rv560,rv570,r580 |
| 463 | */ |
Jerome Glisse | d39c3b8 | 2009-09-28 18:34:43 +0200 | [diff] [blame] | 464 | int r520_init(struct radeon_device *rdev); |
Jerome Glisse | f0ed1f6 | 2009-09-28 20:39:19 +0200 | [diff] [blame] | 465 | int r520_resume(struct radeon_device *rdev); |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 466 | static struct radeon_asic r520_asic = { |
Jerome Glisse | d39c3b8 | 2009-09-28 18:34:43 +0200 | [diff] [blame] | 467 | .init = &r520_init, |
Jerome Glisse | f0ed1f6 | 2009-09-28 20:39:19 +0200 | [diff] [blame] | 468 | .fini = &rv515_fini, |
| 469 | .suspend = &rv515_suspend, |
| 470 | .resume = &r520_resume, |
| 471 | .errata = NULL, |
| 472 | .vram_info = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 473 | .gpu_reset = &rv515_gpu_reset, |
Jerome Glisse | f0ed1f6 | 2009-09-28 20:39:19 +0200 | [diff] [blame] | 474 | .mc_init = NULL, |
| 475 | .mc_fini = NULL, |
| 476 | .wb_init = NULL, |
| 477 | .wb_fini = NULL, |
| 478 | .gart_init = NULL, |
| 479 | .gart_fini = NULL, |
| 480 | .gart_enable = NULL, |
| 481 | .gart_disable = NULL, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 482 | .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, |
| 483 | .gart_set_page = &rv370_pcie_gart_set_page, |
Jerome Glisse | f0ed1f6 | 2009-09-28 20:39:19 +0200 | [diff] [blame] | 484 | .cp_init = NULL, |
| 485 | .cp_fini = NULL, |
| 486 | .cp_disable = NULL, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 487 | .cp_commit = &r100_cp_commit, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 488 | .ring_start = &rv515_ring_start, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 489 | .ring_test = &r100_ring_test, |
| 490 | .ring_ib_execute = &r100_ring_ib_execute, |
Jerome Glisse | f0ed1f6 | 2009-09-28 20:39:19 +0200 | [diff] [blame] | 491 | .ib_test = NULL, |
Michel Dänzer | 7ed220d | 2009-08-13 11:10:51 +0200 | [diff] [blame] | 492 | .irq_set = &rs600_irq_set, |
| 493 | .irq_process = &rs600_irq_process, |
| 494 | .get_vblank_counter = &rs600_get_vblank_counter, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 495 | .fence_ring_emit = &r300_fence_ring_emit, |
Jerome Glisse | 068a117 | 2009-06-17 13:28:30 +0200 | [diff] [blame] | 496 | .cs_parse = &r300_cs_parse, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 497 | .copy_blit = &r100_copy_blit, |
| 498 | .copy_dma = &r300_copy_dma, |
| 499 | .copy = &r100_copy_blit, |
| 500 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 501 | .set_memory_clock = &radeon_atom_set_memory_clock, |
| 502 | .set_pcie_lanes = &rv370_set_pcie_lanes, |
| 503 | .set_clock_gating = &radeon_atom_set_clock_gating, |
Dave Airlie | e024e11 | 2009-06-24 09:48:08 +1000 | [diff] [blame] | 504 | .set_surface_reg = r100_set_surface_reg, |
| 505 | .clear_surface_reg = r100_clear_surface_reg, |
Jerome Glisse | f0ed1f6 | 2009-09-28 20:39:19 +0200 | [diff] [blame] | 506 | .bandwidth_update = &rv515_bandwidth_update, |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 507 | }; |
| 508 | |
| 509 | /* |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 510 | * r600,rv610,rv630,rv620,rv635,rv670,rs780,rs880 |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 511 | */ |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 512 | int r600_init(struct radeon_device *rdev); |
| 513 | void r600_fini(struct radeon_device *rdev); |
| 514 | int r600_suspend(struct radeon_device *rdev); |
| 515 | int r600_resume(struct radeon_device *rdev); |
| 516 | int r600_wb_init(struct radeon_device *rdev); |
| 517 | void r600_wb_fini(struct radeon_device *rdev); |
| 518 | void r600_cp_commit(struct radeon_device *rdev); |
| 519 | void r600_pcie_gart_tlb_flush(struct radeon_device *rdev); |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 520 | uint32_t r600_pciep_rreg(struct radeon_device *rdev, uint32_t reg); |
| 521 | void r600_pciep_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 522 | int r600_cs_parse(struct radeon_cs_parser *p); |
| 523 | void r600_fence_ring_emit(struct radeon_device *rdev, |
| 524 | struct radeon_fence *fence); |
| 525 | int r600_copy_dma(struct radeon_device *rdev, |
| 526 | uint64_t src_offset, |
| 527 | uint64_t dst_offset, |
| 528 | unsigned num_pages, |
| 529 | struct radeon_fence *fence); |
| 530 | int r600_irq_process(struct radeon_device *rdev); |
| 531 | int r600_irq_set(struct radeon_device *rdev); |
| 532 | int r600_gpu_reset(struct radeon_device *rdev); |
| 533 | int r600_set_surface_reg(struct radeon_device *rdev, int reg, |
| 534 | uint32_t tiling_flags, uint32_t pitch, |
| 535 | uint32_t offset, uint32_t obj_size); |
| 536 | int r600_clear_surface_reg(struct radeon_device *rdev, int reg); |
| 537 | void r600_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); |
| 538 | int r600_ib_test(struct radeon_device *rdev); |
| 539 | int r600_ring_test(struct radeon_device *rdev); |
| 540 | int r600_copy_blit(struct radeon_device *rdev, |
| 541 | uint64_t src_offset, uint64_t dst_offset, |
| 542 | unsigned num_pages, struct radeon_fence *fence); |
| 543 | |
| 544 | static struct radeon_asic r600_asic = { |
| 545 | .errata = NULL, |
| 546 | .init = &r600_init, |
| 547 | .fini = &r600_fini, |
| 548 | .suspend = &r600_suspend, |
| 549 | .resume = &r600_resume, |
| 550 | .cp_commit = &r600_cp_commit, |
| 551 | .vram_info = NULL, |
| 552 | .gpu_reset = &r600_gpu_reset, |
| 553 | .mc_init = NULL, |
| 554 | .mc_fini = NULL, |
| 555 | .wb_init = &r600_wb_init, |
| 556 | .wb_fini = &r600_wb_fini, |
| 557 | .gart_enable = NULL, |
| 558 | .gart_disable = NULL, |
| 559 | .gart_tlb_flush = &r600_pcie_gart_tlb_flush, |
| 560 | .gart_set_page = &rs600_gart_set_page, |
| 561 | .cp_init = NULL, |
| 562 | .cp_fini = NULL, |
| 563 | .cp_disable = NULL, |
| 564 | .ring_start = NULL, |
| 565 | .ring_test = &r600_ring_test, |
| 566 | .ring_ib_execute = &r600_ring_ib_execute, |
| 567 | .ib_test = &r600_ib_test, |
| 568 | .irq_set = &r600_irq_set, |
| 569 | .irq_process = &r600_irq_process, |
| 570 | .fence_ring_emit = &r600_fence_ring_emit, |
| 571 | .cs_parse = &r600_cs_parse, |
| 572 | .copy_blit = &r600_copy_blit, |
| 573 | .copy_dma = &r600_copy_blit, |
Alex Deucher | a381287 | 2009-09-10 15:54:35 -0400 | [diff] [blame] | 574 | .copy = &r600_copy_blit, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 575 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 576 | .set_memory_clock = &radeon_atom_set_memory_clock, |
| 577 | .set_pcie_lanes = NULL, |
| 578 | .set_clock_gating = &radeon_atom_set_clock_gating, |
| 579 | .set_surface_reg = r600_set_surface_reg, |
| 580 | .clear_surface_reg = r600_clear_surface_reg, |
Jerome Glisse | f0ed1f6 | 2009-09-28 20:39:19 +0200 | [diff] [blame] | 581 | .bandwidth_update = &rv515_bandwidth_update, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 582 | }; |
| 583 | |
| 584 | /* |
| 585 | * rv770,rv730,rv710,rv740 |
| 586 | */ |
| 587 | int rv770_init(struct radeon_device *rdev); |
| 588 | void rv770_fini(struct radeon_device *rdev); |
| 589 | int rv770_suspend(struct radeon_device *rdev); |
| 590 | int rv770_resume(struct radeon_device *rdev); |
| 591 | int rv770_gpu_reset(struct radeon_device *rdev); |
| 592 | |
| 593 | static struct radeon_asic rv770_asic = { |
| 594 | .errata = NULL, |
| 595 | .init = &rv770_init, |
| 596 | .fini = &rv770_fini, |
| 597 | .suspend = &rv770_suspend, |
| 598 | .resume = &rv770_resume, |
| 599 | .cp_commit = &r600_cp_commit, |
| 600 | .vram_info = NULL, |
| 601 | .gpu_reset = &rv770_gpu_reset, |
| 602 | .mc_init = NULL, |
| 603 | .mc_fini = NULL, |
| 604 | .wb_init = &r600_wb_init, |
| 605 | .wb_fini = &r600_wb_fini, |
| 606 | .gart_enable = NULL, |
| 607 | .gart_disable = NULL, |
| 608 | .gart_tlb_flush = &r600_pcie_gart_tlb_flush, |
| 609 | .gart_set_page = &rs600_gart_set_page, |
| 610 | .cp_init = NULL, |
| 611 | .cp_fini = NULL, |
| 612 | .cp_disable = NULL, |
| 613 | .ring_start = NULL, |
| 614 | .ring_test = &r600_ring_test, |
| 615 | .ring_ib_execute = &r600_ring_ib_execute, |
| 616 | .ib_test = &r600_ib_test, |
| 617 | .irq_set = &r600_irq_set, |
| 618 | .irq_process = &r600_irq_process, |
| 619 | .fence_ring_emit = &r600_fence_ring_emit, |
| 620 | .cs_parse = &r600_cs_parse, |
| 621 | .copy_blit = &r600_copy_blit, |
| 622 | .copy_dma = &r600_copy_blit, |
Alex Deucher | a381287 | 2009-09-10 15:54:35 -0400 | [diff] [blame] | 623 | .copy = &r600_copy_blit, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 624 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 625 | .set_memory_clock = &radeon_atom_set_memory_clock, |
| 626 | .set_pcie_lanes = NULL, |
| 627 | .set_clock_gating = &radeon_atom_set_clock_gating, |
| 628 | .set_surface_reg = r600_set_surface_reg, |
| 629 | .clear_surface_reg = r600_clear_surface_reg, |
Jerome Glisse | f0ed1f6 | 2009-09-28 20:39:19 +0200 | [diff] [blame] | 630 | .bandwidth_update = &rv515_bandwidth_update, |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 631 | }; |
Jerome Glisse | 771fe6b | 2009-06-05 14:42:42 +0200 | [diff] [blame] | 632 | |
| 633 | #endif |