aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2012-03-20 17:18:40 -0400
committerDave Airlie <airlied@redhat.com>2012-03-21 02:55:58 -0400
commitbe63fe8c8fd5a44dc5efd77aaaf2cab3a1bdefff (patch)
tree1f4ded765c95d2b41c285efa045584194da8d8d8 /drivers/gpu/drm/radeon
parentc420c7454f9c13d2dc706516d13fb9329ccacd05 (diff)
drm/radeon/kms: add radeon_asic struct for trinity
Trinity (TN) is an APU with: - Cayman 3D - DCE6.1 display Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r--drivers/gpu/drm/radeon/radeon_asic.c98
1 files changed, 98 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c
index f24e14592790..be4dc2ff0e40 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.c
+++ b/drivers/gpu/drm/radeon/radeon_asic.c
@@ -1408,6 +1408,98 @@ static struct radeon_asic cayman_asic = {
1408 }, 1408 },
1409}; 1409};
1410 1410
1411static struct radeon_asic trinity_asic = {
1412 .init = &cayman_init,
1413 .fini = &cayman_fini,
1414 .suspend = &cayman_suspend,
1415 .resume = &cayman_resume,
1416 .gpu_is_lockup = &cayman_gpu_is_lockup,
1417 .asic_reset = &cayman_asic_reset,
1418 .vga_set_state = &r600_vga_set_state,
1419 .ioctl_wait_idle = r600_ioctl_wait_idle,
1420 .gui_idle = &r600_gui_idle,
1421 .mc_wait_for_idle = &evergreen_mc_wait_for_idle,
1422 .gart = {
1423 .tlb_flush = &cayman_pcie_gart_tlb_flush,
1424 .set_page = &rs600_gart_set_page,
1425 },
1426 .ring = {
1427 [RADEON_RING_TYPE_GFX_INDEX] = {
1428 .ib_execute = &cayman_ring_ib_execute,
1429 .ib_parse = &evergreen_ib_parse,
1430 .emit_fence = &cayman_fence_ring_emit,
1431 .emit_semaphore = &r600_semaphore_ring_emit,
1432 .cs_parse = &evergreen_cs_parse,
1433 .ring_test = &r600_ring_test,
1434 .ib_test = &r600_ib_test,
1435 },
1436 [CAYMAN_RING_TYPE_CP1_INDEX] = {
1437 .ib_execute = &cayman_ring_ib_execute,
1438 .ib_parse = &evergreen_ib_parse,
1439 .emit_fence = &cayman_fence_ring_emit,
1440 .emit_semaphore = &r600_semaphore_ring_emit,
1441 .cs_parse = &evergreen_cs_parse,
1442 .ring_test = &r600_ring_test,
1443 .ib_test = &r600_ib_test,
1444 },
1445 [CAYMAN_RING_TYPE_CP2_INDEX] = {
1446 .ib_execute = &cayman_ring_ib_execute,
1447 .ib_parse = &evergreen_ib_parse,
1448 .emit_fence = &cayman_fence_ring_emit,
1449 .emit_semaphore = &r600_semaphore_ring_emit,
1450 .cs_parse = &evergreen_cs_parse,
1451 .ring_test = &r600_ring_test,
1452 .ib_test = &r600_ib_test,
1453 }
1454 },
1455 .irq = {
1456 .set = &evergreen_irq_set,
1457 .process = &evergreen_irq_process,
1458 },
1459 .display = {
1460 .bandwidth_update = &dce6_bandwidth_update,
1461 .get_vblank_counter = &evergreen_get_vblank_counter,
1462 .wait_for_vblank = &dce4_wait_for_vblank,
1463 },
1464 .copy = {
1465 .blit = &r600_copy_blit,
1466 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
1467 .dma = NULL,
1468 .dma_ring_index = RADEON_RING_TYPE_GFX_INDEX,
1469 .copy = &r600_copy_blit,
1470 .copy_ring_index = RADEON_RING_TYPE_GFX_INDEX,
1471 },
1472 .surface = {
1473 .set_reg = r600_set_surface_reg,
1474 .clear_reg = r600_clear_surface_reg,
1475 },
1476 .hpd = {
1477 .init = &evergreen_hpd_init,
1478 .fini = &evergreen_hpd_fini,
1479 .sense = &evergreen_hpd_sense,
1480 .set_polarity = &evergreen_hpd_set_polarity,
1481 },
1482 .pm = {
1483 .misc = &evergreen_pm_misc,
1484 .prepare = &evergreen_pm_prepare,
1485 .finish = &evergreen_pm_finish,
1486 .init_profile = &sumo_pm_init_profile,
1487 .get_dynpm_state = &r600_pm_get_dynpm_state,
1488 .get_engine_clock = &radeon_atom_get_engine_clock,
1489 .set_engine_clock = &radeon_atom_set_engine_clock,
1490 .get_memory_clock = NULL,
1491 .set_memory_clock = NULL,
1492 .get_pcie_lanes = NULL,
1493 .set_pcie_lanes = NULL,
1494 .set_clock_gating = NULL,
1495 },
1496 .pflip = {
1497 .pre_page_flip = &evergreen_pre_page_flip,
1498 .page_flip = &evergreen_page_flip,
1499 .post_page_flip = &evergreen_post_page_flip,
1500 },
1501};
1502
1411static const struct radeon_vm_funcs si_vm_funcs = { 1503static const struct radeon_vm_funcs si_vm_funcs = {
1412 .init = &si_vm_init, 1504 .init = &si_vm_init,
1413 .fini = &si_vm_fini, 1505 .fini = &si_vm_fini,
@@ -1627,6 +1719,12 @@ int radeon_asic_init(struct radeon_device *rdev)
1627 rdev->num_crtc = 6; 1719 rdev->num_crtc = 6;
1628 rdev->vm_manager.funcs = &cayman_vm_funcs; 1720 rdev->vm_manager.funcs = &cayman_vm_funcs;
1629 break; 1721 break;
1722 case CHIP_ARUBA:
1723 rdev->asic = &trinity_asic;
1724 /* set num crtcs */
1725 rdev->num_crtc = 4;
1726 rdev->vm_manager.funcs = &cayman_vm_funcs;
1727 break;
1630 case CHIP_TAHITI: 1728 case CHIP_TAHITI:
1631 case CHIP_PITCAIRN: 1729 case CHIP_PITCAIRN:
1632 case CHIP_VERDE: 1730 case CHIP_VERDE: