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