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