Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [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 | |
| 29 | #include <linux/console.h> |
| 30 | #include <drm/drmP.h> |
| 31 | #include <drm/drm_crtc_helper.h> |
| 32 | #include <drm/radeon_drm.h> |
| 33 | #include <linux/vgaarb.h> |
| 34 | #include <linux/vga_switcheroo.h> |
| 35 | #include "radeon_reg.h" |
| 36 | #include "radeon.h" |
| 37 | #include "radeon_asic.h" |
| 38 | #include "atom.h" |
| 39 | |
| 40 | /* |
| 41 | * Registers accessors functions. |
| 42 | */ |
Alex Deucher | abf1dc6 | 2012-07-17 14:02:36 -0400 | [diff] [blame] | 43 | /** |
| 44 | * radeon_invalid_rreg - dummy reg read function |
| 45 | * |
| 46 | * @rdev: radeon device pointer |
| 47 | * @reg: offset of register |
| 48 | * |
| 49 | * Dummy register read function. Used for register blocks |
| 50 | * that certain asics don't have (all asics). |
| 51 | * Returns the value in the register. |
| 52 | */ |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 53 | static uint32_t radeon_invalid_rreg(struct radeon_device *rdev, uint32_t reg) |
| 54 | { |
| 55 | DRM_ERROR("Invalid callback to read register 0x%04X\n", reg); |
| 56 | BUG_ON(1); |
| 57 | return 0; |
| 58 | } |
| 59 | |
Alex Deucher | abf1dc6 | 2012-07-17 14:02:36 -0400 | [diff] [blame] | 60 | /** |
| 61 | * radeon_invalid_wreg - dummy reg write function |
| 62 | * |
| 63 | * @rdev: radeon device pointer |
| 64 | * @reg: offset of register |
| 65 | * @v: value to write to the register |
| 66 | * |
| 67 | * Dummy register read function. Used for register blocks |
| 68 | * that certain asics don't have (all asics). |
| 69 | */ |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 70 | static void radeon_invalid_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v) |
| 71 | { |
| 72 | DRM_ERROR("Invalid callback to write register 0x%04X with 0x%08X\n", |
| 73 | reg, v); |
| 74 | BUG_ON(1); |
| 75 | } |
| 76 | |
Alex Deucher | abf1dc6 | 2012-07-17 14:02:36 -0400 | [diff] [blame] | 77 | /** |
| 78 | * radeon_register_accessor_init - sets up the register accessor callbacks |
| 79 | * |
| 80 | * @rdev: radeon device pointer |
| 81 | * |
| 82 | * Sets up the register accessor callbacks for various register |
| 83 | * apertures. Not all asics have all apertures (all asics). |
| 84 | */ |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 85 | static void radeon_register_accessor_init(struct radeon_device *rdev) |
| 86 | { |
| 87 | rdev->mc_rreg = &radeon_invalid_rreg; |
| 88 | rdev->mc_wreg = &radeon_invalid_wreg; |
| 89 | rdev->pll_rreg = &radeon_invalid_rreg; |
| 90 | rdev->pll_wreg = &radeon_invalid_wreg; |
| 91 | rdev->pciep_rreg = &radeon_invalid_rreg; |
| 92 | rdev->pciep_wreg = &radeon_invalid_wreg; |
| 93 | |
| 94 | /* Don't change order as we are overridding accessor. */ |
| 95 | if (rdev->family < CHIP_RV515) { |
| 96 | rdev->pcie_reg_mask = 0xff; |
| 97 | } else { |
| 98 | rdev->pcie_reg_mask = 0x7ff; |
| 99 | } |
| 100 | /* FIXME: not sure here */ |
| 101 | if (rdev->family <= CHIP_R580) { |
| 102 | rdev->pll_rreg = &r100_pll_rreg; |
| 103 | rdev->pll_wreg = &r100_pll_wreg; |
| 104 | } |
| 105 | if (rdev->family >= CHIP_R420) { |
| 106 | rdev->mc_rreg = &r420_mc_rreg; |
| 107 | rdev->mc_wreg = &r420_mc_wreg; |
| 108 | } |
| 109 | if (rdev->family >= CHIP_RV515) { |
| 110 | rdev->mc_rreg = &rv515_mc_rreg; |
| 111 | rdev->mc_wreg = &rv515_mc_wreg; |
| 112 | } |
| 113 | if (rdev->family == CHIP_RS400 || rdev->family == CHIP_RS480) { |
| 114 | rdev->mc_rreg = &rs400_mc_rreg; |
| 115 | rdev->mc_wreg = &rs400_mc_wreg; |
| 116 | } |
| 117 | if (rdev->family == CHIP_RS690 || rdev->family == CHIP_RS740) { |
| 118 | rdev->mc_rreg = &rs690_mc_rreg; |
| 119 | rdev->mc_wreg = &rs690_mc_wreg; |
| 120 | } |
| 121 | if (rdev->family == CHIP_RS600) { |
| 122 | rdev->mc_rreg = &rs600_mc_rreg; |
| 123 | rdev->mc_wreg = &rs600_mc_wreg; |
| 124 | } |
Samuel Li | 65337e6 | 2013-04-05 17:50:53 -0400 | [diff] [blame] | 125 | if (rdev->family == CHIP_RS780 || rdev->family == CHIP_RS880) { |
| 126 | rdev->mc_rreg = &rs780_mc_rreg; |
| 127 | rdev->mc_wreg = &rs780_mc_wreg; |
| 128 | } |
Alex Deucher | 6e2c3c0 | 2013-04-03 19:28:32 -0400 | [diff] [blame] | 129 | |
| 130 | if (rdev->family >= CHIP_BONAIRE) { |
| 131 | rdev->pciep_rreg = &cik_pciep_rreg; |
| 132 | rdev->pciep_wreg = &cik_pciep_wreg; |
| 133 | } else if (rdev->family >= CHIP_R600) { |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 134 | rdev->pciep_rreg = &r600_pciep_rreg; |
| 135 | rdev->pciep_wreg = &r600_pciep_wreg; |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | |
| 140 | /* helper to disable agp */ |
Alex Deucher | abf1dc6 | 2012-07-17 14:02:36 -0400 | [diff] [blame] | 141 | /** |
| 142 | * radeon_agp_disable - AGP disable helper function |
| 143 | * |
| 144 | * @rdev: radeon device pointer |
| 145 | * |
| 146 | * Removes AGP flags and changes the gart callbacks on AGP |
| 147 | * cards when using the internal gart rather than AGP (all asics). |
| 148 | */ |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 149 | void radeon_agp_disable(struct radeon_device *rdev) |
| 150 | { |
| 151 | rdev->flags &= ~RADEON_IS_AGP; |
| 152 | if (rdev->family >= CHIP_R600) { |
| 153 | DRM_INFO("Forcing AGP to PCIE mode\n"); |
| 154 | rdev->flags |= RADEON_IS_PCIE; |
| 155 | } else if (rdev->family >= CHIP_RV515 || |
| 156 | rdev->family == CHIP_RV380 || |
| 157 | rdev->family == CHIP_RV410 || |
| 158 | rdev->family == CHIP_R423) { |
| 159 | DRM_INFO("Forcing AGP to PCIE mode\n"); |
| 160 | rdev->flags |= RADEON_IS_PCIE; |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 161 | rdev->asic->gart.tlb_flush = &rv370_pcie_gart_tlb_flush; |
| 162 | rdev->asic->gart.set_page = &rv370_pcie_gart_set_page; |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 163 | } else { |
| 164 | DRM_INFO("Forcing AGP to PCI mode\n"); |
| 165 | rdev->flags |= RADEON_IS_PCI; |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 166 | rdev->asic->gart.tlb_flush = &r100_pci_gart_tlb_flush; |
| 167 | rdev->asic->gart.set_page = &r100_pci_gart_set_page; |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 168 | } |
| 169 | rdev->mc.gtt_size = radeon_gart_size * 1024 * 1024; |
| 170 | } |
| 171 | |
| 172 | /* |
| 173 | * ASIC |
| 174 | */ |
Daniel Vetter | 48e7a5f | 2010-03-11 21:19:15 +0000 | [diff] [blame] | 175 | static struct radeon_asic r100_asic = { |
| 176 | .init = &r100_init, |
| 177 | .fini = &r100_fini, |
| 178 | .suspend = &r100_suspend, |
| 179 | .resume = &r100_resume, |
| 180 | .vga_set_state = &r100_vga_set_state, |
Jerome Glisse | a2d07b7 | 2010-03-09 14:45:11 +0000 | [diff] [blame] | 181 | .asic_reset = &r100_asic_reset, |
Alex Deucher | 54e88e0 | 2012-02-23 18:10:29 -0500 | [diff] [blame] | 182 | .ioctl_wait_idle = NULL, |
| 183 | .gui_idle = &r100_gui_idle, |
| 184 | .mc_wait_for_idle = &r100_mc_wait_for_idle, |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 185 | .gart = { |
| 186 | .tlb_flush = &r100_pci_gart_tlb_flush, |
| 187 | .set_page = &r100_pci_gart_set_page, |
| 188 | }, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 189 | .ring = { |
| 190 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 191 | .ib_execute = &r100_ring_ib_execute, |
| 192 | .emit_fence = &r100_fence_ring_emit, |
| 193 | .emit_semaphore = &r100_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 194 | .cs_parse = &r100_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 195 | .ring_start = &r100_ring_start, |
| 196 | .ring_test = &r100_ring_test, |
| 197 | .ib_test = &r100_ib_test, |
Christian König | 312c4a8 | 2012-05-02 15:11:09 +0200 | [diff] [blame] | 198 | .is_lockup = &r100_gpu_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 199 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 200 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 201 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 202 | } |
| 203 | }, |
Alex Deucher | b35ea4a | 2012-02-23 17:53:43 -0500 | [diff] [blame] | 204 | .irq = { |
| 205 | .set = &r100_irq_set, |
| 206 | .process = &r100_irq_process, |
| 207 | }, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 208 | .display = { |
| 209 | .bandwidth_update = &r100_bandwidth_update, |
| 210 | .get_vblank_counter = &r100_get_vblank_counter, |
| 211 | .wait_for_vblank = &r100_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 212 | .set_backlight_level = &radeon_legacy_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 213 | .get_backlight_level = &radeon_legacy_get_backlight_level, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 214 | }, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 215 | .copy = { |
| 216 | .blit = &r100_copy_blit, |
| 217 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 218 | .dma = NULL, |
| 219 | .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 220 | .copy = &r100_copy_blit, |
| 221 | .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 222 | }, |
Alex Deucher | 9e6f3d0 | 2012-02-23 17:53:49 -0500 | [diff] [blame] | 223 | .surface = { |
| 224 | .set_reg = r100_set_surface_reg, |
| 225 | .clear_reg = r100_clear_surface_reg, |
| 226 | }, |
Alex Deucher | 901ea57 | 2012-02-23 17:53:39 -0500 | [diff] [blame] | 227 | .hpd = { |
| 228 | .init = &r100_hpd_init, |
| 229 | .fini = &r100_hpd_fini, |
| 230 | .sense = &r100_hpd_sense, |
| 231 | .set_polarity = &r100_hpd_set_polarity, |
| 232 | }, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 233 | .pm = { |
| 234 | .misc = &r100_pm_misc, |
| 235 | .prepare = &r100_pm_prepare, |
| 236 | .finish = &r100_pm_finish, |
| 237 | .init_profile = &r100_pm_init_profile, |
| 238 | .get_dynpm_state = &r100_pm_get_dynpm_state, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 239 | .get_engine_clock = &radeon_legacy_get_engine_clock, |
| 240 | .set_engine_clock = &radeon_legacy_set_engine_clock, |
| 241 | .get_memory_clock = &radeon_legacy_get_memory_clock, |
| 242 | .set_memory_clock = NULL, |
| 243 | .get_pcie_lanes = NULL, |
| 244 | .set_pcie_lanes = NULL, |
| 245 | .set_clock_gating = &radeon_legacy_set_clock_gating, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 246 | }, |
Alex Deucher | 0f9e006 | 2012-02-23 17:53:40 -0500 | [diff] [blame] | 247 | .pflip = { |
| 248 | .pre_page_flip = &r100_pre_page_flip, |
| 249 | .page_flip = &r100_page_flip, |
| 250 | .post_page_flip = &r100_post_page_flip, |
| 251 | }, |
Daniel Vetter | 48e7a5f | 2010-03-11 21:19:15 +0000 | [diff] [blame] | 252 | }; |
| 253 | |
| 254 | static struct radeon_asic r200_asic = { |
| 255 | .init = &r100_init, |
| 256 | .fini = &r100_fini, |
| 257 | .suspend = &r100_suspend, |
| 258 | .resume = &r100_resume, |
| 259 | .vga_set_state = &r100_vga_set_state, |
Jerome Glisse | a2d07b7 | 2010-03-09 14:45:11 +0000 | [diff] [blame] | 260 | .asic_reset = &r100_asic_reset, |
Alex Deucher | 54e88e0 | 2012-02-23 18:10:29 -0500 | [diff] [blame] | 261 | .ioctl_wait_idle = NULL, |
| 262 | .gui_idle = &r100_gui_idle, |
| 263 | .mc_wait_for_idle = &r100_mc_wait_for_idle, |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 264 | .gart = { |
| 265 | .tlb_flush = &r100_pci_gart_tlb_flush, |
| 266 | .set_page = &r100_pci_gart_set_page, |
| 267 | }, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 268 | .ring = { |
| 269 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 270 | .ib_execute = &r100_ring_ib_execute, |
| 271 | .emit_fence = &r100_fence_ring_emit, |
| 272 | .emit_semaphore = &r100_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 273 | .cs_parse = &r100_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 274 | .ring_start = &r100_ring_start, |
| 275 | .ring_test = &r100_ring_test, |
| 276 | .ib_test = &r100_ib_test, |
Christian König | 312c4a8 | 2012-05-02 15:11:09 +0200 | [diff] [blame] | 277 | .is_lockup = &r100_gpu_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 278 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 279 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 280 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 281 | } |
| 282 | }, |
Alex Deucher | b35ea4a | 2012-02-23 17:53:43 -0500 | [diff] [blame] | 283 | .irq = { |
| 284 | .set = &r100_irq_set, |
| 285 | .process = &r100_irq_process, |
| 286 | }, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 287 | .display = { |
| 288 | .bandwidth_update = &r100_bandwidth_update, |
| 289 | .get_vblank_counter = &r100_get_vblank_counter, |
| 290 | .wait_for_vblank = &r100_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 291 | .set_backlight_level = &radeon_legacy_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 292 | .get_backlight_level = &radeon_legacy_get_backlight_level, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 293 | }, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 294 | .copy = { |
| 295 | .blit = &r100_copy_blit, |
| 296 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 297 | .dma = &r200_copy_dma, |
| 298 | .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 299 | .copy = &r100_copy_blit, |
| 300 | .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 301 | }, |
Alex Deucher | 9e6f3d0 | 2012-02-23 17:53:49 -0500 | [diff] [blame] | 302 | .surface = { |
| 303 | .set_reg = r100_set_surface_reg, |
| 304 | .clear_reg = r100_clear_surface_reg, |
| 305 | }, |
Alex Deucher | 901ea57 | 2012-02-23 17:53:39 -0500 | [diff] [blame] | 306 | .hpd = { |
| 307 | .init = &r100_hpd_init, |
| 308 | .fini = &r100_hpd_fini, |
| 309 | .sense = &r100_hpd_sense, |
| 310 | .set_polarity = &r100_hpd_set_polarity, |
| 311 | }, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 312 | .pm = { |
| 313 | .misc = &r100_pm_misc, |
| 314 | .prepare = &r100_pm_prepare, |
| 315 | .finish = &r100_pm_finish, |
| 316 | .init_profile = &r100_pm_init_profile, |
| 317 | .get_dynpm_state = &r100_pm_get_dynpm_state, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 318 | .get_engine_clock = &radeon_legacy_get_engine_clock, |
| 319 | .set_engine_clock = &radeon_legacy_set_engine_clock, |
| 320 | .get_memory_clock = &radeon_legacy_get_memory_clock, |
| 321 | .set_memory_clock = NULL, |
| 322 | .get_pcie_lanes = NULL, |
| 323 | .set_pcie_lanes = NULL, |
| 324 | .set_clock_gating = &radeon_legacy_set_clock_gating, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 325 | }, |
Alex Deucher | 0f9e006 | 2012-02-23 17:53:40 -0500 | [diff] [blame] | 326 | .pflip = { |
| 327 | .pre_page_flip = &r100_pre_page_flip, |
| 328 | .page_flip = &r100_page_flip, |
| 329 | .post_page_flip = &r100_post_page_flip, |
| 330 | }, |
Daniel Vetter | 48e7a5f | 2010-03-11 21:19:15 +0000 | [diff] [blame] | 331 | }; |
| 332 | |
| 333 | static struct radeon_asic r300_asic = { |
| 334 | .init = &r300_init, |
| 335 | .fini = &r300_fini, |
| 336 | .suspend = &r300_suspend, |
| 337 | .resume = &r300_resume, |
| 338 | .vga_set_state = &r100_vga_set_state, |
Jerome Glisse | a2d07b7 | 2010-03-09 14:45:11 +0000 | [diff] [blame] | 339 | .asic_reset = &r300_asic_reset, |
Alex Deucher | 54e88e0 | 2012-02-23 18:10:29 -0500 | [diff] [blame] | 340 | .ioctl_wait_idle = NULL, |
| 341 | .gui_idle = &r100_gui_idle, |
| 342 | .mc_wait_for_idle = &r300_mc_wait_for_idle, |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 343 | .gart = { |
| 344 | .tlb_flush = &r100_pci_gart_tlb_flush, |
| 345 | .set_page = &r100_pci_gart_set_page, |
| 346 | }, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 347 | .ring = { |
| 348 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 349 | .ib_execute = &r100_ring_ib_execute, |
| 350 | .emit_fence = &r300_fence_ring_emit, |
| 351 | .emit_semaphore = &r100_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 352 | .cs_parse = &r300_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 353 | .ring_start = &r300_ring_start, |
| 354 | .ring_test = &r100_ring_test, |
| 355 | .ib_test = &r100_ib_test, |
Christian König | 8ba957b5 | 2012-05-02 15:11:24 +0200 | [diff] [blame] | 356 | .is_lockup = &r100_gpu_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 357 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 358 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 359 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 360 | } |
| 361 | }, |
Alex Deucher | b35ea4a | 2012-02-23 17:53:43 -0500 | [diff] [blame] | 362 | .irq = { |
| 363 | .set = &r100_irq_set, |
| 364 | .process = &r100_irq_process, |
| 365 | }, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 366 | .display = { |
| 367 | .bandwidth_update = &r100_bandwidth_update, |
| 368 | .get_vblank_counter = &r100_get_vblank_counter, |
| 369 | .wait_for_vblank = &r100_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 370 | .set_backlight_level = &radeon_legacy_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 371 | .get_backlight_level = &radeon_legacy_get_backlight_level, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 372 | }, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 373 | .copy = { |
| 374 | .blit = &r100_copy_blit, |
| 375 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 376 | .dma = &r200_copy_dma, |
| 377 | .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 378 | .copy = &r100_copy_blit, |
| 379 | .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 380 | }, |
Alex Deucher | 9e6f3d0 | 2012-02-23 17:53:49 -0500 | [diff] [blame] | 381 | .surface = { |
| 382 | .set_reg = r100_set_surface_reg, |
| 383 | .clear_reg = r100_clear_surface_reg, |
| 384 | }, |
Alex Deucher | 901ea57 | 2012-02-23 17:53:39 -0500 | [diff] [blame] | 385 | .hpd = { |
| 386 | .init = &r100_hpd_init, |
| 387 | .fini = &r100_hpd_fini, |
| 388 | .sense = &r100_hpd_sense, |
| 389 | .set_polarity = &r100_hpd_set_polarity, |
| 390 | }, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 391 | .pm = { |
| 392 | .misc = &r100_pm_misc, |
| 393 | .prepare = &r100_pm_prepare, |
| 394 | .finish = &r100_pm_finish, |
| 395 | .init_profile = &r100_pm_init_profile, |
| 396 | .get_dynpm_state = &r100_pm_get_dynpm_state, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 397 | .get_engine_clock = &radeon_legacy_get_engine_clock, |
| 398 | .set_engine_clock = &radeon_legacy_set_engine_clock, |
| 399 | .get_memory_clock = &radeon_legacy_get_memory_clock, |
| 400 | .set_memory_clock = NULL, |
| 401 | .get_pcie_lanes = &rv370_get_pcie_lanes, |
| 402 | .set_pcie_lanes = &rv370_set_pcie_lanes, |
| 403 | .set_clock_gating = &radeon_legacy_set_clock_gating, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 404 | }, |
Alex Deucher | 0f9e006 | 2012-02-23 17:53:40 -0500 | [diff] [blame] | 405 | .pflip = { |
| 406 | .pre_page_flip = &r100_pre_page_flip, |
| 407 | .page_flip = &r100_page_flip, |
| 408 | .post_page_flip = &r100_post_page_flip, |
| 409 | }, |
Daniel Vetter | 48e7a5f | 2010-03-11 21:19:15 +0000 | [diff] [blame] | 410 | }; |
| 411 | |
| 412 | static struct radeon_asic r300_asic_pcie = { |
| 413 | .init = &r300_init, |
| 414 | .fini = &r300_fini, |
| 415 | .suspend = &r300_suspend, |
| 416 | .resume = &r300_resume, |
| 417 | .vga_set_state = &r100_vga_set_state, |
Jerome Glisse | a2d07b7 | 2010-03-09 14:45:11 +0000 | [diff] [blame] | 418 | .asic_reset = &r300_asic_reset, |
Alex Deucher | 54e88e0 | 2012-02-23 18:10:29 -0500 | [diff] [blame] | 419 | .ioctl_wait_idle = NULL, |
| 420 | .gui_idle = &r100_gui_idle, |
| 421 | .mc_wait_for_idle = &r300_mc_wait_for_idle, |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 422 | .gart = { |
| 423 | .tlb_flush = &rv370_pcie_gart_tlb_flush, |
| 424 | .set_page = &rv370_pcie_gart_set_page, |
| 425 | }, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 426 | .ring = { |
| 427 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 428 | .ib_execute = &r100_ring_ib_execute, |
| 429 | .emit_fence = &r300_fence_ring_emit, |
| 430 | .emit_semaphore = &r100_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 431 | .cs_parse = &r300_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 432 | .ring_start = &r300_ring_start, |
| 433 | .ring_test = &r100_ring_test, |
| 434 | .ib_test = &r100_ib_test, |
Christian König | 8ba957b5 | 2012-05-02 15:11:24 +0200 | [diff] [blame] | 435 | .is_lockup = &r100_gpu_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 436 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 437 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 438 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 439 | } |
| 440 | }, |
Alex Deucher | b35ea4a | 2012-02-23 17:53:43 -0500 | [diff] [blame] | 441 | .irq = { |
| 442 | .set = &r100_irq_set, |
| 443 | .process = &r100_irq_process, |
| 444 | }, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 445 | .display = { |
| 446 | .bandwidth_update = &r100_bandwidth_update, |
| 447 | .get_vblank_counter = &r100_get_vblank_counter, |
| 448 | .wait_for_vblank = &r100_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 449 | .set_backlight_level = &radeon_legacy_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 450 | .get_backlight_level = &radeon_legacy_get_backlight_level, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 451 | }, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 452 | .copy = { |
| 453 | .blit = &r100_copy_blit, |
| 454 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 455 | .dma = &r200_copy_dma, |
| 456 | .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 457 | .copy = &r100_copy_blit, |
| 458 | .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 459 | }, |
Alex Deucher | 9e6f3d0 | 2012-02-23 17:53:49 -0500 | [diff] [blame] | 460 | .surface = { |
| 461 | .set_reg = r100_set_surface_reg, |
| 462 | .clear_reg = r100_clear_surface_reg, |
| 463 | }, |
Alex Deucher | 901ea57 | 2012-02-23 17:53:39 -0500 | [diff] [blame] | 464 | .hpd = { |
| 465 | .init = &r100_hpd_init, |
| 466 | .fini = &r100_hpd_fini, |
| 467 | .sense = &r100_hpd_sense, |
| 468 | .set_polarity = &r100_hpd_set_polarity, |
| 469 | }, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 470 | .pm = { |
| 471 | .misc = &r100_pm_misc, |
| 472 | .prepare = &r100_pm_prepare, |
| 473 | .finish = &r100_pm_finish, |
| 474 | .init_profile = &r100_pm_init_profile, |
| 475 | .get_dynpm_state = &r100_pm_get_dynpm_state, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 476 | .get_engine_clock = &radeon_legacy_get_engine_clock, |
| 477 | .set_engine_clock = &radeon_legacy_set_engine_clock, |
| 478 | .get_memory_clock = &radeon_legacy_get_memory_clock, |
| 479 | .set_memory_clock = NULL, |
| 480 | .get_pcie_lanes = &rv370_get_pcie_lanes, |
| 481 | .set_pcie_lanes = &rv370_set_pcie_lanes, |
| 482 | .set_clock_gating = &radeon_legacy_set_clock_gating, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 483 | }, |
Alex Deucher | 0f9e006 | 2012-02-23 17:53:40 -0500 | [diff] [blame] | 484 | .pflip = { |
| 485 | .pre_page_flip = &r100_pre_page_flip, |
| 486 | .page_flip = &r100_page_flip, |
| 487 | .post_page_flip = &r100_post_page_flip, |
| 488 | }, |
Daniel Vetter | 48e7a5f | 2010-03-11 21:19:15 +0000 | [diff] [blame] | 489 | }; |
| 490 | |
| 491 | static struct radeon_asic r420_asic = { |
| 492 | .init = &r420_init, |
| 493 | .fini = &r420_fini, |
| 494 | .suspend = &r420_suspend, |
| 495 | .resume = &r420_resume, |
| 496 | .vga_set_state = &r100_vga_set_state, |
Jerome Glisse | a2d07b7 | 2010-03-09 14:45:11 +0000 | [diff] [blame] | 497 | .asic_reset = &r300_asic_reset, |
Alex Deucher | 54e88e0 | 2012-02-23 18:10:29 -0500 | [diff] [blame] | 498 | .ioctl_wait_idle = NULL, |
| 499 | .gui_idle = &r100_gui_idle, |
| 500 | .mc_wait_for_idle = &r300_mc_wait_for_idle, |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 501 | .gart = { |
| 502 | .tlb_flush = &rv370_pcie_gart_tlb_flush, |
| 503 | .set_page = &rv370_pcie_gart_set_page, |
| 504 | }, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 505 | .ring = { |
| 506 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 507 | .ib_execute = &r100_ring_ib_execute, |
| 508 | .emit_fence = &r300_fence_ring_emit, |
| 509 | .emit_semaphore = &r100_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 510 | .cs_parse = &r300_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 511 | .ring_start = &r300_ring_start, |
| 512 | .ring_test = &r100_ring_test, |
| 513 | .ib_test = &r100_ib_test, |
Christian König | 8ba957b5 | 2012-05-02 15:11:24 +0200 | [diff] [blame] | 514 | .is_lockup = &r100_gpu_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 515 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 516 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 517 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 518 | } |
| 519 | }, |
Alex Deucher | b35ea4a | 2012-02-23 17:53:43 -0500 | [diff] [blame] | 520 | .irq = { |
| 521 | .set = &r100_irq_set, |
| 522 | .process = &r100_irq_process, |
| 523 | }, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 524 | .display = { |
| 525 | .bandwidth_update = &r100_bandwidth_update, |
| 526 | .get_vblank_counter = &r100_get_vblank_counter, |
| 527 | .wait_for_vblank = &r100_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 528 | .set_backlight_level = &atombios_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 529 | .get_backlight_level = &atombios_get_backlight_level, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 530 | }, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 531 | .copy = { |
| 532 | .blit = &r100_copy_blit, |
| 533 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 534 | .dma = &r200_copy_dma, |
| 535 | .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 536 | .copy = &r100_copy_blit, |
| 537 | .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 538 | }, |
Alex Deucher | 9e6f3d0 | 2012-02-23 17:53:49 -0500 | [diff] [blame] | 539 | .surface = { |
| 540 | .set_reg = r100_set_surface_reg, |
| 541 | .clear_reg = r100_clear_surface_reg, |
| 542 | }, |
Alex Deucher | 901ea57 | 2012-02-23 17:53:39 -0500 | [diff] [blame] | 543 | .hpd = { |
| 544 | .init = &r100_hpd_init, |
| 545 | .fini = &r100_hpd_fini, |
| 546 | .sense = &r100_hpd_sense, |
| 547 | .set_polarity = &r100_hpd_set_polarity, |
| 548 | }, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 549 | .pm = { |
| 550 | .misc = &r100_pm_misc, |
| 551 | .prepare = &r100_pm_prepare, |
| 552 | .finish = &r100_pm_finish, |
| 553 | .init_profile = &r420_pm_init_profile, |
| 554 | .get_dynpm_state = &r100_pm_get_dynpm_state, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 555 | .get_engine_clock = &radeon_atom_get_engine_clock, |
| 556 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 557 | .get_memory_clock = &radeon_atom_get_memory_clock, |
| 558 | .set_memory_clock = &radeon_atom_set_memory_clock, |
| 559 | .get_pcie_lanes = &rv370_get_pcie_lanes, |
| 560 | .set_pcie_lanes = &rv370_set_pcie_lanes, |
| 561 | .set_clock_gating = &radeon_atom_set_clock_gating, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 562 | }, |
Alex Deucher | 0f9e006 | 2012-02-23 17:53:40 -0500 | [diff] [blame] | 563 | .pflip = { |
| 564 | .pre_page_flip = &r100_pre_page_flip, |
| 565 | .page_flip = &r100_page_flip, |
| 566 | .post_page_flip = &r100_post_page_flip, |
| 567 | }, |
Daniel Vetter | 48e7a5f | 2010-03-11 21:19:15 +0000 | [diff] [blame] | 568 | }; |
| 569 | |
| 570 | static struct radeon_asic rs400_asic = { |
| 571 | .init = &rs400_init, |
| 572 | .fini = &rs400_fini, |
| 573 | .suspend = &rs400_suspend, |
| 574 | .resume = &rs400_resume, |
| 575 | .vga_set_state = &r100_vga_set_state, |
Jerome Glisse | a2d07b7 | 2010-03-09 14:45:11 +0000 | [diff] [blame] | 576 | .asic_reset = &r300_asic_reset, |
Alex Deucher | 54e88e0 | 2012-02-23 18:10:29 -0500 | [diff] [blame] | 577 | .ioctl_wait_idle = NULL, |
| 578 | .gui_idle = &r100_gui_idle, |
| 579 | .mc_wait_for_idle = &rs400_mc_wait_for_idle, |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 580 | .gart = { |
| 581 | .tlb_flush = &rs400_gart_tlb_flush, |
| 582 | .set_page = &rs400_gart_set_page, |
| 583 | }, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 584 | .ring = { |
| 585 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 586 | .ib_execute = &r100_ring_ib_execute, |
| 587 | .emit_fence = &r300_fence_ring_emit, |
| 588 | .emit_semaphore = &r100_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 589 | .cs_parse = &r300_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 590 | .ring_start = &r300_ring_start, |
| 591 | .ring_test = &r100_ring_test, |
| 592 | .ib_test = &r100_ib_test, |
Christian König | 8ba957b5 | 2012-05-02 15:11:24 +0200 | [diff] [blame] | 593 | .is_lockup = &r100_gpu_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 594 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 595 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 596 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 597 | } |
| 598 | }, |
Alex Deucher | b35ea4a | 2012-02-23 17:53:43 -0500 | [diff] [blame] | 599 | .irq = { |
| 600 | .set = &r100_irq_set, |
| 601 | .process = &r100_irq_process, |
| 602 | }, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 603 | .display = { |
| 604 | .bandwidth_update = &r100_bandwidth_update, |
| 605 | .get_vblank_counter = &r100_get_vblank_counter, |
| 606 | .wait_for_vblank = &r100_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 607 | .set_backlight_level = &radeon_legacy_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 608 | .get_backlight_level = &radeon_legacy_get_backlight_level, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 609 | }, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 610 | .copy = { |
| 611 | .blit = &r100_copy_blit, |
| 612 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 613 | .dma = &r200_copy_dma, |
| 614 | .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 615 | .copy = &r100_copy_blit, |
| 616 | .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 617 | }, |
Alex Deucher | 9e6f3d0 | 2012-02-23 17:53:49 -0500 | [diff] [blame] | 618 | .surface = { |
| 619 | .set_reg = r100_set_surface_reg, |
| 620 | .clear_reg = r100_clear_surface_reg, |
| 621 | }, |
Alex Deucher | 901ea57 | 2012-02-23 17:53:39 -0500 | [diff] [blame] | 622 | .hpd = { |
| 623 | .init = &r100_hpd_init, |
| 624 | .fini = &r100_hpd_fini, |
| 625 | .sense = &r100_hpd_sense, |
| 626 | .set_polarity = &r100_hpd_set_polarity, |
| 627 | }, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 628 | .pm = { |
| 629 | .misc = &r100_pm_misc, |
| 630 | .prepare = &r100_pm_prepare, |
| 631 | .finish = &r100_pm_finish, |
| 632 | .init_profile = &r100_pm_init_profile, |
| 633 | .get_dynpm_state = &r100_pm_get_dynpm_state, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 634 | .get_engine_clock = &radeon_legacy_get_engine_clock, |
| 635 | .set_engine_clock = &radeon_legacy_set_engine_clock, |
| 636 | .get_memory_clock = &radeon_legacy_get_memory_clock, |
| 637 | .set_memory_clock = NULL, |
| 638 | .get_pcie_lanes = NULL, |
| 639 | .set_pcie_lanes = NULL, |
| 640 | .set_clock_gating = &radeon_legacy_set_clock_gating, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 641 | }, |
Alex Deucher | 0f9e006 | 2012-02-23 17:53:40 -0500 | [diff] [blame] | 642 | .pflip = { |
| 643 | .pre_page_flip = &r100_pre_page_flip, |
| 644 | .page_flip = &r100_page_flip, |
| 645 | .post_page_flip = &r100_post_page_flip, |
| 646 | }, |
Daniel Vetter | 48e7a5f | 2010-03-11 21:19:15 +0000 | [diff] [blame] | 647 | }; |
| 648 | |
| 649 | static struct radeon_asic rs600_asic = { |
| 650 | .init = &rs600_init, |
| 651 | .fini = &rs600_fini, |
| 652 | .suspend = &rs600_suspend, |
| 653 | .resume = &rs600_resume, |
| 654 | .vga_set_state = &r100_vga_set_state, |
Jerome Glisse | 90aca4d | 2010-03-09 14:45:12 +0000 | [diff] [blame] | 655 | .asic_reset = &rs600_asic_reset, |
Alex Deucher | 54e88e0 | 2012-02-23 18:10:29 -0500 | [diff] [blame] | 656 | .ioctl_wait_idle = NULL, |
| 657 | .gui_idle = &r100_gui_idle, |
| 658 | .mc_wait_for_idle = &rs600_mc_wait_for_idle, |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 659 | .gart = { |
| 660 | .tlb_flush = &rs600_gart_tlb_flush, |
| 661 | .set_page = &rs600_gart_set_page, |
| 662 | }, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 663 | .ring = { |
| 664 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 665 | .ib_execute = &r100_ring_ib_execute, |
| 666 | .emit_fence = &r300_fence_ring_emit, |
| 667 | .emit_semaphore = &r100_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 668 | .cs_parse = &r300_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 669 | .ring_start = &r300_ring_start, |
| 670 | .ring_test = &r100_ring_test, |
| 671 | .ib_test = &r100_ib_test, |
Christian König | 8ba957b5 | 2012-05-02 15:11:24 +0200 | [diff] [blame] | 672 | .is_lockup = &r100_gpu_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 673 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 674 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 675 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 676 | } |
| 677 | }, |
Alex Deucher | b35ea4a | 2012-02-23 17:53:43 -0500 | [diff] [blame] | 678 | .irq = { |
| 679 | .set = &rs600_irq_set, |
| 680 | .process = &rs600_irq_process, |
| 681 | }, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 682 | .display = { |
| 683 | .bandwidth_update = &rs600_bandwidth_update, |
| 684 | .get_vblank_counter = &rs600_get_vblank_counter, |
| 685 | .wait_for_vblank = &avivo_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 686 | .set_backlight_level = &atombios_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 687 | .get_backlight_level = &atombios_get_backlight_level, |
Alex Deucher | a973bea | 2013-04-18 11:32:16 -0400 | [diff] [blame] | 688 | .hdmi_enable = &r600_hdmi_enable, |
| 689 | .hdmi_setmode = &r600_hdmi_setmode, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 690 | }, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 691 | .copy = { |
| 692 | .blit = &r100_copy_blit, |
| 693 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 694 | .dma = &r200_copy_dma, |
| 695 | .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 696 | .copy = &r100_copy_blit, |
| 697 | .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 698 | }, |
Alex Deucher | 9e6f3d0 | 2012-02-23 17:53:49 -0500 | [diff] [blame] | 699 | .surface = { |
| 700 | .set_reg = r100_set_surface_reg, |
| 701 | .clear_reg = r100_clear_surface_reg, |
| 702 | }, |
Alex Deucher | 901ea57 | 2012-02-23 17:53:39 -0500 | [diff] [blame] | 703 | .hpd = { |
| 704 | .init = &rs600_hpd_init, |
| 705 | .fini = &rs600_hpd_fini, |
| 706 | .sense = &rs600_hpd_sense, |
| 707 | .set_polarity = &rs600_hpd_set_polarity, |
| 708 | }, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 709 | .pm = { |
| 710 | .misc = &rs600_pm_misc, |
| 711 | .prepare = &rs600_pm_prepare, |
| 712 | .finish = &rs600_pm_finish, |
| 713 | .init_profile = &r420_pm_init_profile, |
| 714 | .get_dynpm_state = &r100_pm_get_dynpm_state, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 715 | .get_engine_clock = &radeon_atom_get_engine_clock, |
| 716 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 717 | .get_memory_clock = &radeon_atom_get_memory_clock, |
| 718 | .set_memory_clock = &radeon_atom_set_memory_clock, |
| 719 | .get_pcie_lanes = NULL, |
| 720 | .set_pcie_lanes = NULL, |
| 721 | .set_clock_gating = &radeon_atom_set_clock_gating, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 722 | }, |
Alex Deucher | 0f9e006 | 2012-02-23 17:53:40 -0500 | [diff] [blame] | 723 | .pflip = { |
| 724 | .pre_page_flip = &rs600_pre_page_flip, |
| 725 | .page_flip = &rs600_page_flip, |
| 726 | .post_page_flip = &rs600_post_page_flip, |
| 727 | }, |
Daniel Vetter | 48e7a5f | 2010-03-11 21:19:15 +0000 | [diff] [blame] | 728 | }; |
| 729 | |
| 730 | static struct radeon_asic rs690_asic = { |
| 731 | .init = &rs690_init, |
| 732 | .fini = &rs690_fini, |
| 733 | .suspend = &rs690_suspend, |
| 734 | .resume = &rs690_resume, |
| 735 | .vga_set_state = &r100_vga_set_state, |
Jerome Glisse | 90aca4d | 2010-03-09 14:45:12 +0000 | [diff] [blame] | 736 | .asic_reset = &rs600_asic_reset, |
Alex Deucher | 54e88e0 | 2012-02-23 18:10:29 -0500 | [diff] [blame] | 737 | .ioctl_wait_idle = NULL, |
| 738 | .gui_idle = &r100_gui_idle, |
| 739 | .mc_wait_for_idle = &rs690_mc_wait_for_idle, |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 740 | .gart = { |
| 741 | .tlb_flush = &rs400_gart_tlb_flush, |
| 742 | .set_page = &rs400_gart_set_page, |
| 743 | }, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 744 | .ring = { |
| 745 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 746 | .ib_execute = &r100_ring_ib_execute, |
| 747 | .emit_fence = &r300_fence_ring_emit, |
| 748 | .emit_semaphore = &r100_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 749 | .cs_parse = &r300_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 750 | .ring_start = &r300_ring_start, |
| 751 | .ring_test = &r100_ring_test, |
| 752 | .ib_test = &r100_ib_test, |
Christian König | 8ba957b5 | 2012-05-02 15:11:24 +0200 | [diff] [blame] | 753 | .is_lockup = &r100_gpu_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 754 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 755 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 756 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 757 | } |
| 758 | }, |
Alex Deucher | b35ea4a | 2012-02-23 17:53:43 -0500 | [diff] [blame] | 759 | .irq = { |
| 760 | .set = &rs600_irq_set, |
| 761 | .process = &rs600_irq_process, |
| 762 | }, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 763 | .display = { |
| 764 | .get_vblank_counter = &rs600_get_vblank_counter, |
| 765 | .bandwidth_update = &rs690_bandwidth_update, |
| 766 | .wait_for_vblank = &avivo_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 767 | .set_backlight_level = &atombios_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 768 | .get_backlight_level = &atombios_get_backlight_level, |
Alex Deucher | a973bea | 2013-04-18 11:32:16 -0400 | [diff] [blame] | 769 | .hdmi_enable = &r600_hdmi_enable, |
| 770 | .hdmi_setmode = &r600_hdmi_setmode, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 771 | }, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 772 | .copy = { |
| 773 | .blit = &r100_copy_blit, |
| 774 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 775 | .dma = &r200_copy_dma, |
| 776 | .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 777 | .copy = &r200_copy_dma, |
| 778 | .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 779 | }, |
Alex Deucher | 9e6f3d0 | 2012-02-23 17:53:49 -0500 | [diff] [blame] | 780 | .surface = { |
| 781 | .set_reg = r100_set_surface_reg, |
| 782 | .clear_reg = r100_clear_surface_reg, |
| 783 | }, |
Alex Deucher | 901ea57 | 2012-02-23 17:53:39 -0500 | [diff] [blame] | 784 | .hpd = { |
| 785 | .init = &rs600_hpd_init, |
| 786 | .fini = &rs600_hpd_fini, |
| 787 | .sense = &rs600_hpd_sense, |
| 788 | .set_polarity = &rs600_hpd_set_polarity, |
| 789 | }, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 790 | .pm = { |
| 791 | .misc = &rs600_pm_misc, |
| 792 | .prepare = &rs600_pm_prepare, |
| 793 | .finish = &rs600_pm_finish, |
| 794 | .init_profile = &r420_pm_init_profile, |
| 795 | .get_dynpm_state = &r100_pm_get_dynpm_state, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 796 | .get_engine_clock = &radeon_atom_get_engine_clock, |
| 797 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 798 | .get_memory_clock = &radeon_atom_get_memory_clock, |
| 799 | .set_memory_clock = &radeon_atom_set_memory_clock, |
| 800 | .get_pcie_lanes = NULL, |
| 801 | .set_pcie_lanes = NULL, |
| 802 | .set_clock_gating = &radeon_atom_set_clock_gating, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 803 | }, |
Alex Deucher | 0f9e006 | 2012-02-23 17:53:40 -0500 | [diff] [blame] | 804 | .pflip = { |
| 805 | .pre_page_flip = &rs600_pre_page_flip, |
| 806 | .page_flip = &rs600_page_flip, |
| 807 | .post_page_flip = &rs600_post_page_flip, |
| 808 | }, |
Daniel Vetter | 48e7a5f | 2010-03-11 21:19:15 +0000 | [diff] [blame] | 809 | }; |
| 810 | |
| 811 | static struct radeon_asic rv515_asic = { |
| 812 | .init = &rv515_init, |
| 813 | .fini = &rv515_fini, |
| 814 | .suspend = &rv515_suspend, |
| 815 | .resume = &rv515_resume, |
| 816 | .vga_set_state = &r100_vga_set_state, |
Jerome Glisse | 90aca4d | 2010-03-09 14:45:12 +0000 | [diff] [blame] | 817 | .asic_reset = &rs600_asic_reset, |
Alex Deucher | 54e88e0 | 2012-02-23 18:10:29 -0500 | [diff] [blame] | 818 | .ioctl_wait_idle = NULL, |
| 819 | .gui_idle = &r100_gui_idle, |
| 820 | .mc_wait_for_idle = &rv515_mc_wait_for_idle, |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 821 | .gart = { |
| 822 | .tlb_flush = &rv370_pcie_gart_tlb_flush, |
| 823 | .set_page = &rv370_pcie_gart_set_page, |
| 824 | }, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 825 | .ring = { |
| 826 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 827 | .ib_execute = &r100_ring_ib_execute, |
| 828 | .emit_fence = &r300_fence_ring_emit, |
| 829 | .emit_semaphore = &r100_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 830 | .cs_parse = &r300_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 831 | .ring_start = &rv515_ring_start, |
| 832 | .ring_test = &r100_ring_test, |
| 833 | .ib_test = &r100_ib_test, |
Christian König | 8ba957b5 | 2012-05-02 15:11:24 +0200 | [diff] [blame] | 834 | .is_lockup = &r100_gpu_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 835 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 836 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 837 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 838 | } |
| 839 | }, |
Alex Deucher | b35ea4a | 2012-02-23 17:53:43 -0500 | [diff] [blame] | 840 | .irq = { |
| 841 | .set = &rs600_irq_set, |
| 842 | .process = &rs600_irq_process, |
| 843 | }, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 844 | .display = { |
| 845 | .get_vblank_counter = &rs600_get_vblank_counter, |
| 846 | .bandwidth_update = &rv515_bandwidth_update, |
| 847 | .wait_for_vblank = &avivo_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 848 | .set_backlight_level = &atombios_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 849 | .get_backlight_level = &atombios_get_backlight_level, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 850 | }, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 851 | .copy = { |
| 852 | .blit = &r100_copy_blit, |
| 853 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 854 | .dma = &r200_copy_dma, |
| 855 | .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 856 | .copy = &r100_copy_blit, |
| 857 | .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 858 | }, |
Alex Deucher | 9e6f3d0 | 2012-02-23 17:53:49 -0500 | [diff] [blame] | 859 | .surface = { |
| 860 | .set_reg = r100_set_surface_reg, |
| 861 | .clear_reg = r100_clear_surface_reg, |
| 862 | }, |
Alex Deucher | 901ea57 | 2012-02-23 17:53:39 -0500 | [diff] [blame] | 863 | .hpd = { |
| 864 | .init = &rs600_hpd_init, |
| 865 | .fini = &rs600_hpd_fini, |
| 866 | .sense = &rs600_hpd_sense, |
| 867 | .set_polarity = &rs600_hpd_set_polarity, |
| 868 | }, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 869 | .pm = { |
| 870 | .misc = &rs600_pm_misc, |
| 871 | .prepare = &rs600_pm_prepare, |
| 872 | .finish = &rs600_pm_finish, |
| 873 | .init_profile = &r420_pm_init_profile, |
| 874 | .get_dynpm_state = &r100_pm_get_dynpm_state, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 875 | .get_engine_clock = &radeon_atom_get_engine_clock, |
| 876 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 877 | .get_memory_clock = &radeon_atom_get_memory_clock, |
| 878 | .set_memory_clock = &radeon_atom_set_memory_clock, |
| 879 | .get_pcie_lanes = &rv370_get_pcie_lanes, |
| 880 | .set_pcie_lanes = &rv370_set_pcie_lanes, |
| 881 | .set_clock_gating = &radeon_atom_set_clock_gating, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 882 | }, |
Alex Deucher | 0f9e006 | 2012-02-23 17:53:40 -0500 | [diff] [blame] | 883 | .pflip = { |
| 884 | .pre_page_flip = &rs600_pre_page_flip, |
| 885 | .page_flip = &rs600_page_flip, |
| 886 | .post_page_flip = &rs600_post_page_flip, |
| 887 | }, |
Daniel Vetter | 48e7a5f | 2010-03-11 21:19:15 +0000 | [diff] [blame] | 888 | }; |
| 889 | |
| 890 | static struct radeon_asic r520_asic = { |
| 891 | .init = &r520_init, |
| 892 | .fini = &rv515_fini, |
| 893 | .suspend = &rv515_suspend, |
| 894 | .resume = &r520_resume, |
| 895 | .vga_set_state = &r100_vga_set_state, |
Jerome Glisse | 90aca4d | 2010-03-09 14:45:12 +0000 | [diff] [blame] | 896 | .asic_reset = &rs600_asic_reset, |
Alex Deucher | 54e88e0 | 2012-02-23 18:10:29 -0500 | [diff] [blame] | 897 | .ioctl_wait_idle = NULL, |
| 898 | .gui_idle = &r100_gui_idle, |
| 899 | .mc_wait_for_idle = &r520_mc_wait_for_idle, |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 900 | .gart = { |
| 901 | .tlb_flush = &rv370_pcie_gart_tlb_flush, |
| 902 | .set_page = &rv370_pcie_gart_set_page, |
| 903 | }, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 904 | .ring = { |
| 905 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 906 | .ib_execute = &r100_ring_ib_execute, |
| 907 | .emit_fence = &r300_fence_ring_emit, |
| 908 | .emit_semaphore = &r100_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 909 | .cs_parse = &r300_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 910 | .ring_start = &rv515_ring_start, |
| 911 | .ring_test = &r100_ring_test, |
| 912 | .ib_test = &r100_ib_test, |
Christian König | 8ba957b5 | 2012-05-02 15:11:24 +0200 | [diff] [blame] | 913 | .is_lockup = &r100_gpu_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 914 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 915 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 916 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 917 | } |
| 918 | }, |
Alex Deucher | b35ea4a | 2012-02-23 17:53:43 -0500 | [diff] [blame] | 919 | .irq = { |
| 920 | .set = &rs600_irq_set, |
| 921 | .process = &rs600_irq_process, |
| 922 | }, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 923 | .display = { |
| 924 | .bandwidth_update = &rv515_bandwidth_update, |
| 925 | .get_vblank_counter = &rs600_get_vblank_counter, |
| 926 | .wait_for_vblank = &avivo_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 927 | .set_backlight_level = &atombios_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 928 | .get_backlight_level = &atombios_get_backlight_level, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 929 | }, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 930 | .copy = { |
| 931 | .blit = &r100_copy_blit, |
| 932 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 933 | .dma = &r200_copy_dma, |
| 934 | .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 935 | .copy = &r100_copy_blit, |
| 936 | .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 937 | }, |
Alex Deucher | 9e6f3d0 | 2012-02-23 17:53:49 -0500 | [diff] [blame] | 938 | .surface = { |
| 939 | .set_reg = r100_set_surface_reg, |
| 940 | .clear_reg = r100_clear_surface_reg, |
| 941 | }, |
Alex Deucher | 901ea57 | 2012-02-23 17:53:39 -0500 | [diff] [blame] | 942 | .hpd = { |
| 943 | .init = &rs600_hpd_init, |
| 944 | .fini = &rs600_hpd_fini, |
| 945 | .sense = &rs600_hpd_sense, |
| 946 | .set_polarity = &rs600_hpd_set_polarity, |
| 947 | }, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 948 | .pm = { |
| 949 | .misc = &rs600_pm_misc, |
| 950 | .prepare = &rs600_pm_prepare, |
| 951 | .finish = &rs600_pm_finish, |
| 952 | .init_profile = &r420_pm_init_profile, |
| 953 | .get_dynpm_state = &r100_pm_get_dynpm_state, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 954 | .get_engine_clock = &radeon_atom_get_engine_clock, |
| 955 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 956 | .get_memory_clock = &radeon_atom_get_memory_clock, |
| 957 | .set_memory_clock = &radeon_atom_set_memory_clock, |
| 958 | .get_pcie_lanes = &rv370_get_pcie_lanes, |
| 959 | .set_pcie_lanes = &rv370_set_pcie_lanes, |
| 960 | .set_clock_gating = &radeon_atom_set_clock_gating, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 961 | }, |
Alex Deucher | 0f9e006 | 2012-02-23 17:53:40 -0500 | [diff] [blame] | 962 | .pflip = { |
| 963 | .pre_page_flip = &rs600_pre_page_flip, |
| 964 | .page_flip = &rs600_page_flip, |
| 965 | .post_page_flip = &rs600_post_page_flip, |
| 966 | }, |
Daniel Vetter | 48e7a5f | 2010-03-11 21:19:15 +0000 | [diff] [blame] | 967 | }; |
| 968 | |
| 969 | static struct radeon_asic r600_asic = { |
| 970 | .init = &r600_init, |
| 971 | .fini = &r600_fini, |
| 972 | .suspend = &r600_suspend, |
| 973 | .resume = &r600_resume, |
Daniel Vetter | 48e7a5f | 2010-03-11 21:19:15 +0000 | [diff] [blame] | 974 | .vga_set_state = &r600_vga_set_state, |
Jerome Glisse | a2d07b7 | 2010-03-09 14:45:11 +0000 | [diff] [blame] | 975 | .asic_reset = &r600_asic_reset, |
Alex Deucher | 54e88e0 | 2012-02-23 18:10:29 -0500 | [diff] [blame] | 976 | .ioctl_wait_idle = r600_ioctl_wait_idle, |
| 977 | .gui_idle = &r600_gui_idle, |
| 978 | .mc_wait_for_idle = &r600_mc_wait_for_idle, |
Alex Deucher | 454d2e2 | 2013-02-14 10:04:02 -0500 | [diff] [blame] | 979 | .get_xclk = &r600_get_xclk, |
Alex Deucher | d041889 | 2013-01-24 10:35:23 -0500 | [diff] [blame] | 980 | .get_gpu_clock_counter = &r600_get_gpu_clock_counter, |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 981 | .gart = { |
| 982 | .tlb_flush = &r600_pcie_gart_tlb_flush, |
| 983 | .set_page = &rs600_gart_set_page, |
| 984 | }, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 985 | .ring = { |
| 986 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 987 | .ib_execute = &r600_ring_ib_execute, |
| 988 | .emit_fence = &r600_fence_ring_emit, |
| 989 | .emit_semaphore = &r600_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 990 | .cs_parse = &r600_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 991 | .ring_test = &r600_ring_test, |
| 992 | .ib_test = &r600_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 993 | .is_lockup = &r600_gfx_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 994 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 995 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 996 | .set_wptr = &radeon_ring_generic_set_wptr, |
Alex Deucher | 4d75658 | 2012-09-27 15:08:35 -0400 | [diff] [blame] | 997 | }, |
| 998 | [R600_RING_TYPE_DMA_INDEX] = { |
| 999 | .ib_execute = &r600_dma_ring_ib_execute, |
| 1000 | .emit_fence = &r600_dma_fence_ring_emit, |
| 1001 | .emit_semaphore = &r600_dma_semaphore_ring_emit, |
Alex Deucher | cf4ccd0 | 2011-11-18 10:19:47 -0500 | [diff] [blame] | 1002 | .cs_parse = &r600_dma_cs_parse, |
Alex Deucher | 4d75658 | 2012-09-27 15:08:35 -0400 | [diff] [blame] | 1003 | .ring_test = &r600_dma_ring_test, |
| 1004 | .ib_test = &r600_dma_ib_test, |
| 1005 | .is_lockup = &r600_dma_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1006 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1007 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1008 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 1009 | } |
| 1010 | }, |
Alex Deucher | b35ea4a | 2012-02-23 17:53:43 -0500 | [diff] [blame] | 1011 | .irq = { |
| 1012 | .set = &r600_irq_set, |
| 1013 | .process = &r600_irq_process, |
| 1014 | }, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 1015 | .display = { |
| 1016 | .bandwidth_update = &rv515_bandwidth_update, |
| 1017 | .get_vblank_counter = &rs600_get_vblank_counter, |
| 1018 | .wait_for_vblank = &avivo_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 1019 | .set_backlight_level = &atombios_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 1020 | .get_backlight_level = &atombios_get_backlight_level, |
Alex Deucher | a973bea | 2013-04-18 11:32:16 -0400 | [diff] [blame] | 1021 | .hdmi_enable = &r600_hdmi_enable, |
| 1022 | .hdmi_setmode = &r600_hdmi_setmode, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 1023 | }, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 1024 | .copy = { |
| 1025 | .blit = &r600_copy_blit, |
| 1026 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
Alex Deucher | 4d75658 | 2012-09-27 15:08:35 -0400 | [diff] [blame] | 1027 | .dma = &r600_copy_dma, |
| 1028 | .dma_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | 2d6cc72 | 2012-07-20 13:49:49 -0400 | [diff] [blame] | 1029 | .copy = &r600_copy_dma, |
| 1030 | .copy_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 1031 | }, |
Alex Deucher | 9e6f3d0 | 2012-02-23 17:53:49 -0500 | [diff] [blame] | 1032 | .surface = { |
| 1033 | .set_reg = r600_set_surface_reg, |
| 1034 | .clear_reg = r600_clear_surface_reg, |
| 1035 | }, |
Alex Deucher | 901ea57 | 2012-02-23 17:53:39 -0500 | [diff] [blame] | 1036 | .hpd = { |
| 1037 | .init = &r600_hpd_init, |
| 1038 | .fini = &r600_hpd_fini, |
| 1039 | .sense = &r600_hpd_sense, |
| 1040 | .set_polarity = &r600_hpd_set_polarity, |
| 1041 | }, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 1042 | .pm = { |
| 1043 | .misc = &r600_pm_misc, |
| 1044 | .prepare = &rs600_pm_prepare, |
| 1045 | .finish = &rs600_pm_finish, |
| 1046 | .init_profile = &r600_pm_init_profile, |
| 1047 | .get_dynpm_state = &r600_pm_get_dynpm_state, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 1048 | .get_engine_clock = &radeon_atom_get_engine_clock, |
| 1049 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 1050 | .get_memory_clock = &radeon_atom_get_memory_clock, |
| 1051 | .set_memory_clock = &radeon_atom_set_memory_clock, |
| 1052 | .get_pcie_lanes = &r600_get_pcie_lanes, |
| 1053 | .set_pcie_lanes = &r600_set_pcie_lanes, |
| 1054 | .set_clock_gating = NULL, |
Alex Deucher | 6bd1c38 | 2013-06-21 14:38:03 -0400 | [diff] [blame] | 1055 | .get_temperature = &rv6xx_get_temp, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 1056 | }, |
Alex Deucher | 0f9e006 | 2012-02-23 17:53:40 -0500 | [diff] [blame] | 1057 | .pflip = { |
| 1058 | .pre_page_flip = &rs600_pre_page_flip, |
| 1059 | .page_flip = &rs600_page_flip, |
| 1060 | .post_page_flip = &rs600_post_page_flip, |
| 1061 | }, |
Daniel Vetter | 48e7a5f | 2010-03-11 21:19:15 +0000 | [diff] [blame] | 1062 | }; |
| 1063 | |
Alex Deucher | ca361b6 | 2013-06-21 14:42:08 -0400 | [diff] [blame] | 1064 | static struct radeon_asic rv6xx_asic = { |
| 1065 | .init = &r600_init, |
| 1066 | .fini = &r600_fini, |
| 1067 | .suspend = &r600_suspend, |
| 1068 | .resume = &r600_resume, |
| 1069 | .vga_set_state = &r600_vga_set_state, |
| 1070 | .asic_reset = &r600_asic_reset, |
| 1071 | .ioctl_wait_idle = r600_ioctl_wait_idle, |
| 1072 | .gui_idle = &r600_gui_idle, |
| 1073 | .mc_wait_for_idle = &r600_mc_wait_for_idle, |
| 1074 | .get_xclk = &r600_get_xclk, |
| 1075 | .get_gpu_clock_counter = &r600_get_gpu_clock_counter, |
| 1076 | .gart = { |
| 1077 | .tlb_flush = &r600_pcie_gart_tlb_flush, |
| 1078 | .set_page = &rs600_gart_set_page, |
| 1079 | }, |
| 1080 | .ring = { |
| 1081 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 1082 | .ib_execute = &r600_ring_ib_execute, |
| 1083 | .emit_fence = &r600_fence_ring_emit, |
| 1084 | .emit_semaphore = &r600_semaphore_ring_emit, |
| 1085 | .cs_parse = &r600_cs_parse, |
| 1086 | .ring_test = &r600_ring_test, |
| 1087 | .ib_test = &r600_ib_test, |
| 1088 | .is_lockup = &r600_gfx_is_lockup, |
| 1089 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1090 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1091 | .set_wptr = &radeon_ring_generic_set_wptr, |
| 1092 | }, |
| 1093 | [R600_RING_TYPE_DMA_INDEX] = { |
| 1094 | .ib_execute = &r600_dma_ring_ib_execute, |
| 1095 | .emit_fence = &r600_dma_fence_ring_emit, |
| 1096 | .emit_semaphore = &r600_dma_semaphore_ring_emit, |
| 1097 | .cs_parse = &r600_dma_cs_parse, |
| 1098 | .ring_test = &r600_dma_ring_test, |
| 1099 | .ib_test = &r600_dma_ib_test, |
| 1100 | .is_lockup = &r600_dma_is_lockup, |
| 1101 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1102 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1103 | .set_wptr = &radeon_ring_generic_set_wptr, |
| 1104 | } |
| 1105 | }, |
| 1106 | .irq = { |
| 1107 | .set = &r600_irq_set, |
| 1108 | .process = &r600_irq_process, |
| 1109 | }, |
| 1110 | .display = { |
| 1111 | .bandwidth_update = &rv515_bandwidth_update, |
| 1112 | .get_vblank_counter = &rs600_get_vblank_counter, |
| 1113 | .wait_for_vblank = &avivo_wait_for_vblank, |
| 1114 | .set_backlight_level = &atombios_set_backlight_level, |
| 1115 | .get_backlight_level = &atombios_get_backlight_level, |
| 1116 | }, |
| 1117 | .copy = { |
| 1118 | .blit = &r600_copy_blit, |
| 1119 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 1120 | .dma = &r600_copy_dma, |
| 1121 | .dma_ring_index = R600_RING_TYPE_DMA_INDEX, |
| 1122 | .copy = &r600_copy_dma, |
| 1123 | .copy_ring_index = R600_RING_TYPE_DMA_INDEX, |
| 1124 | }, |
| 1125 | .surface = { |
| 1126 | .set_reg = r600_set_surface_reg, |
| 1127 | .clear_reg = r600_clear_surface_reg, |
| 1128 | }, |
| 1129 | .hpd = { |
| 1130 | .init = &r600_hpd_init, |
| 1131 | .fini = &r600_hpd_fini, |
| 1132 | .sense = &r600_hpd_sense, |
| 1133 | .set_polarity = &r600_hpd_set_polarity, |
| 1134 | }, |
| 1135 | .pm = { |
| 1136 | .misc = &r600_pm_misc, |
| 1137 | .prepare = &rs600_pm_prepare, |
| 1138 | .finish = &rs600_pm_finish, |
| 1139 | .init_profile = &r600_pm_init_profile, |
| 1140 | .get_dynpm_state = &r600_pm_get_dynpm_state, |
| 1141 | .get_engine_clock = &radeon_atom_get_engine_clock, |
| 1142 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 1143 | .get_memory_clock = &radeon_atom_get_memory_clock, |
| 1144 | .set_memory_clock = &radeon_atom_set_memory_clock, |
| 1145 | .get_pcie_lanes = &r600_get_pcie_lanes, |
| 1146 | .set_pcie_lanes = &r600_set_pcie_lanes, |
| 1147 | .set_clock_gating = NULL, |
| 1148 | .get_temperature = &rv6xx_get_temp, |
| 1149 | }, |
Alex Deucher | 4a6369e | 2013-04-12 14:04:10 -0400 | [diff] [blame] | 1150 | .dpm = { |
| 1151 | .init = &rv6xx_dpm_init, |
| 1152 | .setup_asic = &rv6xx_setup_asic, |
| 1153 | .enable = &rv6xx_dpm_enable, |
| 1154 | .disable = &rv6xx_dpm_disable, |
| 1155 | .set_power_state = &rv6xx_dpm_set_power_state, |
| 1156 | .display_configuration_changed = &rv6xx_dpm_display_configuration_changed, |
| 1157 | .fini = &rv6xx_dpm_fini, |
| 1158 | .get_sclk = &rv6xx_dpm_get_sclk, |
| 1159 | .get_mclk = &rv6xx_dpm_get_mclk, |
| 1160 | .print_power_state = &rv6xx_dpm_print_power_state, |
| 1161 | }, |
Alex Deucher | ca361b6 | 2013-06-21 14:42:08 -0400 | [diff] [blame] | 1162 | .pflip = { |
| 1163 | .pre_page_flip = &rs600_pre_page_flip, |
| 1164 | .page_flip = &rs600_page_flip, |
| 1165 | .post_page_flip = &rs600_post_page_flip, |
| 1166 | }, |
| 1167 | }; |
| 1168 | |
Alex Deucher | f47299c | 2010-03-16 20:54:38 -0400 | [diff] [blame] | 1169 | static struct radeon_asic rs780_asic = { |
| 1170 | .init = &r600_init, |
| 1171 | .fini = &r600_fini, |
| 1172 | .suspend = &r600_suspend, |
| 1173 | .resume = &r600_resume, |
Alex Deucher | f47299c | 2010-03-16 20:54:38 -0400 | [diff] [blame] | 1174 | .vga_set_state = &r600_vga_set_state, |
Jerome Glisse | a2d07b7 | 2010-03-09 14:45:11 +0000 | [diff] [blame] | 1175 | .asic_reset = &r600_asic_reset, |
Alex Deucher | 54e88e0 | 2012-02-23 18:10:29 -0500 | [diff] [blame] | 1176 | .ioctl_wait_idle = r600_ioctl_wait_idle, |
| 1177 | .gui_idle = &r600_gui_idle, |
| 1178 | .mc_wait_for_idle = &r600_mc_wait_for_idle, |
Alex Deucher | 454d2e2 | 2013-02-14 10:04:02 -0500 | [diff] [blame] | 1179 | .get_xclk = &r600_get_xclk, |
Alex Deucher | d041889 | 2013-01-24 10:35:23 -0500 | [diff] [blame] | 1180 | .get_gpu_clock_counter = &r600_get_gpu_clock_counter, |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 1181 | .gart = { |
| 1182 | .tlb_flush = &r600_pcie_gart_tlb_flush, |
| 1183 | .set_page = &rs600_gart_set_page, |
| 1184 | }, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 1185 | .ring = { |
| 1186 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 1187 | .ib_execute = &r600_ring_ib_execute, |
| 1188 | .emit_fence = &r600_fence_ring_emit, |
| 1189 | .emit_semaphore = &r600_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 1190 | .cs_parse = &r600_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 1191 | .ring_test = &r600_ring_test, |
| 1192 | .ib_test = &r600_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 1193 | .is_lockup = &r600_gfx_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1194 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1195 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1196 | .set_wptr = &radeon_ring_generic_set_wptr, |
Alex Deucher | 4d75658 | 2012-09-27 15:08:35 -0400 | [diff] [blame] | 1197 | }, |
| 1198 | [R600_RING_TYPE_DMA_INDEX] = { |
| 1199 | .ib_execute = &r600_dma_ring_ib_execute, |
| 1200 | .emit_fence = &r600_dma_fence_ring_emit, |
| 1201 | .emit_semaphore = &r600_dma_semaphore_ring_emit, |
Alex Deucher | cf4ccd0 | 2011-11-18 10:19:47 -0500 | [diff] [blame] | 1202 | .cs_parse = &r600_dma_cs_parse, |
Alex Deucher | 4d75658 | 2012-09-27 15:08:35 -0400 | [diff] [blame] | 1203 | .ring_test = &r600_dma_ring_test, |
| 1204 | .ib_test = &r600_dma_ib_test, |
| 1205 | .is_lockup = &r600_dma_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1206 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1207 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1208 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 1209 | } |
| 1210 | }, |
Alex Deucher | b35ea4a | 2012-02-23 17:53:43 -0500 | [diff] [blame] | 1211 | .irq = { |
| 1212 | .set = &r600_irq_set, |
| 1213 | .process = &r600_irq_process, |
| 1214 | }, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 1215 | .display = { |
| 1216 | .bandwidth_update = &rs690_bandwidth_update, |
| 1217 | .get_vblank_counter = &rs600_get_vblank_counter, |
| 1218 | .wait_for_vblank = &avivo_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 1219 | .set_backlight_level = &atombios_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 1220 | .get_backlight_level = &atombios_get_backlight_level, |
Alex Deucher | a973bea | 2013-04-18 11:32:16 -0400 | [diff] [blame] | 1221 | .hdmi_enable = &r600_hdmi_enable, |
| 1222 | .hdmi_setmode = &r600_hdmi_setmode, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 1223 | }, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 1224 | .copy = { |
| 1225 | .blit = &r600_copy_blit, |
| 1226 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
Alex Deucher | 4d75658 | 2012-09-27 15:08:35 -0400 | [diff] [blame] | 1227 | .dma = &r600_copy_dma, |
| 1228 | .dma_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | 2d6cc72 | 2012-07-20 13:49:49 -0400 | [diff] [blame] | 1229 | .copy = &r600_copy_dma, |
| 1230 | .copy_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 1231 | }, |
Alex Deucher | 9e6f3d0 | 2012-02-23 17:53:49 -0500 | [diff] [blame] | 1232 | .surface = { |
| 1233 | .set_reg = r600_set_surface_reg, |
| 1234 | .clear_reg = r600_clear_surface_reg, |
| 1235 | }, |
Alex Deucher | 901ea57 | 2012-02-23 17:53:39 -0500 | [diff] [blame] | 1236 | .hpd = { |
| 1237 | .init = &r600_hpd_init, |
| 1238 | .fini = &r600_hpd_fini, |
| 1239 | .sense = &r600_hpd_sense, |
| 1240 | .set_polarity = &r600_hpd_set_polarity, |
| 1241 | }, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 1242 | .pm = { |
| 1243 | .misc = &r600_pm_misc, |
| 1244 | .prepare = &rs600_pm_prepare, |
| 1245 | .finish = &rs600_pm_finish, |
| 1246 | .init_profile = &rs780_pm_init_profile, |
| 1247 | .get_dynpm_state = &r600_pm_get_dynpm_state, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 1248 | .get_engine_clock = &radeon_atom_get_engine_clock, |
| 1249 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 1250 | .get_memory_clock = NULL, |
| 1251 | .set_memory_clock = NULL, |
| 1252 | .get_pcie_lanes = NULL, |
| 1253 | .set_pcie_lanes = NULL, |
| 1254 | .set_clock_gating = NULL, |
Alex Deucher | 6bd1c38 | 2013-06-21 14:38:03 -0400 | [diff] [blame] | 1255 | .get_temperature = &rv6xx_get_temp, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 1256 | }, |
Alex Deucher | 9d67006 | 2013-04-12 13:59:22 -0400 | [diff] [blame] | 1257 | .dpm = { |
| 1258 | .init = &rs780_dpm_init, |
| 1259 | .setup_asic = &rs780_dpm_setup_asic, |
| 1260 | .enable = &rs780_dpm_enable, |
| 1261 | .disable = &rs780_dpm_disable, |
| 1262 | .set_power_state = &rs780_dpm_set_power_state, |
| 1263 | .display_configuration_changed = &rs780_dpm_display_configuration_changed, |
| 1264 | .fini = &rs780_dpm_fini, |
| 1265 | .get_sclk = &rs780_dpm_get_sclk, |
| 1266 | .get_mclk = &rs780_dpm_get_mclk, |
| 1267 | .print_power_state = &rs780_dpm_print_power_state, |
| 1268 | }, |
Alex Deucher | 0f9e006 | 2012-02-23 17:53:40 -0500 | [diff] [blame] | 1269 | .pflip = { |
| 1270 | .pre_page_flip = &rs600_pre_page_flip, |
| 1271 | .page_flip = &rs600_page_flip, |
| 1272 | .post_page_flip = &rs600_post_page_flip, |
| 1273 | }, |
Alex Deucher | f47299c | 2010-03-16 20:54:38 -0400 | [diff] [blame] | 1274 | }; |
| 1275 | |
Daniel Vetter | 48e7a5f | 2010-03-11 21:19:15 +0000 | [diff] [blame] | 1276 | static struct radeon_asic rv770_asic = { |
| 1277 | .init = &rv770_init, |
| 1278 | .fini = &rv770_fini, |
| 1279 | .suspend = &rv770_suspend, |
| 1280 | .resume = &rv770_resume, |
Jerome Glisse | a2d07b7 | 2010-03-09 14:45:11 +0000 | [diff] [blame] | 1281 | .asic_reset = &r600_asic_reset, |
Daniel Vetter | 48e7a5f | 2010-03-11 21:19:15 +0000 | [diff] [blame] | 1282 | .vga_set_state = &r600_vga_set_state, |
Alex Deucher | 54e88e0 | 2012-02-23 18:10:29 -0500 | [diff] [blame] | 1283 | .ioctl_wait_idle = r600_ioctl_wait_idle, |
| 1284 | .gui_idle = &r600_gui_idle, |
| 1285 | .mc_wait_for_idle = &r600_mc_wait_for_idle, |
Alex Deucher | 454d2e2 | 2013-02-14 10:04:02 -0500 | [diff] [blame] | 1286 | .get_xclk = &rv770_get_xclk, |
Alex Deucher | d041889 | 2013-01-24 10:35:23 -0500 | [diff] [blame] | 1287 | .get_gpu_clock_counter = &r600_get_gpu_clock_counter, |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 1288 | .gart = { |
| 1289 | .tlb_flush = &r600_pcie_gart_tlb_flush, |
| 1290 | .set_page = &rs600_gart_set_page, |
| 1291 | }, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 1292 | .ring = { |
| 1293 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 1294 | .ib_execute = &r600_ring_ib_execute, |
| 1295 | .emit_fence = &r600_fence_ring_emit, |
| 1296 | .emit_semaphore = &r600_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 1297 | .cs_parse = &r600_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 1298 | .ring_test = &r600_ring_test, |
| 1299 | .ib_test = &r600_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 1300 | .is_lockup = &r600_gfx_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1301 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1302 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1303 | .set_wptr = &radeon_ring_generic_set_wptr, |
Alex Deucher | 4d75658 | 2012-09-27 15:08:35 -0400 | [diff] [blame] | 1304 | }, |
| 1305 | [R600_RING_TYPE_DMA_INDEX] = { |
| 1306 | .ib_execute = &r600_dma_ring_ib_execute, |
| 1307 | .emit_fence = &r600_dma_fence_ring_emit, |
| 1308 | .emit_semaphore = &r600_dma_semaphore_ring_emit, |
Alex Deucher | cf4ccd0 | 2011-11-18 10:19:47 -0500 | [diff] [blame] | 1309 | .cs_parse = &r600_dma_cs_parse, |
Alex Deucher | 4d75658 | 2012-09-27 15:08:35 -0400 | [diff] [blame] | 1310 | .ring_test = &r600_dma_ring_test, |
| 1311 | .ib_test = &r600_dma_ib_test, |
| 1312 | .is_lockup = &r600_dma_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1313 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1314 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1315 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | f2ba57b | 2013-04-08 12:41:29 +0200 | [diff] [blame] | 1316 | }, |
| 1317 | [R600_RING_TYPE_UVD_INDEX] = { |
| 1318 | .ib_execute = &r600_uvd_ib_execute, |
| 1319 | .emit_fence = &r600_uvd_fence_emit, |
| 1320 | .emit_semaphore = &r600_uvd_semaphore_emit, |
| 1321 | .cs_parse = &radeon_uvd_cs_parse, |
| 1322 | .ring_test = &r600_uvd_ring_test, |
| 1323 | .ib_test = &r600_uvd_ib_test, |
| 1324 | .is_lockup = &radeon_ring_test_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1325 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1326 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1327 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 1328 | } |
| 1329 | }, |
Alex Deucher | b35ea4a | 2012-02-23 17:53:43 -0500 | [diff] [blame] | 1330 | .irq = { |
| 1331 | .set = &r600_irq_set, |
| 1332 | .process = &r600_irq_process, |
| 1333 | }, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 1334 | .display = { |
| 1335 | .bandwidth_update = &rv515_bandwidth_update, |
| 1336 | .get_vblank_counter = &rs600_get_vblank_counter, |
| 1337 | .wait_for_vblank = &avivo_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 1338 | .set_backlight_level = &atombios_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 1339 | .get_backlight_level = &atombios_get_backlight_level, |
Alex Deucher | a973bea | 2013-04-18 11:32:16 -0400 | [diff] [blame] | 1340 | .hdmi_enable = &r600_hdmi_enable, |
| 1341 | .hdmi_setmode = &r600_hdmi_setmode, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 1342 | }, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 1343 | .copy = { |
| 1344 | .blit = &r600_copy_blit, |
| 1345 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
Alex Deucher | 43fb778 | 2013-01-04 09:24:18 -0500 | [diff] [blame] | 1346 | .dma = &rv770_copy_dma, |
Alex Deucher | 4d75658 | 2012-09-27 15:08:35 -0400 | [diff] [blame] | 1347 | .dma_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | 43fb778 | 2013-01-04 09:24:18 -0500 | [diff] [blame] | 1348 | .copy = &rv770_copy_dma, |
Alex Deucher | 2d6cc72 | 2012-07-20 13:49:49 -0400 | [diff] [blame] | 1349 | .copy_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 1350 | }, |
Alex Deucher | 9e6f3d0 | 2012-02-23 17:53:49 -0500 | [diff] [blame] | 1351 | .surface = { |
| 1352 | .set_reg = r600_set_surface_reg, |
| 1353 | .clear_reg = r600_clear_surface_reg, |
| 1354 | }, |
Alex Deucher | 901ea57 | 2012-02-23 17:53:39 -0500 | [diff] [blame] | 1355 | .hpd = { |
| 1356 | .init = &r600_hpd_init, |
| 1357 | .fini = &r600_hpd_fini, |
| 1358 | .sense = &r600_hpd_sense, |
| 1359 | .set_polarity = &r600_hpd_set_polarity, |
| 1360 | }, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 1361 | .pm = { |
| 1362 | .misc = &rv770_pm_misc, |
| 1363 | .prepare = &rs600_pm_prepare, |
| 1364 | .finish = &rs600_pm_finish, |
| 1365 | .init_profile = &r600_pm_init_profile, |
| 1366 | .get_dynpm_state = &r600_pm_get_dynpm_state, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 1367 | .get_engine_clock = &radeon_atom_get_engine_clock, |
| 1368 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 1369 | .get_memory_clock = &radeon_atom_get_memory_clock, |
| 1370 | .set_memory_clock = &radeon_atom_set_memory_clock, |
| 1371 | .get_pcie_lanes = &r600_get_pcie_lanes, |
| 1372 | .set_pcie_lanes = &r600_set_pcie_lanes, |
| 1373 | .set_clock_gating = &radeon_atom_set_clock_gating, |
Christian König | ef0e6e6 | 2013-04-08 12:41:35 +0200 | [diff] [blame] | 1374 | .set_uvd_clocks = &rv770_set_uvd_clocks, |
Alex Deucher | 6bd1c38 | 2013-06-21 14:38:03 -0400 | [diff] [blame] | 1375 | .get_temperature = &rv770_get_temp, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 1376 | }, |
Alex Deucher | 66229b2 | 2013-06-26 00:11:19 -0400 | [diff] [blame] | 1377 | .dpm = { |
| 1378 | .init = &rv770_dpm_init, |
| 1379 | .setup_asic = &rv770_dpm_setup_asic, |
| 1380 | .enable = &rv770_dpm_enable, |
| 1381 | .disable = &rv770_dpm_disable, |
| 1382 | .set_power_state = &rv770_dpm_set_power_state, |
| 1383 | .display_configuration_changed = &rv770_dpm_display_configuration_changed, |
| 1384 | .fini = &rv770_dpm_fini, |
| 1385 | .get_sclk = &rv770_dpm_get_sclk, |
| 1386 | .get_mclk = &rv770_dpm_get_mclk, |
| 1387 | .print_power_state = &rv770_dpm_print_power_state, |
| 1388 | }, |
Alex Deucher | 0f9e006 | 2012-02-23 17:53:40 -0500 | [diff] [blame] | 1389 | .pflip = { |
| 1390 | .pre_page_flip = &rs600_pre_page_flip, |
| 1391 | .page_flip = &rv770_page_flip, |
| 1392 | .post_page_flip = &rs600_post_page_flip, |
| 1393 | }, |
Daniel Vetter | 48e7a5f | 2010-03-11 21:19:15 +0000 | [diff] [blame] | 1394 | }; |
| 1395 | |
| 1396 | static struct radeon_asic evergreen_asic = { |
| 1397 | .init = &evergreen_init, |
| 1398 | .fini = &evergreen_fini, |
| 1399 | .suspend = &evergreen_suspend, |
| 1400 | .resume = &evergreen_resume, |
Jerome Glisse | a2d07b7 | 2010-03-09 14:45:11 +0000 | [diff] [blame] | 1401 | .asic_reset = &evergreen_asic_reset, |
Daniel Vetter | 48e7a5f | 2010-03-11 21:19:15 +0000 | [diff] [blame] | 1402 | .vga_set_state = &r600_vga_set_state, |
Alex Deucher | 54e88e0 | 2012-02-23 18:10:29 -0500 | [diff] [blame] | 1403 | .ioctl_wait_idle = r600_ioctl_wait_idle, |
| 1404 | .gui_idle = &r600_gui_idle, |
| 1405 | .mc_wait_for_idle = &evergreen_mc_wait_for_idle, |
Alex Deucher | 454d2e2 | 2013-02-14 10:04:02 -0500 | [diff] [blame] | 1406 | .get_xclk = &rv770_get_xclk, |
Alex Deucher | d041889 | 2013-01-24 10:35:23 -0500 | [diff] [blame] | 1407 | .get_gpu_clock_counter = &r600_get_gpu_clock_counter, |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 1408 | .gart = { |
| 1409 | .tlb_flush = &evergreen_pcie_gart_tlb_flush, |
| 1410 | .set_page = &rs600_gart_set_page, |
| 1411 | }, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 1412 | .ring = { |
| 1413 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 1414 | .ib_execute = &evergreen_ring_ib_execute, |
| 1415 | .emit_fence = &r600_fence_ring_emit, |
| 1416 | .emit_semaphore = &r600_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 1417 | .cs_parse = &evergreen_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 1418 | .ring_test = &r600_ring_test, |
| 1419 | .ib_test = &r600_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 1420 | .is_lockup = &evergreen_gfx_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1421 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1422 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1423 | .set_wptr = &radeon_ring_generic_set_wptr, |
Alex Deucher | 233d1ad | 2012-12-04 15:25:59 -0500 | [diff] [blame] | 1424 | }, |
| 1425 | [R600_RING_TYPE_DMA_INDEX] = { |
| 1426 | .ib_execute = &evergreen_dma_ring_ib_execute, |
| 1427 | .emit_fence = &evergreen_dma_fence_ring_emit, |
| 1428 | .emit_semaphore = &r600_dma_semaphore_ring_emit, |
Alex Deucher | d2ead3e | 2012-12-13 09:55:45 -0500 | [diff] [blame] | 1429 | .cs_parse = &evergreen_dma_cs_parse, |
Alex Deucher | 233d1ad | 2012-12-04 15:25:59 -0500 | [diff] [blame] | 1430 | .ring_test = &r600_dma_ring_test, |
| 1431 | .ib_test = &r600_dma_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 1432 | .is_lockup = &evergreen_dma_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1433 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1434 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1435 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | f2ba57b | 2013-04-08 12:41:29 +0200 | [diff] [blame] | 1436 | }, |
| 1437 | [R600_RING_TYPE_UVD_INDEX] = { |
| 1438 | .ib_execute = &r600_uvd_ib_execute, |
| 1439 | .emit_fence = &r600_uvd_fence_emit, |
| 1440 | .emit_semaphore = &r600_uvd_semaphore_emit, |
| 1441 | .cs_parse = &radeon_uvd_cs_parse, |
| 1442 | .ring_test = &r600_uvd_ring_test, |
| 1443 | .ib_test = &r600_uvd_ib_test, |
| 1444 | .is_lockup = &radeon_ring_test_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1445 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1446 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1447 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 1448 | } |
| 1449 | }, |
Alex Deucher | b35ea4a | 2012-02-23 17:53:43 -0500 | [diff] [blame] | 1450 | .irq = { |
| 1451 | .set = &evergreen_irq_set, |
| 1452 | .process = &evergreen_irq_process, |
| 1453 | }, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 1454 | .display = { |
| 1455 | .bandwidth_update = &evergreen_bandwidth_update, |
| 1456 | .get_vblank_counter = &evergreen_get_vblank_counter, |
| 1457 | .wait_for_vblank = &dce4_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 1458 | .set_backlight_level = &atombios_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 1459 | .get_backlight_level = &atombios_get_backlight_level, |
Alex Deucher | a973bea | 2013-04-18 11:32:16 -0400 | [diff] [blame] | 1460 | .hdmi_enable = &evergreen_hdmi_enable, |
| 1461 | .hdmi_setmode = &evergreen_hdmi_setmode, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 1462 | }, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 1463 | .copy = { |
| 1464 | .blit = &r600_copy_blit, |
| 1465 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
Alex Deucher | 233d1ad | 2012-12-04 15:25:59 -0500 | [diff] [blame] | 1466 | .dma = &evergreen_copy_dma, |
| 1467 | .dma_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | 2d6cc72 | 2012-07-20 13:49:49 -0400 | [diff] [blame] | 1468 | .copy = &evergreen_copy_dma, |
| 1469 | .copy_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 1470 | }, |
Alex Deucher | 9e6f3d0 | 2012-02-23 17:53:49 -0500 | [diff] [blame] | 1471 | .surface = { |
| 1472 | .set_reg = r600_set_surface_reg, |
| 1473 | .clear_reg = r600_clear_surface_reg, |
| 1474 | }, |
Alex Deucher | 901ea57 | 2012-02-23 17:53:39 -0500 | [diff] [blame] | 1475 | .hpd = { |
| 1476 | .init = &evergreen_hpd_init, |
| 1477 | .fini = &evergreen_hpd_fini, |
| 1478 | .sense = &evergreen_hpd_sense, |
| 1479 | .set_polarity = &evergreen_hpd_set_polarity, |
| 1480 | }, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 1481 | .pm = { |
| 1482 | .misc = &evergreen_pm_misc, |
| 1483 | .prepare = &evergreen_pm_prepare, |
| 1484 | .finish = &evergreen_pm_finish, |
| 1485 | .init_profile = &r600_pm_init_profile, |
| 1486 | .get_dynpm_state = &r600_pm_get_dynpm_state, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 1487 | .get_engine_clock = &radeon_atom_get_engine_clock, |
| 1488 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 1489 | .get_memory_clock = &radeon_atom_get_memory_clock, |
| 1490 | .set_memory_clock = &radeon_atom_set_memory_clock, |
| 1491 | .get_pcie_lanes = &r600_get_pcie_lanes, |
| 1492 | .set_pcie_lanes = &r600_set_pcie_lanes, |
| 1493 | .set_clock_gating = NULL, |
Alex Deucher | a8b4925 | 2013-04-08 12:41:33 +0200 | [diff] [blame] | 1494 | .set_uvd_clocks = &evergreen_set_uvd_clocks, |
Alex Deucher | 6bd1c38 | 2013-06-21 14:38:03 -0400 | [diff] [blame] | 1495 | .get_temperature = &evergreen_get_temp, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 1496 | }, |
Alex Deucher | dc50ba7 | 2013-06-26 00:33:35 -0400 | [diff] [blame^] | 1497 | .dpm = { |
| 1498 | .init = &cypress_dpm_init, |
| 1499 | .setup_asic = &cypress_dpm_setup_asic, |
| 1500 | .enable = &cypress_dpm_enable, |
| 1501 | .disable = &cypress_dpm_disable, |
| 1502 | .set_power_state = &cypress_dpm_set_power_state, |
| 1503 | .display_configuration_changed = &cypress_dpm_display_configuration_changed, |
| 1504 | .fini = &cypress_dpm_fini, |
| 1505 | .get_sclk = &rv770_dpm_get_sclk, |
| 1506 | .get_mclk = &rv770_dpm_get_mclk, |
| 1507 | .print_power_state = &rv770_dpm_print_power_state, |
| 1508 | }, |
Alex Deucher | 0f9e006 | 2012-02-23 17:53:40 -0500 | [diff] [blame] | 1509 | .pflip = { |
| 1510 | .pre_page_flip = &evergreen_pre_page_flip, |
| 1511 | .page_flip = &evergreen_page_flip, |
| 1512 | .post_page_flip = &evergreen_post_page_flip, |
| 1513 | }, |
Daniel Vetter | 48e7a5f | 2010-03-11 21:19:15 +0000 | [diff] [blame] | 1514 | }; |
| 1515 | |
Alex Deucher | 958261d | 2010-11-22 17:56:30 -0500 | [diff] [blame] | 1516 | static struct radeon_asic sumo_asic = { |
| 1517 | .init = &evergreen_init, |
| 1518 | .fini = &evergreen_fini, |
| 1519 | .suspend = &evergreen_suspend, |
| 1520 | .resume = &evergreen_resume, |
Alex Deucher | 958261d | 2010-11-22 17:56:30 -0500 | [diff] [blame] | 1521 | .asic_reset = &evergreen_asic_reset, |
| 1522 | .vga_set_state = &r600_vga_set_state, |
Alex Deucher | 54e88e0 | 2012-02-23 18:10:29 -0500 | [diff] [blame] | 1523 | .ioctl_wait_idle = r600_ioctl_wait_idle, |
| 1524 | .gui_idle = &r600_gui_idle, |
| 1525 | .mc_wait_for_idle = &evergreen_mc_wait_for_idle, |
Alex Deucher | 454d2e2 | 2013-02-14 10:04:02 -0500 | [diff] [blame] | 1526 | .get_xclk = &r600_get_xclk, |
Alex Deucher | d041889 | 2013-01-24 10:35:23 -0500 | [diff] [blame] | 1527 | .get_gpu_clock_counter = &r600_get_gpu_clock_counter, |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 1528 | .gart = { |
| 1529 | .tlb_flush = &evergreen_pcie_gart_tlb_flush, |
| 1530 | .set_page = &rs600_gart_set_page, |
| 1531 | }, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 1532 | .ring = { |
| 1533 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 1534 | .ib_execute = &evergreen_ring_ib_execute, |
| 1535 | .emit_fence = &r600_fence_ring_emit, |
| 1536 | .emit_semaphore = &r600_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 1537 | .cs_parse = &evergreen_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 1538 | .ring_test = &r600_ring_test, |
| 1539 | .ib_test = &r600_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 1540 | .is_lockup = &evergreen_gfx_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1541 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1542 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1543 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 1544 | }, |
Alex Deucher | 233d1ad | 2012-12-04 15:25:59 -0500 | [diff] [blame] | 1545 | [R600_RING_TYPE_DMA_INDEX] = { |
| 1546 | .ib_execute = &evergreen_dma_ring_ib_execute, |
| 1547 | .emit_fence = &evergreen_dma_fence_ring_emit, |
| 1548 | .emit_semaphore = &r600_dma_semaphore_ring_emit, |
Alex Deucher | d2ead3e | 2012-12-13 09:55:45 -0500 | [diff] [blame] | 1549 | .cs_parse = &evergreen_dma_cs_parse, |
Alex Deucher | 233d1ad | 2012-12-04 15:25:59 -0500 | [diff] [blame] | 1550 | .ring_test = &r600_dma_ring_test, |
| 1551 | .ib_test = &r600_dma_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 1552 | .is_lockup = &evergreen_dma_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1553 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1554 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1555 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | f2ba57b | 2013-04-08 12:41:29 +0200 | [diff] [blame] | 1556 | }, |
| 1557 | [R600_RING_TYPE_UVD_INDEX] = { |
| 1558 | .ib_execute = &r600_uvd_ib_execute, |
| 1559 | .emit_fence = &r600_uvd_fence_emit, |
| 1560 | .emit_semaphore = &r600_uvd_semaphore_emit, |
| 1561 | .cs_parse = &radeon_uvd_cs_parse, |
| 1562 | .ring_test = &r600_uvd_ring_test, |
| 1563 | .ib_test = &r600_uvd_ib_test, |
| 1564 | .is_lockup = &radeon_ring_test_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1565 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1566 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1567 | .set_wptr = &radeon_ring_generic_set_wptr, |
Alex Deucher | 233d1ad | 2012-12-04 15:25:59 -0500 | [diff] [blame] | 1568 | } |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 1569 | }, |
Alex Deucher | b35ea4a | 2012-02-23 17:53:43 -0500 | [diff] [blame] | 1570 | .irq = { |
| 1571 | .set = &evergreen_irq_set, |
| 1572 | .process = &evergreen_irq_process, |
| 1573 | }, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 1574 | .display = { |
| 1575 | .bandwidth_update = &evergreen_bandwidth_update, |
| 1576 | .get_vblank_counter = &evergreen_get_vblank_counter, |
| 1577 | .wait_for_vblank = &dce4_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 1578 | .set_backlight_level = &atombios_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 1579 | .get_backlight_level = &atombios_get_backlight_level, |
Alex Deucher | a973bea | 2013-04-18 11:32:16 -0400 | [diff] [blame] | 1580 | .hdmi_enable = &evergreen_hdmi_enable, |
| 1581 | .hdmi_setmode = &evergreen_hdmi_setmode, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 1582 | }, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 1583 | .copy = { |
| 1584 | .blit = &r600_copy_blit, |
| 1585 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
Alex Deucher | 233d1ad | 2012-12-04 15:25:59 -0500 | [diff] [blame] | 1586 | .dma = &evergreen_copy_dma, |
| 1587 | .dma_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | 2d6cc72 | 2012-07-20 13:49:49 -0400 | [diff] [blame] | 1588 | .copy = &evergreen_copy_dma, |
| 1589 | .copy_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 1590 | }, |
Alex Deucher | 9e6f3d0 | 2012-02-23 17:53:49 -0500 | [diff] [blame] | 1591 | .surface = { |
| 1592 | .set_reg = r600_set_surface_reg, |
| 1593 | .clear_reg = r600_clear_surface_reg, |
| 1594 | }, |
Alex Deucher | 901ea57 | 2012-02-23 17:53:39 -0500 | [diff] [blame] | 1595 | .hpd = { |
| 1596 | .init = &evergreen_hpd_init, |
| 1597 | .fini = &evergreen_hpd_fini, |
| 1598 | .sense = &evergreen_hpd_sense, |
| 1599 | .set_polarity = &evergreen_hpd_set_polarity, |
| 1600 | }, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 1601 | .pm = { |
| 1602 | .misc = &evergreen_pm_misc, |
| 1603 | .prepare = &evergreen_pm_prepare, |
| 1604 | .finish = &evergreen_pm_finish, |
| 1605 | .init_profile = &sumo_pm_init_profile, |
| 1606 | .get_dynpm_state = &r600_pm_get_dynpm_state, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 1607 | .get_engine_clock = &radeon_atom_get_engine_clock, |
| 1608 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 1609 | .get_memory_clock = NULL, |
| 1610 | .set_memory_clock = NULL, |
| 1611 | .get_pcie_lanes = NULL, |
| 1612 | .set_pcie_lanes = NULL, |
| 1613 | .set_clock_gating = NULL, |
Alex Deucher | 23d33ba | 2013-04-08 12:41:32 +0200 | [diff] [blame] | 1614 | .set_uvd_clocks = &sumo_set_uvd_clocks, |
Alex Deucher | 6bd1c38 | 2013-06-21 14:38:03 -0400 | [diff] [blame] | 1615 | .get_temperature = &sumo_get_temp, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 1616 | }, |
Alex Deucher | 0f9e006 | 2012-02-23 17:53:40 -0500 | [diff] [blame] | 1617 | .pflip = { |
| 1618 | .pre_page_flip = &evergreen_pre_page_flip, |
| 1619 | .page_flip = &evergreen_page_flip, |
| 1620 | .post_page_flip = &evergreen_post_page_flip, |
| 1621 | }, |
Alex Deucher | 958261d | 2010-11-22 17:56:30 -0500 | [diff] [blame] | 1622 | }; |
| 1623 | |
Alex Deucher | a43b766 | 2011-01-06 21:19:33 -0500 | [diff] [blame] | 1624 | static struct radeon_asic btc_asic = { |
| 1625 | .init = &evergreen_init, |
| 1626 | .fini = &evergreen_fini, |
| 1627 | .suspend = &evergreen_suspend, |
| 1628 | .resume = &evergreen_resume, |
Alex Deucher | a43b766 | 2011-01-06 21:19:33 -0500 | [diff] [blame] | 1629 | .asic_reset = &evergreen_asic_reset, |
| 1630 | .vga_set_state = &r600_vga_set_state, |
Alex Deucher | 54e88e0 | 2012-02-23 18:10:29 -0500 | [diff] [blame] | 1631 | .ioctl_wait_idle = r600_ioctl_wait_idle, |
| 1632 | .gui_idle = &r600_gui_idle, |
| 1633 | .mc_wait_for_idle = &evergreen_mc_wait_for_idle, |
Alex Deucher | 454d2e2 | 2013-02-14 10:04:02 -0500 | [diff] [blame] | 1634 | .get_xclk = &rv770_get_xclk, |
Alex Deucher | d041889 | 2013-01-24 10:35:23 -0500 | [diff] [blame] | 1635 | .get_gpu_clock_counter = &r600_get_gpu_clock_counter, |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 1636 | .gart = { |
| 1637 | .tlb_flush = &evergreen_pcie_gart_tlb_flush, |
| 1638 | .set_page = &rs600_gart_set_page, |
| 1639 | }, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 1640 | .ring = { |
| 1641 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 1642 | .ib_execute = &evergreen_ring_ib_execute, |
| 1643 | .emit_fence = &r600_fence_ring_emit, |
| 1644 | .emit_semaphore = &r600_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 1645 | .cs_parse = &evergreen_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 1646 | .ring_test = &r600_ring_test, |
| 1647 | .ib_test = &r600_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 1648 | .is_lockup = &evergreen_gfx_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1649 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1650 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1651 | .set_wptr = &radeon_ring_generic_set_wptr, |
Alex Deucher | 233d1ad | 2012-12-04 15:25:59 -0500 | [diff] [blame] | 1652 | }, |
| 1653 | [R600_RING_TYPE_DMA_INDEX] = { |
| 1654 | .ib_execute = &evergreen_dma_ring_ib_execute, |
| 1655 | .emit_fence = &evergreen_dma_fence_ring_emit, |
| 1656 | .emit_semaphore = &r600_dma_semaphore_ring_emit, |
Alex Deucher | d2ead3e | 2012-12-13 09:55:45 -0500 | [diff] [blame] | 1657 | .cs_parse = &evergreen_dma_cs_parse, |
Alex Deucher | 233d1ad | 2012-12-04 15:25:59 -0500 | [diff] [blame] | 1658 | .ring_test = &r600_dma_ring_test, |
| 1659 | .ib_test = &r600_dma_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 1660 | .is_lockup = &evergreen_dma_is_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1661 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1662 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1663 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | f2ba57b | 2013-04-08 12:41:29 +0200 | [diff] [blame] | 1664 | }, |
| 1665 | [R600_RING_TYPE_UVD_INDEX] = { |
| 1666 | .ib_execute = &r600_uvd_ib_execute, |
| 1667 | .emit_fence = &r600_uvd_fence_emit, |
| 1668 | .emit_semaphore = &r600_uvd_semaphore_emit, |
| 1669 | .cs_parse = &radeon_uvd_cs_parse, |
| 1670 | .ring_test = &r600_uvd_ring_test, |
| 1671 | .ib_test = &r600_uvd_ib_test, |
| 1672 | .is_lockup = &radeon_ring_test_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1673 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1674 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1675 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 1676 | } |
| 1677 | }, |
Alex Deucher | b35ea4a | 2012-02-23 17:53:43 -0500 | [diff] [blame] | 1678 | .irq = { |
| 1679 | .set = &evergreen_irq_set, |
| 1680 | .process = &evergreen_irq_process, |
| 1681 | }, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 1682 | .display = { |
| 1683 | .bandwidth_update = &evergreen_bandwidth_update, |
| 1684 | .get_vblank_counter = &evergreen_get_vblank_counter, |
| 1685 | .wait_for_vblank = &dce4_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 1686 | .set_backlight_level = &atombios_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 1687 | .get_backlight_level = &atombios_get_backlight_level, |
Alex Deucher | a973bea | 2013-04-18 11:32:16 -0400 | [diff] [blame] | 1688 | .hdmi_enable = &evergreen_hdmi_enable, |
| 1689 | .hdmi_setmode = &evergreen_hdmi_setmode, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 1690 | }, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 1691 | .copy = { |
| 1692 | .blit = &r600_copy_blit, |
| 1693 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
Alex Deucher | 233d1ad | 2012-12-04 15:25:59 -0500 | [diff] [blame] | 1694 | .dma = &evergreen_copy_dma, |
| 1695 | .dma_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | 2d6cc72 | 2012-07-20 13:49:49 -0400 | [diff] [blame] | 1696 | .copy = &evergreen_copy_dma, |
| 1697 | .copy_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 1698 | }, |
Alex Deucher | 9e6f3d0 | 2012-02-23 17:53:49 -0500 | [diff] [blame] | 1699 | .surface = { |
| 1700 | .set_reg = r600_set_surface_reg, |
| 1701 | .clear_reg = r600_clear_surface_reg, |
| 1702 | }, |
Alex Deucher | 901ea57 | 2012-02-23 17:53:39 -0500 | [diff] [blame] | 1703 | .hpd = { |
| 1704 | .init = &evergreen_hpd_init, |
| 1705 | .fini = &evergreen_hpd_fini, |
| 1706 | .sense = &evergreen_hpd_sense, |
| 1707 | .set_polarity = &evergreen_hpd_set_polarity, |
| 1708 | }, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 1709 | .pm = { |
| 1710 | .misc = &evergreen_pm_misc, |
| 1711 | .prepare = &evergreen_pm_prepare, |
| 1712 | .finish = &evergreen_pm_finish, |
Alex Deucher | 27810fb | 2012-10-01 19:25:11 -0400 | [diff] [blame] | 1713 | .init_profile = &btc_pm_init_profile, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 1714 | .get_dynpm_state = &r600_pm_get_dynpm_state, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 1715 | .get_engine_clock = &radeon_atom_get_engine_clock, |
| 1716 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 1717 | .get_memory_clock = &radeon_atom_get_memory_clock, |
| 1718 | .set_memory_clock = &radeon_atom_set_memory_clock, |
Alex Deucher | 55b615a | 2013-03-18 18:57:27 -0400 | [diff] [blame] | 1719 | .get_pcie_lanes = &r600_get_pcie_lanes, |
| 1720 | .set_pcie_lanes = &r600_set_pcie_lanes, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 1721 | .set_clock_gating = NULL, |
Alex Deucher | a8b4925 | 2013-04-08 12:41:33 +0200 | [diff] [blame] | 1722 | .set_uvd_clocks = &evergreen_set_uvd_clocks, |
Alex Deucher | 6bd1c38 | 2013-06-21 14:38:03 -0400 | [diff] [blame] | 1723 | .get_temperature = &evergreen_get_temp, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 1724 | }, |
Alex Deucher | 0f9e006 | 2012-02-23 17:53:40 -0500 | [diff] [blame] | 1725 | .pflip = { |
| 1726 | .pre_page_flip = &evergreen_pre_page_flip, |
| 1727 | .page_flip = &evergreen_page_flip, |
| 1728 | .post_page_flip = &evergreen_post_page_flip, |
| 1729 | }, |
Alex Deucher | a43b766 | 2011-01-06 21:19:33 -0500 | [diff] [blame] | 1730 | }; |
| 1731 | |
Alex Deucher | e348762 | 2011-03-02 20:07:36 -0500 | [diff] [blame] | 1732 | static struct radeon_asic cayman_asic = { |
| 1733 | .init = &cayman_init, |
| 1734 | .fini = &cayman_fini, |
| 1735 | .suspend = &cayman_suspend, |
| 1736 | .resume = &cayman_resume, |
Alex Deucher | e348762 | 2011-03-02 20:07:36 -0500 | [diff] [blame] | 1737 | .asic_reset = &cayman_asic_reset, |
| 1738 | .vga_set_state = &r600_vga_set_state, |
Alex Deucher | 54e88e0 | 2012-02-23 18:10:29 -0500 | [diff] [blame] | 1739 | .ioctl_wait_idle = r600_ioctl_wait_idle, |
| 1740 | .gui_idle = &r600_gui_idle, |
| 1741 | .mc_wait_for_idle = &evergreen_mc_wait_for_idle, |
Alex Deucher | 454d2e2 | 2013-02-14 10:04:02 -0500 | [diff] [blame] | 1742 | .get_xclk = &rv770_get_xclk, |
Alex Deucher | d041889 | 2013-01-24 10:35:23 -0500 | [diff] [blame] | 1743 | .get_gpu_clock_counter = &r600_get_gpu_clock_counter, |
Alex Deucher | c5b3b85 | 2012-02-23 17:53:46 -0500 | [diff] [blame] | 1744 | .gart = { |
| 1745 | .tlb_flush = &cayman_pcie_gart_tlb_flush, |
| 1746 | .set_page = &rs600_gart_set_page, |
| 1747 | }, |
Christian König | 05b0714 | 2012-08-06 20:21:10 +0200 | [diff] [blame] | 1748 | .vm = { |
| 1749 | .init = &cayman_vm_init, |
| 1750 | .fini = &cayman_vm_fini, |
Alex Deucher | df16004 | 2013-01-31 16:26:02 -0500 | [diff] [blame] | 1751 | .pt_ring_index = R600_RING_TYPE_DMA_INDEX, |
Christian König | 05b0714 | 2012-08-06 20:21:10 +0200 | [diff] [blame] | 1752 | .set_page = &cayman_vm_set_page, |
| 1753 | }, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 1754 | .ring = { |
| 1755 | [RADEON_RING_TYPE_GFX_INDEX] = { |
Jerome Glisse | 721604a | 2012-01-05 22:11:05 -0500 | [diff] [blame] | 1756 | .ib_execute = &cayman_ring_ib_execute, |
| 1757 | .ib_parse = &evergreen_ib_parse, |
Alex Deucher | b40e7e1 | 2011-11-17 14:57:50 -0500 | [diff] [blame] | 1758 | .emit_fence = &cayman_fence_ring_emit, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 1759 | .emit_semaphore = &r600_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 1760 | .cs_parse = &evergreen_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 1761 | .ring_test = &r600_ring_test, |
| 1762 | .ib_test = &r600_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 1763 | .is_lockup = &cayman_gfx_is_lockup, |
Christian König | 9b40e5d | 2012-08-08 12:22:43 +0200 | [diff] [blame] | 1764 | .vm_flush = &cayman_vm_flush, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1765 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1766 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1767 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 1768 | }, |
| 1769 | [CAYMAN_RING_TYPE_CP1_INDEX] = { |
Jerome Glisse | 721604a | 2012-01-05 22:11:05 -0500 | [diff] [blame] | 1770 | .ib_execute = &cayman_ring_ib_execute, |
| 1771 | .ib_parse = &evergreen_ib_parse, |
Alex Deucher | b40e7e1 | 2011-11-17 14:57:50 -0500 | [diff] [blame] | 1772 | .emit_fence = &cayman_fence_ring_emit, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 1773 | .emit_semaphore = &r600_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 1774 | .cs_parse = &evergreen_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 1775 | .ring_test = &r600_ring_test, |
| 1776 | .ib_test = &r600_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 1777 | .is_lockup = &cayman_gfx_is_lockup, |
Christian König | 9b40e5d | 2012-08-08 12:22:43 +0200 | [diff] [blame] | 1778 | .vm_flush = &cayman_vm_flush, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1779 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1780 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1781 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 1782 | }, |
| 1783 | [CAYMAN_RING_TYPE_CP2_INDEX] = { |
Jerome Glisse | 721604a | 2012-01-05 22:11:05 -0500 | [diff] [blame] | 1784 | .ib_execute = &cayman_ring_ib_execute, |
| 1785 | .ib_parse = &evergreen_ib_parse, |
Alex Deucher | b40e7e1 | 2011-11-17 14:57:50 -0500 | [diff] [blame] | 1786 | .emit_fence = &cayman_fence_ring_emit, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 1787 | .emit_semaphore = &r600_semaphore_ring_emit, |
Christian König | eb0c19c | 2012-02-23 15:18:44 +0100 | [diff] [blame] | 1788 | .cs_parse = &evergreen_cs_parse, |
Alex Deucher | f712812 | 2012-02-23 17:53:45 -0500 | [diff] [blame] | 1789 | .ring_test = &r600_ring_test, |
| 1790 | .ib_test = &r600_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 1791 | .is_lockup = &cayman_gfx_is_lockup, |
Christian König | 9b40e5d | 2012-08-08 12:22:43 +0200 | [diff] [blame] | 1792 | .vm_flush = &cayman_vm_flush, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1793 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1794 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1795 | .set_wptr = &radeon_ring_generic_set_wptr, |
Alex Deucher | f60cbd1 | 2012-12-04 15:27:33 -0500 | [diff] [blame] | 1796 | }, |
| 1797 | [R600_RING_TYPE_DMA_INDEX] = { |
| 1798 | .ib_execute = &cayman_dma_ring_ib_execute, |
Alex Deucher | cd459e5 | 2012-12-13 12:17:38 -0500 | [diff] [blame] | 1799 | .ib_parse = &evergreen_dma_ib_parse, |
Alex Deucher | f60cbd1 | 2012-12-04 15:27:33 -0500 | [diff] [blame] | 1800 | .emit_fence = &evergreen_dma_fence_ring_emit, |
| 1801 | .emit_semaphore = &r600_dma_semaphore_ring_emit, |
Alex Deucher | d2ead3e | 2012-12-13 09:55:45 -0500 | [diff] [blame] | 1802 | .cs_parse = &evergreen_dma_cs_parse, |
Alex Deucher | f60cbd1 | 2012-12-04 15:27:33 -0500 | [diff] [blame] | 1803 | .ring_test = &r600_dma_ring_test, |
| 1804 | .ib_test = &r600_dma_ib_test, |
| 1805 | .is_lockup = &cayman_dma_is_lockup, |
| 1806 | .vm_flush = &cayman_dma_vm_flush, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1807 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1808 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1809 | .set_wptr = &radeon_ring_generic_set_wptr, |
Alex Deucher | f60cbd1 | 2012-12-04 15:27:33 -0500 | [diff] [blame] | 1810 | }, |
| 1811 | [CAYMAN_RING_TYPE_DMA1_INDEX] = { |
| 1812 | .ib_execute = &cayman_dma_ring_ib_execute, |
Alex Deucher | cd459e5 | 2012-12-13 12:17:38 -0500 | [diff] [blame] | 1813 | .ib_parse = &evergreen_dma_ib_parse, |
Alex Deucher | f60cbd1 | 2012-12-04 15:27:33 -0500 | [diff] [blame] | 1814 | .emit_fence = &evergreen_dma_fence_ring_emit, |
| 1815 | .emit_semaphore = &r600_dma_semaphore_ring_emit, |
Alex Deucher | d2ead3e | 2012-12-13 09:55:45 -0500 | [diff] [blame] | 1816 | .cs_parse = &evergreen_dma_cs_parse, |
Alex Deucher | f60cbd1 | 2012-12-04 15:27:33 -0500 | [diff] [blame] | 1817 | .ring_test = &r600_dma_ring_test, |
| 1818 | .ib_test = &r600_dma_ib_test, |
| 1819 | .is_lockup = &cayman_dma_is_lockup, |
| 1820 | .vm_flush = &cayman_dma_vm_flush, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1821 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1822 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1823 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | f2ba57b | 2013-04-08 12:41:29 +0200 | [diff] [blame] | 1824 | }, |
| 1825 | [R600_RING_TYPE_UVD_INDEX] = { |
| 1826 | .ib_execute = &r600_uvd_ib_execute, |
| 1827 | .emit_fence = &r600_uvd_fence_emit, |
| 1828 | .emit_semaphore = &cayman_uvd_semaphore_emit, |
| 1829 | .cs_parse = &radeon_uvd_cs_parse, |
| 1830 | .ring_test = &r600_uvd_ring_test, |
| 1831 | .ib_test = &r600_uvd_ib_test, |
| 1832 | .is_lockup = &radeon_ring_test_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1833 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1834 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1835 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | 4c87bc2 | 2011-10-19 19:02:21 +0200 | [diff] [blame] | 1836 | } |
| 1837 | }, |
Alex Deucher | b35ea4a | 2012-02-23 17:53:43 -0500 | [diff] [blame] | 1838 | .irq = { |
| 1839 | .set = &evergreen_irq_set, |
| 1840 | .process = &evergreen_irq_process, |
| 1841 | }, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 1842 | .display = { |
| 1843 | .bandwidth_update = &evergreen_bandwidth_update, |
| 1844 | .get_vblank_counter = &evergreen_get_vblank_counter, |
| 1845 | .wait_for_vblank = &dce4_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 1846 | .set_backlight_level = &atombios_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 1847 | .get_backlight_level = &atombios_get_backlight_level, |
Alex Deucher | a973bea | 2013-04-18 11:32:16 -0400 | [diff] [blame] | 1848 | .hdmi_enable = &evergreen_hdmi_enable, |
| 1849 | .hdmi_setmode = &evergreen_hdmi_setmode, |
Alex Deucher | c79a49c | 2012-02-23 17:53:47 -0500 | [diff] [blame] | 1850 | }, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 1851 | .copy = { |
| 1852 | .blit = &r600_copy_blit, |
| 1853 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
Alex Deucher | f60cbd1 | 2012-12-04 15:27:33 -0500 | [diff] [blame] | 1854 | .dma = &evergreen_copy_dma, |
| 1855 | .dma_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | 2d6cc72 | 2012-07-20 13:49:49 -0400 | [diff] [blame] | 1856 | .copy = &evergreen_copy_dma, |
| 1857 | .copy_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | 27cd776 | 2012-02-23 17:53:42 -0500 | [diff] [blame] | 1858 | }, |
Alex Deucher | 9e6f3d0 | 2012-02-23 17:53:49 -0500 | [diff] [blame] | 1859 | .surface = { |
| 1860 | .set_reg = r600_set_surface_reg, |
| 1861 | .clear_reg = r600_clear_surface_reg, |
| 1862 | }, |
Alex Deucher | 901ea57 | 2012-02-23 17:53:39 -0500 | [diff] [blame] | 1863 | .hpd = { |
| 1864 | .init = &evergreen_hpd_init, |
| 1865 | .fini = &evergreen_hpd_fini, |
| 1866 | .sense = &evergreen_hpd_sense, |
| 1867 | .set_polarity = &evergreen_hpd_set_polarity, |
| 1868 | }, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 1869 | .pm = { |
| 1870 | .misc = &evergreen_pm_misc, |
| 1871 | .prepare = &evergreen_pm_prepare, |
| 1872 | .finish = &evergreen_pm_finish, |
Alex Deucher | 27810fb | 2012-10-01 19:25:11 -0400 | [diff] [blame] | 1873 | .init_profile = &btc_pm_init_profile, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 1874 | .get_dynpm_state = &r600_pm_get_dynpm_state, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 1875 | .get_engine_clock = &radeon_atom_get_engine_clock, |
| 1876 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 1877 | .get_memory_clock = &radeon_atom_get_memory_clock, |
| 1878 | .set_memory_clock = &radeon_atom_set_memory_clock, |
Alex Deucher | 55b615a | 2013-03-18 18:57:27 -0400 | [diff] [blame] | 1879 | .get_pcie_lanes = &r600_get_pcie_lanes, |
| 1880 | .set_pcie_lanes = &r600_set_pcie_lanes, |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 1881 | .set_clock_gating = NULL, |
Alex Deucher | a8b4925 | 2013-04-08 12:41:33 +0200 | [diff] [blame] | 1882 | .set_uvd_clocks = &evergreen_set_uvd_clocks, |
Alex Deucher | 6bd1c38 | 2013-06-21 14:38:03 -0400 | [diff] [blame] | 1883 | .get_temperature = &evergreen_get_temp, |
Alex Deucher | a02fa39 | 2012-02-23 17:53:41 -0500 | [diff] [blame] | 1884 | }, |
Alex Deucher | 0f9e006 | 2012-02-23 17:53:40 -0500 | [diff] [blame] | 1885 | .pflip = { |
| 1886 | .pre_page_flip = &evergreen_pre_page_flip, |
| 1887 | .page_flip = &evergreen_page_flip, |
| 1888 | .post_page_flip = &evergreen_post_page_flip, |
| 1889 | }, |
Alex Deucher | e348762 | 2011-03-02 20:07:36 -0500 | [diff] [blame] | 1890 | }; |
| 1891 | |
Alex Deucher | be63fe8 | 2012-03-20 17:18:40 -0400 | [diff] [blame] | 1892 | static struct radeon_asic trinity_asic = { |
| 1893 | .init = &cayman_init, |
| 1894 | .fini = &cayman_fini, |
| 1895 | .suspend = &cayman_suspend, |
| 1896 | .resume = &cayman_resume, |
Alex Deucher | be63fe8 | 2012-03-20 17:18:40 -0400 | [diff] [blame] | 1897 | .asic_reset = &cayman_asic_reset, |
| 1898 | .vga_set_state = &r600_vga_set_state, |
| 1899 | .ioctl_wait_idle = r600_ioctl_wait_idle, |
| 1900 | .gui_idle = &r600_gui_idle, |
| 1901 | .mc_wait_for_idle = &evergreen_mc_wait_for_idle, |
Alex Deucher | 454d2e2 | 2013-02-14 10:04:02 -0500 | [diff] [blame] | 1902 | .get_xclk = &r600_get_xclk, |
Alex Deucher | d041889 | 2013-01-24 10:35:23 -0500 | [diff] [blame] | 1903 | .get_gpu_clock_counter = &r600_get_gpu_clock_counter, |
Alex Deucher | be63fe8 | 2012-03-20 17:18:40 -0400 | [diff] [blame] | 1904 | .gart = { |
| 1905 | .tlb_flush = &cayman_pcie_gart_tlb_flush, |
| 1906 | .set_page = &rs600_gart_set_page, |
| 1907 | }, |
Christian König | 05b0714 | 2012-08-06 20:21:10 +0200 | [diff] [blame] | 1908 | .vm = { |
| 1909 | .init = &cayman_vm_init, |
| 1910 | .fini = &cayman_vm_fini, |
Alex Deucher | df16004 | 2013-01-31 16:26:02 -0500 | [diff] [blame] | 1911 | .pt_ring_index = R600_RING_TYPE_DMA_INDEX, |
Christian König | 05b0714 | 2012-08-06 20:21:10 +0200 | [diff] [blame] | 1912 | .set_page = &cayman_vm_set_page, |
| 1913 | }, |
Alex Deucher | be63fe8 | 2012-03-20 17:18:40 -0400 | [diff] [blame] | 1914 | .ring = { |
| 1915 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 1916 | .ib_execute = &cayman_ring_ib_execute, |
| 1917 | .ib_parse = &evergreen_ib_parse, |
| 1918 | .emit_fence = &cayman_fence_ring_emit, |
| 1919 | .emit_semaphore = &r600_semaphore_ring_emit, |
| 1920 | .cs_parse = &evergreen_cs_parse, |
| 1921 | .ring_test = &r600_ring_test, |
| 1922 | .ib_test = &r600_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 1923 | .is_lockup = &cayman_gfx_is_lockup, |
Christian König | 9b40e5d | 2012-08-08 12:22:43 +0200 | [diff] [blame] | 1924 | .vm_flush = &cayman_vm_flush, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1925 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1926 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1927 | .set_wptr = &radeon_ring_generic_set_wptr, |
Alex Deucher | be63fe8 | 2012-03-20 17:18:40 -0400 | [diff] [blame] | 1928 | }, |
| 1929 | [CAYMAN_RING_TYPE_CP1_INDEX] = { |
| 1930 | .ib_execute = &cayman_ring_ib_execute, |
| 1931 | .ib_parse = &evergreen_ib_parse, |
| 1932 | .emit_fence = &cayman_fence_ring_emit, |
| 1933 | .emit_semaphore = &r600_semaphore_ring_emit, |
| 1934 | .cs_parse = &evergreen_cs_parse, |
| 1935 | .ring_test = &r600_ring_test, |
| 1936 | .ib_test = &r600_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 1937 | .is_lockup = &cayman_gfx_is_lockup, |
Christian König | 9b40e5d | 2012-08-08 12:22:43 +0200 | [diff] [blame] | 1938 | .vm_flush = &cayman_vm_flush, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1939 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1940 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1941 | .set_wptr = &radeon_ring_generic_set_wptr, |
Alex Deucher | be63fe8 | 2012-03-20 17:18:40 -0400 | [diff] [blame] | 1942 | }, |
| 1943 | [CAYMAN_RING_TYPE_CP2_INDEX] = { |
| 1944 | .ib_execute = &cayman_ring_ib_execute, |
| 1945 | .ib_parse = &evergreen_ib_parse, |
| 1946 | .emit_fence = &cayman_fence_ring_emit, |
| 1947 | .emit_semaphore = &r600_semaphore_ring_emit, |
| 1948 | .cs_parse = &evergreen_cs_parse, |
| 1949 | .ring_test = &r600_ring_test, |
| 1950 | .ib_test = &r600_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 1951 | .is_lockup = &cayman_gfx_is_lockup, |
Christian König | 9b40e5d | 2012-08-08 12:22:43 +0200 | [diff] [blame] | 1952 | .vm_flush = &cayman_vm_flush, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1953 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1954 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1955 | .set_wptr = &radeon_ring_generic_set_wptr, |
Alex Deucher | f60cbd1 | 2012-12-04 15:27:33 -0500 | [diff] [blame] | 1956 | }, |
| 1957 | [R600_RING_TYPE_DMA_INDEX] = { |
| 1958 | .ib_execute = &cayman_dma_ring_ib_execute, |
Alex Deucher | cd459e5 | 2012-12-13 12:17:38 -0500 | [diff] [blame] | 1959 | .ib_parse = &evergreen_dma_ib_parse, |
Alex Deucher | f60cbd1 | 2012-12-04 15:27:33 -0500 | [diff] [blame] | 1960 | .emit_fence = &evergreen_dma_fence_ring_emit, |
| 1961 | .emit_semaphore = &r600_dma_semaphore_ring_emit, |
Alex Deucher | d2ead3e | 2012-12-13 09:55:45 -0500 | [diff] [blame] | 1962 | .cs_parse = &evergreen_dma_cs_parse, |
Alex Deucher | f60cbd1 | 2012-12-04 15:27:33 -0500 | [diff] [blame] | 1963 | .ring_test = &r600_dma_ring_test, |
| 1964 | .ib_test = &r600_dma_ib_test, |
| 1965 | .is_lockup = &cayman_dma_is_lockup, |
| 1966 | .vm_flush = &cayman_dma_vm_flush, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1967 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1968 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1969 | .set_wptr = &radeon_ring_generic_set_wptr, |
Alex Deucher | f60cbd1 | 2012-12-04 15:27:33 -0500 | [diff] [blame] | 1970 | }, |
| 1971 | [CAYMAN_RING_TYPE_DMA1_INDEX] = { |
| 1972 | .ib_execute = &cayman_dma_ring_ib_execute, |
Alex Deucher | cd459e5 | 2012-12-13 12:17:38 -0500 | [diff] [blame] | 1973 | .ib_parse = &evergreen_dma_ib_parse, |
Alex Deucher | f60cbd1 | 2012-12-04 15:27:33 -0500 | [diff] [blame] | 1974 | .emit_fence = &evergreen_dma_fence_ring_emit, |
| 1975 | .emit_semaphore = &r600_dma_semaphore_ring_emit, |
Alex Deucher | d2ead3e | 2012-12-13 09:55:45 -0500 | [diff] [blame] | 1976 | .cs_parse = &evergreen_dma_cs_parse, |
Alex Deucher | f60cbd1 | 2012-12-04 15:27:33 -0500 | [diff] [blame] | 1977 | .ring_test = &r600_dma_ring_test, |
| 1978 | .ib_test = &r600_dma_ib_test, |
| 1979 | .is_lockup = &cayman_dma_is_lockup, |
| 1980 | .vm_flush = &cayman_dma_vm_flush, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1981 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1982 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1983 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | f2ba57b | 2013-04-08 12:41:29 +0200 | [diff] [blame] | 1984 | }, |
| 1985 | [R600_RING_TYPE_UVD_INDEX] = { |
| 1986 | .ib_execute = &r600_uvd_ib_execute, |
| 1987 | .emit_fence = &r600_uvd_fence_emit, |
| 1988 | .emit_semaphore = &cayman_uvd_semaphore_emit, |
| 1989 | .cs_parse = &radeon_uvd_cs_parse, |
| 1990 | .ring_test = &r600_uvd_ring_test, |
| 1991 | .ib_test = &r600_uvd_ib_test, |
| 1992 | .is_lockup = &radeon_ring_test_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 1993 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 1994 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 1995 | .set_wptr = &radeon_ring_generic_set_wptr, |
Alex Deucher | be63fe8 | 2012-03-20 17:18:40 -0400 | [diff] [blame] | 1996 | } |
| 1997 | }, |
| 1998 | .irq = { |
| 1999 | .set = &evergreen_irq_set, |
| 2000 | .process = &evergreen_irq_process, |
| 2001 | }, |
| 2002 | .display = { |
| 2003 | .bandwidth_update = &dce6_bandwidth_update, |
| 2004 | .get_vblank_counter = &evergreen_get_vblank_counter, |
| 2005 | .wait_for_vblank = &dce4_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 2006 | .set_backlight_level = &atombios_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 2007 | .get_backlight_level = &atombios_get_backlight_level, |
Alex Deucher | be63fe8 | 2012-03-20 17:18:40 -0400 | [diff] [blame] | 2008 | }, |
| 2009 | .copy = { |
| 2010 | .blit = &r600_copy_blit, |
| 2011 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
Alex Deucher | f60cbd1 | 2012-12-04 15:27:33 -0500 | [diff] [blame] | 2012 | .dma = &evergreen_copy_dma, |
| 2013 | .dma_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | 2d6cc72 | 2012-07-20 13:49:49 -0400 | [diff] [blame] | 2014 | .copy = &evergreen_copy_dma, |
| 2015 | .copy_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | be63fe8 | 2012-03-20 17:18:40 -0400 | [diff] [blame] | 2016 | }, |
| 2017 | .surface = { |
| 2018 | .set_reg = r600_set_surface_reg, |
| 2019 | .clear_reg = r600_clear_surface_reg, |
| 2020 | }, |
| 2021 | .hpd = { |
| 2022 | .init = &evergreen_hpd_init, |
| 2023 | .fini = &evergreen_hpd_fini, |
| 2024 | .sense = &evergreen_hpd_sense, |
| 2025 | .set_polarity = &evergreen_hpd_set_polarity, |
| 2026 | }, |
| 2027 | .pm = { |
| 2028 | .misc = &evergreen_pm_misc, |
| 2029 | .prepare = &evergreen_pm_prepare, |
| 2030 | .finish = &evergreen_pm_finish, |
| 2031 | .init_profile = &sumo_pm_init_profile, |
| 2032 | .get_dynpm_state = &r600_pm_get_dynpm_state, |
| 2033 | .get_engine_clock = &radeon_atom_get_engine_clock, |
| 2034 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 2035 | .get_memory_clock = NULL, |
| 2036 | .set_memory_clock = NULL, |
| 2037 | .get_pcie_lanes = NULL, |
| 2038 | .set_pcie_lanes = NULL, |
| 2039 | .set_clock_gating = NULL, |
Alex Deucher | 23d33ba | 2013-04-08 12:41:32 +0200 | [diff] [blame] | 2040 | .set_uvd_clocks = &sumo_set_uvd_clocks, |
Alex Deucher | 29a1522 | 2012-12-14 11:57:36 -0500 | [diff] [blame] | 2041 | .get_temperature = &tn_get_temp, |
Alex Deucher | be63fe8 | 2012-03-20 17:18:40 -0400 | [diff] [blame] | 2042 | }, |
| 2043 | .pflip = { |
| 2044 | .pre_page_flip = &evergreen_pre_page_flip, |
| 2045 | .page_flip = &evergreen_page_flip, |
| 2046 | .post_page_flip = &evergreen_post_page_flip, |
| 2047 | }, |
| 2048 | }; |
| 2049 | |
Alex Deucher | 02779c0 | 2012-03-20 17:18:25 -0400 | [diff] [blame] | 2050 | static struct radeon_asic si_asic = { |
| 2051 | .init = &si_init, |
| 2052 | .fini = &si_fini, |
| 2053 | .suspend = &si_suspend, |
| 2054 | .resume = &si_resume, |
Alex Deucher | 02779c0 | 2012-03-20 17:18:25 -0400 | [diff] [blame] | 2055 | .asic_reset = &si_asic_reset, |
| 2056 | .vga_set_state = &r600_vga_set_state, |
| 2057 | .ioctl_wait_idle = r600_ioctl_wait_idle, |
| 2058 | .gui_idle = &r600_gui_idle, |
| 2059 | .mc_wait_for_idle = &evergreen_mc_wait_for_idle, |
Alex Deucher | 454d2e2 | 2013-02-14 10:04:02 -0500 | [diff] [blame] | 2060 | .get_xclk = &si_get_xclk, |
Alex Deucher | d041889 | 2013-01-24 10:35:23 -0500 | [diff] [blame] | 2061 | .get_gpu_clock_counter = &si_get_gpu_clock_counter, |
Alex Deucher | 02779c0 | 2012-03-20 17:18:25 -0400 | [diff] [blame] | 2062 | .gart = { |
| 2063 | .tlb_flush = &si_pcie_gart_tlb_flush, |
| 2064 | .set_page = &rs600_gart_set_page, |
| 2065 | }, |
Christian König | 05b0714 | 2012-08-06 20:21:10 +0200 | [diff] [blame] | 2066 | .vm = { |
| 2067 | .init = &si_vm_init, |
| 2068 | .fini = &si_vm_fini, |
Alex Deucher | df16004 | 2013-01-31 16:26:02 -0500 | [diff] [blame] | 2069 | .pt_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | 82ffd92 | 2012-10-02 14:47:46 -0400 | [diff] [blame] | 2070 | .set_page = &si_vm_set_page, |
Christian König | 05b0714 | 2012-08-06 20:21:10 +0200 | [diff] [blame] | 2071 | }, |
Alex Deucher | 02779c0 | 2012-03-20 17:18:25 -0400 | [diff] [blame] | 2072 | .ring = { |
| 2073 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 2074 | .ib_execute = &si_ring_ib_execute, |
| 2075 | .ib_parse = &si_ib_parse, |
| 2076 | .emit_fence = &si_fence_ring_emit, |
| 2077 | .emit_semaphore = &r600_semaphore_ring_emit, |
| 2078 | .cs_parse = NULL, |
| 2079 | .ring_test = &r600_ring_test, |
| 2080 | .ib_test = &r600_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 2081 | .is_lockup = &si_gfx_is_lockup, |
Christian König | ee60e29 | 2012-08-09 16:21:08 +0200 | [diff] [blame] | 2082 | .vm_flush = &si_vm_flush, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 2083 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 2084 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 2085 | .set_wptr = &radeon_ring_generic_set_wptr, |
Alex Deucher | 02779c0 | 2012-03-20 17:18:25 -0400 | [diff] [blame] | 2086 | }, |
| 2087 | [CAYMAN_RING_TYPE_CP1_INDEX] = { |
| 2088 | .ib_execute = &si_ring_ib_execute, |
| 2089 | .ib_parse = &si_ib_parse, |
| 2090 | .emit_fence = &si_fence_ring_emit, |
| 2091 | .emit_semaphore = &r600_semaphore_ring_emit, |
| 2092 | .cs_parse = NULL, |
| 2093 | .ring_test = &r600_ring_test, |
| 2094 | .ib_test = &r600_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 2095 | .is_lockup = &si_gfx_is_lockup, |
Christian König | ee60e29 | 2012-08-09 16:21:08 +0200 | [diff] [blame] | 2096 | .vm_flush = &si_vm_flush, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 2097 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 2098 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 2099 | .set_wptr = &radeon_ring_generic_set_wptr, |
Alex Deucher | 02779c0 | 2012-03-20 17:18:25 -0400 | [diff] [blame] | 2100 | }, |
| 2101 | [CAYMAN_RING_TYPE_CP2_INDEX] = { |
| 2102 | .ib_execute = &si_ring_ib_execute, |
| 2103 | .ib_parse = &si_ib_parse, |
| 2104 | .emit_fence = &si_fence_ring_emit, |
| 2105 | .emit_semaphore = &r600_semaphore_ring_emit, |
| 2106 | .cs_parse = NULL, |
| 2107 | .ring_test = &r600_ring_test, |
| 2108 | .ib_test = &r600_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 2109 | .is_lockup = &si_gfx_is_lockup, |
Christian König | ee60e29 | 2012-08-09 16:21:08 +0200 | [diff] [blame] | 2110 | .vm_flush = &si_vm_flush, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 2111 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 2112 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 2113 | .set_wptr = &radeon_ring_generic_set_wptr, |
Alex Deucher | 8c5fd7e | 2012-12-04 15:28:18 -0500 | [diff] [blame] | 2114 | }, |
| 2115 | [R600_RING_TYPE_DMA_INDEX] = { |
| 2116 | .ib_execute = &cayman_dma_ring_ib_execute, |
Alex Deucher | cd459e5 | 2012-12-13 12:17:38 -0500 | [diff] [blame] | 2117 | .ib_parse = &evergreen_dma_ib_parse, |
Alex Deucher | 8c5fd7e | 2012-12-04 15:28:18 -0500 | [diff] [blame] | 2118 | .emit_fence = &evergreen_dma_fence_ring_emit, |
| 2119 | .emit_semaphore = &r600_dma_semaphore_ring_emit, |
| 2120 | .cs_parse = NULL, |
| 2121 | .ring_test = &r600_dma_ring_test, |
| 2122 | .ib_test = &r600_dma_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 2123 | .is_lockup = &si_dma_is_lockup, |
Alex Deucher | 8c5fd7e | 2012-12-04 15:28:18 -0500 | [diff] [blame] | 2124 | .vm_flush = &si_dma_vm_flush, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 2125 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 2126 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 2127 | .set_wptr = &radeon_ring_generic_set_wptr, |
Alex Deucher | 8c5fd7e | 2012-12-04 15:28:18 -0500 | [diff] [blame] | 2128 | }, |
| 2129 | [CAYMAN_RING_TYPE_DMA1_INDEX] = { |
| 2130 | .ib_execute = &cayman_dma_ring_ib_execute, |
Alex Deucher | cd459e5 | 2012-12-13 12:17:38 -0500 | [diff] [blame] | 2131 | .ib_parse = &evergreen_dma_ib_parse, |
Alex Deucher | 8c5fd7e | 2012-12-04 15:28:18 -0500 | [diff] [blame] | 2132 | .emit_fence = &evergreen_dma_fence_ring_emit, |
| 2133 | .emit_semaphore = &r600_dma_semaphore_ring_emit, |
| 2134 | .cs_parse = NULL, |
| 2135 | .ring_test = &r600_dma_ring_test, |
| 2136 | .ib_test = &r600_dma_ib_test, |
Alex Deucher | 123bc18 | 2013-01-24 11:37:19 -0500 | [diff] [blame] | 2137 | .is_lockup = &si_dma_is_lockup, |
Alex Deucher | 8c5fd7e | 2012-12-04 15:28:18 -0500 | [diff] [blame] | 2138 | .vm_flush = &si_dma_vm_flush, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 2139 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 2140 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 2141 | .set_wptr = &radeon_ring_generic_set_wptr, |
Christian König | f2ba57b | 2013-04-08 12:41:29 +0200 | [diff] [blame] | 2142 | }, |
| 2143 | [R600_RING_TYPE_UVD_INDEX] = { |
| 2144 | .ib_execute = &r600_uvd_ib_execute, |
| 2145 | .emit_fence = &r600_uvd_fence_emit, |
| 2146 | .emit_semaphore = &cayman_uvd_semaphore_emit, |
| 2147 | .cs_parse = &radeon_uvd_cs_parse, |
| 2148 | .ring_test = &r600_uvd_ring_test, |
| 2149 | .ib_test = &r600_uvd_ib_test, |
| 2150 | .is_lockup = &radeon_ring_test_lockup, |
Alex Deucher | f93bdef | 2013-01-29 14:10:56 -0500 | [diff] [blame] | 2151 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 2152 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 2153 | .set_wptr = &radeon_ring_generic_set_wptr, |
Alex Deucher | 02779c0 | 2012-03-20 17:18:25 -0400 | [diff] [blame] | 2154 | } |
| 2155 | }, |
| 2156 | .irq = { |
| 2157 | .set = &si_irq_set, |
| 2158 | .process = &si_irq_process, |
| 2159 | }, |
| 2160 | .display = { |
| 2161 | .bandwidth_update = &dce6_bandwidth_update, |
| 2162 | .get_vblank_counter = &evergreen_get_vblank_counter, |
| 2163 | .wait_for_vblank = &dce4_wait_for_vblank, |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 2164 | .set_backlight_level = &atombios_set_backlight_level, |
Alex Deucher | 6d92f81 | 2012-09-14 09:59:26 -0400 | [diff] [blame] | 2165 | .get_backlight_level = &atombios_get_backlight_level, |
Alex Deucher | 02779c0 | 2012-03-20 17:18:25 -0400 | [diff] [blame] | 2166 | }, |
| 2167 | .copy = { |
| 2168 | .blit = NULL, |
| 2169 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
Alex Deucher | 8c5fd7e | 2012-12-04 15:28:18 -0500 | [diff] [blame] | 2170 | .dma = &si_copy_dma, |
| 2171 | .dma_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | 2d6cc72 | 2012-07-20 13:49:49 -0400 | [diff] [blame] | 2172 | .copy = &si_copy_dma, |
| 2173 | .copy_ring_index = R600_RING_TYPE_DMA_INDEX, |
Alex Deucher | 02779c0 | 2012-03-20 17:18:25 -0400 | [diff] [blame] | 2174 | }, |
| 2175 | .surface = { |
| 2176 | .set_reg = r600_set_surface_reg, |
| 2177 | .clear_reg = r600_clear_surface_reg, |
| 2178 | }, |
| 2179 | .hpd = { |
| 2180 | .init = &evergreen_hpd_init, |
| 2181 | .fini = &evergreen_hpd_fini, |
| 2182 | .sense = &evergreen_hpd_sense, |
| 2183 | .set_polarity = &evergreen_hpd_set_polarity, |
| 2184 | }, |
| 2185 | .pm = { |
| 2186 | .misc = &evergreen_pm_misc, |
| 2187 | .prepare = &evergreen_pm_prepare, |
| 2188 | .finish = &evergreen_pm_finish, |
| 2189 | .init_profile = &sumo_pm_init_profile, |
| 2190 | .get_dynpm_state = &r600_pm_get_dynpm_state, |
| 2191 | .get_engine_clock = &radeon_atom_get_engine_clock, |
| 2192 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 2193 | .get_memory_clock = &radeon_atom_get_memory_clock, |
| 2194 | .set_memory_clock = &radeon_atom_set_memory_clock, |
Alex Deucher | 55b615a | 2013-03-18 18:57:27 -0400 | [diff] [blame] | 2195 | .get_pcie_lanes = &r600_get_pcie_lanes, |
| 2196 | .set_pcie_lanes = &r600_set_pcie_lanes, |
Alex Deucher | 02779c0 | 2012-03-20 17:18:25 -0400 | [diff] [blame] | 2197 | .set_clock_gating = NULL, |
Christian König | 2539eb0 | 2013-04-08 12:41:34 +0200 | [diff] [blame] | 2198 | .set_uvd_clocks = &si_set_uvd_clocks, |
Alex Deucher | 6bd1c38 | 2013-06-21 14:38:03 -0400 | [diff] [blame] | 2199 | .get_temperature = &si_get_temp, |
Alex Deucher | 02779c0 | 2012-03-20 17:18:25 -0400 | [diff] [blame] | 2200 | }, |
| 2201 | .pflip = { |
| 2202 | .pre_page_flip = &evergreen_pre_page_flip, |
| 2203 | .page_flip = &evergreen_page_flip, |
| 2204 | .post_page_flip = &evergreen_post_page_flip, |
| 2205 | }, |
| 2206 | }; |
| 2207 | |
Alex Deucher | 0672e27 | 2013-04-09 16:22:31 -0400 | [diff] [blame] | 2208 | static struct radeon_asic ci_asic = { |
| 2209 | .init = &cik_init, |
| 2210 | .fini = &cik_fini, |
| 2211 | .suspend = &cik_suspend, |
| 2212 | .resume = &cik_resume, |
| 2213 | .asic_reset = &cik_asic_reset, |
| 2214 | .vga_set_state = &r600_vga_set_state, |
| 2215 | .ioctl_wait_idle = NULL, |
| 2216 | .gui_idle = &r600_gui_idle, |
| 2217 | .mc_wait_for_idle = &evergreen_mc_wait_for_idle, |
| 2218 | .get_xclk = &cik_get_xclk, |
| 2219 | .get_gpu_clock_counter = &cik_get_gpu_clock_counter, |
| 2220 | .gart = { |
| 2221 | .tlb_flush = &cik_pcie_gart_tlb_flush, |
| 2222 | .set_page = &rs600_gart_set_page, |
| 2223 | }, |
| 2224 | .vm = { |
| 2225 | .init = &cik_vm_init, |
| 2226 | .fini = &cik_vm_fini, |
| 2227 | .pt_ring_index = R600_RING_TYPE_DMA_INDEX, |
| 2228 | .set_page = &cik_vm_set_page, |
| 2229 | }, |
| 2230 | .ring = { |
| 2231 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 2232 | .ib_execute = &cik_ring_ib_execute, |
| 2233 | .ib_parse = &cik_ib_parse, |
| 2234 | .emit_fence = &cik_fence_gfx_ring_emit, |
| 2235 | .emit_semaphore = &cik_semaphore_ring_emit, |
| 2236 | .cs_parse = NULL, |
| 2237 | .ring_test = &cik_ring_test, |
| 2238 | .ib_test = &cik_ib_test, |
| 2239 | .is_lockup = &cik_gfx_is_lockup, |
| 2240 | .vm_flush = &cik_vm_flush, |
| 2241 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 2242 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 2243 | .set_wptr = &radeon_ring_generic_set_wptr, |
| 2244 | }, |
| 2245 | [CAYMAN_RING_TYPE_CP1_INDEX] = { |
| 2246 | .ib_execute = &cik_ring_ib_execute, |
| 2247 | .ib_parse = &cik_ib_parse, |
| 2248 | .emit_fence = &cik_fence_compute_ring_emit, |
| 2249 | .emit_semaphore = &cik_semaphore_ring_emit, |
| 2250 | .cs_parse = NULL, |
| 2251 | .ring_test = &cik_ring_test, |
| 2252 | .ib_test = &cik_ib_test, |
| 2253 | .is_lockup = &cik_gfx_is_lockup, |
| 2254 | .vm_flush = &cik_vm_flush, |
| 2255 | .get_rptr = &cik_compute_ring_get_rptr, |
| 2256 | .get_wptr = &cik_compute_ring_get_wptr, |
| 2257 | .set_wptr = &cik_compute_ring_set_wptr, |
| 2258 | }, |
| 2259 | [CAYMAN_RING_TYPE_CP2_INDEX] = { |
| 2260 | .ib_execute = &cik_ring_ib_execute, |
| 2261 | .ib_parse = &cik_ib_parse, |
| 2262 | .emit_fence = &cik_fence_compute_ring_emit, |
| 2263 | .emit_semaphore = &cik_semaphore_ring_emit, |
| 2264 | .cs_parse = NULL, |
| 2265 | .ring_test = &cik_ring_test, |
| 2266 | .ib_test = &cik_ib_test, |
| 2267 | .is_lockup = &cik_gfx_is_lockup, |
| 2268 | .vm_flush = &cik_vm_flush, |
| 2269 | .get_rptr = &cik_compute_ring_get_rptr, |
| 2270 | .get_wptr = &cik_compute_ring_get_wptr, |
| 2271 | .set_wptr = &cik_compute_ring_set_wptr, |
| 2272 | }, |
| 2273 | [R600_RING_TYPE_DMA_INDEX] = { |
| 2274 | .ib_execute = &cik_sdma_ring_ib_execute, |
| 2275 | .ib_parse = &cik_ib_parse, |
| 2276 | .emit_fence = &cik_sdma_fence_ring_emit, |
| 2277 | .emit_semaphore = &cik_sdma_semaphore_ring_emit, |
| 2278 | .cs_parse = NULL, |
| 2279 | .ring_test = &cik_sdma_ring_test, |
| 2280 | .ib_test = &cik_sdma_ib_test, |
| 2281 | .is_lockup = &cik_sdma_is_lockup, |
| 2282 | .vm_flush = &cik_dma_vm_flush, |
| 2283 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 2284 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 2285 | .set_wptr = &radeon_ring_generic_set_wptr, |
| 2286 | }, |
| 2287 | [CAYMAN_RING_TYPE_DMA1_INDEX] = { |
| 2288 | .ib_execute = &cik_sdma_ring_ib_execute, |
| 2289 | .ib_parse = &cik_ib_parse, |
| 2290 | .emit_fence = &cik_sdma_fence_ring_emit, |
| 2291 | .emit_semaphore = &cik_sdma_semaphore_ring_emit, |
| 2292 | .cs_parse = NULL, |
| 2293 | .ring_test = &cik_sdma_ring_test, |
| 2294 | .ib_test = &cik_sdma_ib_test, |
| 2295 | .is_lockup = &cik_sdma_is_lockup, |
| 2296 | .vm_flush = &cik_dma_vm_flush, |
| 2297 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 2298 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 2299 | .set_wptr = &radeon_ring_generic_set_wptr, |
| 2300 | }, |
| 2301 | [R600_RING_TYPE_UVD_INDEX] = { |
| 2302 | .ib_execute = &r600_uvd_ib_execute, |
| 2303 | .emit_fence = &r600_uvd_fence_emit, |
| 2304 | .emit_semaphore = &cayman_uvd_semaphore_emit, |
| 2305 | .cs_parse = &radeon_uvd_cs_parse, |
| 2306 | .ring_test = &r600_uvd_ring_test, |
| 2307 | .ib_test = &r600_uvd_ib_test, |
| 2308 | .is_lockup = &radeon_ring_test_lockup, |
| 2309 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 2310 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 2311 | .set_wptr = &radeon_ring_generic_set_wptr, |
| 2312 | } |
| 2313 | }, |
| 2314 | .irq = { |
| 2315 | .set = &cik_irq_set, |
| 2316 | .process = &cik_irq_process, |
| 2317 | }, |
| 2318 | .display = { |
| 2319 | .bandwidth_update = &dce8_bandwidth_update, |
| 2320 | .get_vblank_counter = &evergreen_get_vblank_counter, |
| 2321 | .wait_for_vblank = &dce4_wait_for_vblank, |
| 2322 | }, |
| 2323 | .copy = { |
| 2324 | .blit = NULL, |
| 2325 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 2326 | .dma = &cik_copy_dma, |
| 2327 | .dma_ring_index = R600_RING_TYPE_DMA_INDEX, |
| 2328 | .copy = &cik_copy_dma, |
| 2329 | .copy_ring_index = R600_RING_TYPE_DMA_INDEX, |
| 2330 | }, |
| 2331 | .surface = { |
| 2332 | .set_reg = r600_set_surface_reg, |
| 2333 | .clear_reg = r600_clear_surface_reg, |
| 2334 | }, |
| 2335 | .hpd = { |
| 2336 | .init = &evergreen_hpd_init, |
| 2337 | .fini = &evergreen_hpd_fini, |
| 2338 | .sense = &evergreen_hpd_sense, |
| 2339 | .set_polarity = &evergreen_hpd_set_polarity, |
| 2340 | }, |
| 2341 | .pm = { |
| 2342 | .misc = &evergreen_pm_misc, |
| 2343 | .prepare = &evergreen_pm_prepare, |
| 2344 | .finish = &evergreen_pm_finish, |
| 2345 | .init_profile = &sumo_pm_init_profile, |
| 2346 | .get_dynpm_state = &r600_pm_get_dynpm_state, |
| 2347 | .get_engine_clock = &radeon_atom_get_engine_clock, |
| 2348 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 2349 | .get_memory_clock = &radeon_atom_get_memory_clock, |
| 2350 | .set_memory_clock = &radeon_atom_set_memory_clock, |
| 2351 | .get_pcie_lanes = NULL, |
| 2352 | .set_pcie_lanes = NULL, |
| 2353 | .set_clock_gating = NULL, |
| 2354 | .set_uvd_clocks = &cik_set_uvd_clocks, |
| 2355 | }, |
| 2356 | .pflip = { |
| 2357 | .pre_page_flip = &evergreen_pre_page_flip, |
| 2358 | .page_flip = &evergreen_page_flip, |
| 2359 | .post_page_flip = &evergreen_post_page_flip, |
| 2360 | }, |
| 2361 | }; |
| 2362 | |
| 2363 | static struct radeon_asic kv_asic = { |
| 2364 | .init = &cik_init, |
| 2365 | .fini = &cik_fini, |
| 2366 | .suspend = &cik_suspend, |
| 2367 | .resume = &cik_resume, |
| 2368 | .asic_reset = &cik_asic_reset, |
| 2369 | .vga_set_state = &r600_vga_set_state, |
| 2370 | .ioctl_wait_idle = NULL, |
| 2371 | .gui_idle = &r600_gui_idle, |
| 2372 | .mc_wait_for_idle = &evergreen_mc_wait_for_idle, |
| 2373 | .get_xclk = &cik_get_xclk, |
| 2374 | .get_gpu_clock_counter = &cik_get_gpu_clock_counter, |
| 2375 | .gart = { |
| 2376 | .tlb_flush = &cik_pcie_gart_tlb_flush, |
| 2377 | .set_page = &rs600_gart_set_page, |
| 2378 | }, |
| 2379 | .vm = { |
| 2380 | .init = &cik_vm_init, |
| 2381 | .fini = &cik_vm_fini, |
| 2382 | .pt_ring_index = R600_RING_TYPE_DMA_INDEX, |
| 2383 | .set_page = &cik_vm_set_page, |
| 2384 | }, |
| 2385 | .ring = { |
| 2386 | [RADEON_RING_TYPE_GFX_INDEX] = { |
| 2387 | .ib_execute = &cik_ring_ib_execute, |
| 2388 | .ib_parse = &cik_ib_parse, |
| 2389 | .emit_fence = &cik_fence_gfx_ring_emit, |
| 2390 | .emit_semaphore = &cik_semaphore_ring_emit, |
| 2391 | .cs_parse = NULL, |
| 2392 | .ring_test = &cik_ring_test, |
| 2393 | .ib_test = &cik_ib_test, |
| 2394 | .is_lockup = &cik_gfx_is_lockup, |
| 2395 | .vm_flush = &cik_vm_flush, |
| 2396 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 2397 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 2398 | .set_wptr = &radeon_ring_generic_set_wptr, |
| 2399 | }, |
| 2400 | [CAYMAN_RING_TYPE_CP1_INDEX] = { |
| 2401 | .ib_execute = &cik_ring_ib_execute, |
| 2402 | .ib_parse = &cik_ib_parse, |
| 2403 | .emit_fence = &cik_fence_compute_ring_emit, |
| 2404 | .emit_semaphore = &cik_semaphore_ring_emit, |
| 2405 | .cs_parse = NULL, |
| 2406 | .ring_test = &cik_ring_test, |
| 2407 | .ib_test = &cik_ib_test, |
| 2408 | .is_lockup = &cik_gfx_is_lockup, |
| 2409 | .vm_flush = &cik_vm_flush, |
| 2410 | .get_rptr = &cik_compute_ring_get_rptr, |
| 2411 | .get_wptr = &cik_compute_ring_get_wptr, |
| 2412 | .set_wptr = &cik_compute_ring_set_wptr, |
| 2413 | }, |
| 2414 | [CAYMAN_RING_TYPE_CP2_INDEX] = { |
| 2415 | .ib_execute = &cik_ring_ib_execute, |
| 2416 | .ib_parse = &cik_ib_parse, |
| 2417 | .emit_fence = &cik_fence_compute_ring_emit, |
| 2418 | .emit_semaphore = &cik_semaphore_ring_emit, |
| 2419 | .cs_parse = NULL, |
| 2420 | .ring_test = &cik_ring_test, |
| 2421 | .ib_test = &cik_ib_test, |
| 2422 | .is_lockup = &cik_gfx_is_lockup, |
| 2423 | .vm_flush = &cik_vm_flush, |
| 2424 | .get_rptr = &cik_compute_ring_get_rptr, |
| 2425 | .get_wptr = &cik_compute_ring_get_wptr, |
| 2426 | .set_wptr = &cik_compute_ring_set_wptr, |
| 2427 | }, |
| 2428 | [R600_RING_TYPE_DMA_INDEX] = { |
| 2429 | .ib_execute = &cik_sdma_ring_ib_execute, |
| 2430 | .ib_parse = &cik_ib_parse, |
| 2431 | .emit_fence = &cik_sdma_fence_ring_emit, |
| 2432 | .emit_semaphore = &cik_sdma_semaphore_ring_emit, |
| 2433 | .cs_parse = NULL, |
| 2434 | .ring_test = &cik_sdma_ring_test, |
| 2435 | .ib_test = &cik_sdma_ib_test, |
| 2436 | .is_lockup = &cik_sdma_is_lockup, |
| 2437 | .vm_flush = &cik_dma_vm_flush, |
| 2438 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 2439 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 2440 | .set_wptr = &radeon_ring_generic_set_wptr, |
| 2441 | }, |
| 2442 | [CAYMAN_RING_TYPE_DMA1_INDEX] = { |
| 2443 | .ib_execute = &cik_sdma_ring_ib_execute, |
| 2444 | .ib_parse = &cik_ib_parse, |
| 2445 | .emit_fence = &cik_sdma_fence_ring_emit, |
| 2446 | .emit_semaphore = &cik_sdma_semaphore_ring_emit, |
| 2447 | .cs_parse = NULL, |
| 2448 | .ring_test = &cik_sdma_ring_test, |
| 2449 | .ib_test = &cik_sdma_ib_test, |
| 2450 | .is_lockup = &cik_sdma_is_lockup, |
| 2451 | .vm_flush = &cik_dma_vm_flush, |
| 2452 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 2453 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 2454 | .set_wptr = &radeon_ring_generic_set_wptr, |
| 2455 | }, |
| 2456 | [R600_RING_TYPE_UVD_INDEX] = { |
| 2457 | .ib_execute = &r600_uvd_ib_execute, |
| 2458 | .emit_fence = &r600_uvd_fence_emit, |
| 2459 | .emit_semaphore = &cayman_uvd_semaphore_emit, |
| 2460 | .cs_parse = &radeon_uvd_cs_parse, |
| 2461 | .ring_test = &r600_uvd_ring_test, |
| 2462 | .ib_test = &r600_uvd_ib_test, |
| 2463 | .is_lockup = &radeon_ring_test_lockup, |
| 2464 | .get_rptr = &radeon_ring_generic_get_rptr, |
| 2465 | .get_wptr = &radeon_ring_generic_get_wptr, |
| 2466 | .set_wptr = &radeon_ring_generic_set_wptr, |
| 2467 | } |
| 2468 | }, |
| 2469 | .irq = { |
| 2470 | .set = &cik_irq_set, |
| 2471 | .process = &cik_irq_process, |
| 2472 | }, |
| 2473 | .display = { |
| 2474 | .bandwidth_update = &dce8_bandwidth_update, |
| 2475 | .get_vblank_counter = &evergreen_get_vblank_counter, |
| 2476 | .wait_for_vblank = &dce4_wait_for_vblank, |
| 2477 | }, |
| 2478 | .copy = { |
| 2479 | .blit = NULL, |
| 2480 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 2481 | .dma = &cik_copy_dma, |
| 2482 | .dma_ring_index = R600_RING_TYPE_DMA_INDEX, |
| 2483 | .copy = &cik_copy_dma, |
| 2484 | .copy_ring_index = R600_RING_TYPE_DMA_INDEX, |
| 2485 | }, |
| 2486 | .surface = { |
| 2487 | .set_reg = r600_set_surface_reg, |
| 2488 | .clear_reg = r600_clear_surface_reg, |
| 2489 | }, |
| 2490 | .hpd = { |
| 2491 | .init = &evergreen_hpd_init, |
| 2492 | .fini = &evergreen_hpd_fini, |
| 2493 | .sense = &evergreen_hpd_sense, |
| 2494 | .set_polarity = &evergreen_hpd_set_polarity, |
| 2495 | }, |
| 2496 | .pm = { |
| 2497 | .misc = &evergreen_pm_misc, |
| 2498 | .prepare = &evergreen_pm_prepare, |
| 2499 | .finish = &evergreen_pm_finish, |
| 2500 | .init_profile = &sumo_pm_init_profile, |
| 2501 | .get_dynpm_state = &r600_pm_get_dynpm_state, |
| 2502 | .get_engine_clock = &radeon_atom_get_engine_clock, |
| 2503 | .set_engine_clock = &radeon_atom_set_engine_clock, |
| 2504 | .get_memory_clock = &radeon_atom_get_memory_clock, |
| 2505 | .set_memory_clock = &radeon_atom_set_memory_clock, |
| 2506 | .get_pcie_lanes = NULL, |
| 2507 | .set_pcie_lanes = NULL, |
| 2508 | .set_clock_gating = NULL, |
| 2509 | .set_uvd_clocks = &cik_set_uvd_clocks, |
| 2510 | }, |
| 2511 | .pflip = { |
| 2512 | .pre_page_flip = &evergreen_pre_page_flip, |
| 2513 | .page_flip = &evergreen_page_flip, |
| 2514 | .post_page_flip = &evergreen_post_page_flip, |
| 2515 | }, |
| 2516 | }; |
| 2517 | |
Alex Deucher | abf1dc6 | 2012-07-17 14:02:36 -0400 | [diff] [blame] | 2518 | /** |
| 2519 | * radeon_asic_init - register asic specific callbacks |
| 2520 | * |
| 2521 | * @rdev: radeon device pointer |
| 2522 | * |
| 2523 | * Registers the appropriate asic specific callbacks for each |
| 2524 | * chip family. Also sets other asics specific info like the number |
| 2525 | * of crtcs and the register aperture accessors (all asics). |
| 2526 | * Returns 0 for success. |
| 2527 | */ |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 2528 | int radeon_asic_init(struct radeon_device *rdev) |
| 2529 | { |
| 2530 | radeon_register_accessor_init(rdev); |
Alex Deucher | ba7e05e | 2011-06-16 18:14:22 +0000 | [diff] [blame] | 2531 | |
| 2532 | /* set the number of crtcs */ |
| 2533 | if (rdev->flags & RADEON_SINGLE_CRTC) |
| 2534 | rdev->num_crtc = 1; |
| 2535 | else |
| 2536 | rdev->num_crtc = 2; |
| 2537 | |
Alex Deucher | 948bee3 | 2013-05-14 12:08:35 -0400 | [diff] [blame] | 2538 | rdev->has_uvd = false; |
| 2539 | |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 2540 | switch (rdev->family) { |
| 2541 | case CHIP_R100: |
| 2542 | case CHIP_RV100: |
| 2543 | case CHIP_RS100: |
| 2544 | case CHIP_RV200: |
| 2545 | case CHIP_RS200: |
| 2546 | rdev->asic = &r100_asic; |
| 2547 | break; |
| 2548 | case CHIP_R200: |
| 2549 | case CHIP_RV250: |
| 2550 | case CHIP_RS300: |
| 2551 | case CHIP_RV280: |
| 2552 | rdev->asic = &r200_asic; |
| 2553 | break; |
| 2554 | case CHIP_R300: |
| 2555 | case CHIP_R350: |
| 2556 | case CHIP_RV350: |
| 2557 | case CHIP_RV380: |
| 2558 | if (rdev->flags & RADEON_IS_PCIE) |
| 2559 | rdev->asic = &r300_asic_pcie; |
| 2560 | else |
| 2561 | rdev->asic = &r300_asic; |
| 2562 | break; |
| 2563 | case CHIP_R420: |
| 2564 | case CHIP_R423: |
| 2565 | case CHIP_RV410: |
| 2566 | rdev->asic = &r420_asic; |
Alex Deucher | 07bb084 | 2010-06-22 21:58:26 -0400 | [diff] [blame] | 2567 | /* handle macs */ |
| 2568 | if (rdev->bios == NULL) { |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 2569 | rdev->asic->pm.get_engine_clock = &radeon_legacy_get_engine_clock; |
| 2570 | rdev->asic->pm.set_engine_clock = &radeon_legacy_set_engine_clock; |
| 2571 | rdev->asic->pm.get_memory_clock = &radeon_legacy_get_memory_clock; |
| 2572 | rdev->asic->pm.set_memory_clock = NULL; |
Alex Deucher | 37e9b6a | 2012-08-03 11:39:43 -0400 | [diff] [blame] | 2573 | rdev->asic->display.set_backlight_level = &radeon_legacy_set_backlight_level; |
Alex Deucher | 07bb084 | 2010-06-22 21:58:26 -0400 | [diff] [blame] | 2574 | } |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 2575 | break; |
| 2576 | case CHIP_RS400: |
| 2577 | case CHIP_RS480: |
| 2578 | rdev->asic = &rs400_asic; |
| 2579 | break; |
| 2580 | case CHIP_RS600: |
| 2581 | rdev->asic = &rs600_asic; |
| 2582 | break; |
| 2583 | case CHIP_RS690: |
| 2584 | case CHIP_RS740: |
| 2585 | rdev->asic = &rs690_asic; |
| 2586 | break; |
| 2587 | case CHIP_RV515: |
| 2588 | rdev->asic = &rv515_asic; |
| 2589 | break; |
| 2590 | case CHIP_R520: |
| 2591 | case CHIP_RV530: |
| 2592 | case CHIP_RV560: |
| 2593 | case CHIP_RV570: |
| 2594 | case CHIP_R580: |
| 2595 | rdev->asic = &r520_asic; |
| 2596 | break; |
| 2597 | case CHIP_R600: |
Alex Deucher | ca361b6 | 2013-06-21 14:42:08 -0400 | [diff] [blame] | 2598 | rdev->asic = &r600_asic; |
| 2599 | break; |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 2600 | case CHIP_RV610: |
| 2601 | case CHIP_RV630: |
| 2602 | case CHIP_RV620: |
| 2603 | case CHIP_RV635: |
| 2604 | case CHIP_RV670: |
Alex Deucher | ca361b6 | 2013-06-21 14:42:08 -0400 | [diff] [blame] | 2605 | rdev->asic = &rv6xx_asic; |
| 2606 | rdev->has_uvd = true; |
Alex Deucher | f47299c | 2010-03-16 20:54:38 -0400 | [diff] [blame] | 2607 | break; |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 2608 | case CHIP_RS780: |
| 2609 | case CHIP_RS880: |
Alex Deucher | f47299c | 2010-03-16 20:54:38 -0400 | [diff] [blame] | 2610 | rdev->asic = &rs780_asic; |
Alex Deucher | 948bee3 | 2013-05-14 12:08:35 -0400 | [diff] [blame] | 2611 | rdev->has_uvd = true; |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 2612 | break; |
| 2613 | case CHIP_RV770: |
| 2614 | case CHIP_RV730: |
| 2615 | case CHIP_RV710: |
| 2616 | case CHIP_RV740: |
| 2617 | rdev->asic = &rv770_asic; |
Alex Deucher | 948bee3 | 2013-05-14 12:08:35 -0400 | [diff] [blame] | 2618 | rdev->has_uvd = true; |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 2619 | break; |
| 2620 | case CHIP_CEDAR: |
| 2621 | case CHIP_REDWOOD: |
| 2622 | case CHIP_JUNIPER: |
| 2623 | case CHIP_CYPRESS: |
| 2624 | case CHIP_HEMLOCK: |
Alex Deucher | ba7e05e | 2011-06-16 18:14:22 +0000 | [diff] [blame] | 2625 | /* set num crtcs */ |
| 2626 | if (rdev->family == CHIP_CEDAR) |
| 2627 | rdev->num_crtc = 4; |
| 2628 | else |
| 2629 | rdev->num_crtc = 6; |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 2630 | rdev->asic = &evergreen_asic; |
Alex Deucher | 948bee3 | 2013-05-14 12:08:35 -0400 | [diff] [blame] | 2631 | rdev->has_uvd = true; |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 2632 | break; |
Alex Deucher | 958261d | 2010-11-22 17:56:30 -0500 | [diff] [blame] | 2633 | case CHIP_PALM: |
Alex Deucher | 89da5a3 | 2011-05-31 15:42:47 -0400 | [diff] [blame] | 2634 | case CHIP_SUMO: |
| 2635 | case CHIP_SUMO2: |
Alex Deucher | 958261d | 2010-11-22 17:56:30 -0500 | [diff] [blame] | 2636 | rdev->asic = &sumo_asic; |
Alex Deucher | 948bee3 | 2013-05-14 12:08:35 -0400 | [diff] [blame] | 2637 | rdev->has_uvd = true; |
Alex Deucher | 958261d | 2010-11-22 17:56:30 -0500 | [diff] [blame] | 2638 | break; |
Alex Deucher | a43b766 | 2011-01-06 21:19:33 -0500 | [diff] [blame] | 2639 | case CHIP_BARTS: |
| 2640 | case CHIP_TURKS: |
| 2641 | case CHIP_CAICOS: |
Alex Deucher | ba7e05e | 2011-06-16 18:14:22 +0000 | [diff] [blame] | 2642 | /* set num crtcs */ |
| 2643 | if (rdev->family == CHIP_CAICOS) |
| 2644 | rdev->num_crtc = 4; |
| 2645 | else |
| 2646 | rdev->num_crtc = 6; |
Alex Deucher | a43b766 | 2011-01-06 21:19:33 -0500 | [diff] [blame] | 2647 | rdev->asic = &btc_asic; |
Alex Deucher | 948bee3 | 2013-05-14 12:08:35 -0400 | [diff] [blame] | 2648 | rdev->has_uvd = true; |
Alex Deucher | a43b766 | 2011-01-06 21:19:33 -0500 | [diff] [blame] | 2649 | break; |
Alex Deucher | e348762 | 2011-03-02 20:07:36 -0500 | [diff] [blame] | 2650 | case CHIP_CAYMAN: |
| 2651 | rdev->asic = &cayman_asic; |
Alex Deucher | ba7e05e | 2011-06-16 18:14:22 +0000 | [diff] [blame] | 2652 | /* set num crtcs */ |
| 2653 | rdev->num_crtc = 6; |
Alex Deucher | 948bee3 | 2013-05-14 12:08:35 -0400 | [diff] [blame] | 2654 | rdev->has_uvd = true; |
Alex Deucher | e348762 | 2011-03-02 20:07:36 -0500 | [diff] [blame] | 2655 | break; |
Alex Deucher | be63fe8 | 2012-03-20 17:18:40 -0400 | [diff] [blame] | 2656 | case CHIP_ARUBA: |
| 2657 | rdev->asic = &trinity_asic; |
| 2658 | /* set num crtcs */ |
| 2659 | rdev->num_crtc = 4; |
Alex Deucher | 948bee3 | 2013-05-14 12:08:35 -0400 | [diff] [blame] | 2660 | rdev->has_uvd = true; |
Alex Deucher | be63fe8 | 2012-03-20 17:18:40 -0400 | [diff] [blame] | 2661 | break; |
Alex Deucher | 02779c0 | 2012-03-20 17:18:25 -0400 | [diff] [blame] | 2662 | case CHIP_TAHITI: |
| 2663 | case CHIP_PITCAIRN: |
| 2664 | case CHIP_VERDE: |
Alex Deucher | e737a14 | 2012-08-30 14:00:03 -0400 | [diff] [blame] | 2665 | case CHIP_OLAND: |
Alex Deucher | 86a45ca | 2012-07-26 19:04:20 -0400 | [diff] [blame] | 2666 | case CHIP_HAINAN: |
Alex Deucher | 02779c0 | 2012-03-20 17:18:25 -0400 | [diff] [blame] | 2667 | rdev->asic = &si_asic; |
| 2668 | /* set num crtcs */ |
Alex Deucher | 86a45ca | 2012-07-26 19:04:20 -0400 | [diff] [blame] | 2669 | if (rdev->family == CHIP_HAINAN) |
| 2670 | rdev->num_crtc = 0; |
| 2671 | else if (rdev->family == CHIP_OLAND) |
Alex Deucher | e737a14 | 2012-08-30 14:00:03 -0400 | [diff] [blame] | 2672 | rdev->num_crtc = 2; |
| 2673 | else |
| 2674 | rdev->num_crtc = 6; |
Alex Deucher | 948bee3 | 2013-05-14 12:08:35 -0400 | [diff] [blame] | 2675 | if (rdev->family == CHIP_HAINAN) |
| 2676 | rdev->has_uvd = false; |
| 2677 | else |
| 2678 | rdev->has_uvd = true; |
Alex Deucher | 02779c0 | 2012-03-20 17:18:25 -0400 | [diff] [blame] | 2679 | break; |
Alex Deucher | 0672e27 | 2013-04-09 16:22:31 -0400 | [diff] [blame] | 2680 | case CHIP_BONAIRE: |
| 2681 | rdev->asic = &ci_asic; |
| 2682 | rdev->num_crtc = 6; |
| 2683 | break; |
| 2684 | case CHIP_KAVERI: |
| 2685 | case CHIP_KABINI: |
| 2686 | rdev->asic = &kv_asic; |
| 2687 | /* set num crtcs */ |
| 2688 | if (rdev->family == CHIP_KAVERI) |
| 2689 | rdev->num_crtc = 4; |
| 2690 | else |
| 2691 | rdev->num_crtc = 2; |
| 2692 | break; |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 2693 | default: |
| 2694 | /* FIXME: not supported yet */ |
| 2695 | return -EINVAL; |
| 2696 | } |
| 2697 | |
| 2698 | if (rdev->flags & RADEON_IS_IGP) { |
Alex Deucher | 798bcf7 | 2012-02-23 17:53:48 -0500 | [diff] [blame] | 2699 | rdev->asic->pm.get_memory_clock = NULL; |
| 2700 | rdev->asic->pm.set_memory_clock = NULL; |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 2701 | } |
| 2702 | |
Daniel Vetter | 0a10c85 | 2010-03-11 21:19:14 +0000 | [diff] [blame] | 2703 | return 0; |
| 2704 | } |
| 2705 | |