aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_asic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_asic.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_asic.c50
1 files changed, 27 insertions, 23 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c
index 29834a2be3ea..951194c1d0a8 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.c
+++ b/drivers/gpu/drm/radeon/radeon_asic.c
@@ -1358,16 +1358,6 @@ static struct radeon_asic btc_asic = {
1358 }, 1358 },
1359}; 1359};
1360 1360
1361static const struct radeon_vm_funcs cayman_vm_funcs = {
1362 .init = &cayman_vm_init,
1363 .fini = &cayman_vm_fini,
1364 .bind = &cayman_vm_bind,
1365 .unbind = &cayman_vm_unbind,
1366 .tlb_flush = &cayman_vm_tlb_flush,
1367 .page_flags = &cayman_vm_page_flags,
1368 .set_page = &cayman_vm_set_page,
1369};
1370
1371static struct radeon_asic cayman_asic = { 1361static struct radeon_asic cayman_asic = {
1372 .init = &cayman_init, 1362 .init = &cayman_init,
1373 .fini = &cayman_fini, 1363 .fini = &cayman_fini,
@@ -1382,6 +1372,15 @@ static struct radeon_asic cayman_asic = {
1382 .tlb_flush = &cayman_pcie_gart_tlb_flush, 1372 .tlb_flush = &cayman_pcie_gart_tlb_flush,
1383 .set_page = &rs600_gart_set_page, 1373 .set_page = &rs600_gart_set_page,
1384 }, 1374 },
1375 .vm = {
1376 .init = &cayman_vm_init,
1377 .fini = &cayman_vm_fini,
1378 .bind = &cayman_vm_bind,
1379 .unbind = &cayman_vm_unbind,
1380 .tlb_flush = &cayman_vm_tlb_flush,
1381 .page_flags = &cayman_vm_page_flags,
1382 .set_page = &cayman_vm_set_page,
1383 },
1385 .ring = { 1384 .ring = {
1386 [RADEON_RING_TYPE_GFX_INDEX] = { 1385 [RADEON_RING_TYPE_GFX_INDEX] = {
1387 .ib_execute = &cayman_ring_ib_execute, 1386 .ib_execute = &cayman_ring_ib_execute,
@@ -1477,6 +1476,15 @@ static struct radeon_asic trinity_asic = {
1477 .tlb_flush = &cayman_pcie_gart_tlb_flush, 1476 .tlb_flush = &cayman_pcie_gart_tlb_flush,
1478 .set_page = &rs600_gart_set_page, 1477 .set_page = &rs600_gart_set_page,
1479 }, 1478 },
1479 .vm = {
1480 .init = &cayman_vm_init,
1481 .fini = &cayman_vm_fini,
1482 .bind = &cayman_vm_bind,
1483 .unbind = &cayman_vm_unbind,
1484 .tlb_flush = &cayman_vm_tlb_flush,
1485 .page_flags = &cayman_vm_page_flags,
1486 .set_page = &cayman_vm_set_page,
1487 },
1480 .ring = { 1488 .ring = {
1481 [RADEON_RING_TYPE_GFX_INDEX] = { 1489 [RADEON_RING_TYPE_GFX_INDEX] = {
1482 .ib_execute = &cayman_ring_ib_execute, 1490 .ib_execute = &cayman_ring_ib_execute,
@@ -1558,16 +1566,6 @@ static struct radeon_asic trinity_asic = {
1558 }, 1566 },
1559}; 1567};
1560 1568
1561static const struct radeon_vm_funcs si_vm_funcs = {
1562 .init = &si_vm_init,
1563 .fini = &si_vm_fini,
1564 .bind = &si_vm_bind,
1565 .unbind = &si_vm_unbind,
1566 .tlb_flush = &si_vm_tlb_flush,
1567 .page_flags = &cayman_vm_page_flags,
1568 .set_page = &cayman_vm_set_page,
1569};
1570
1571static struct radeon_asic si_asic = { 1569static struct radeon_asic si_asic = {
1572 .init = &si_init, 1570 .init = &si_init,
1573 .fini = &si_fini, 1571 .fini = &si_fini,
@@ -1582,6 +1580,15 @@ static struct radeon_asic si_asic = {
1582 .tlb_flush = &si_pcie_gart_tlb_flush, 1580 .tlb_flush = &si_pcie_gart_tlb_flush,
1583 .set_page = &rs600_gart_set_page, 1581 .set_page = &rs600_gart_set_page,
1584 }, 1582 },
1583 .vm = {
1584 .init = &si_vm_init,
1585 .fini = &si_vm_fini,
1586 .bind = &si_vm_bind,
1587 .unbind = &si_vm_unbind,
1588 .tlb_flush = &si_vm_tlb_flush,
1589 .page_flags = &cayman_vm_page_flags,
1590 .set_page = &cayman_vm_set_page,
1591 },
1585 .ring = { 1592 .ring = {
1586 [RADEON_RING_TYPE_GFX_INDEX] = { 1593 [RADEON_RING_TYPE_GFX_INDEX] = {
1587 .ib_execute = &si_ring_ib_execute, 1594 .ib_execute = &si_ring_ib_execute,
@@ -1789,13 +1796,11 @@ int radeon_asic_init(struct radeon_device *rdev)
1789 rdev->asic = &cayman_asic; 1796 rdev->asic = &cayman_asic;
1790 /* set num crtcs */ 1797 /* set num crtcs */
1791 rdev->num_crtc = 6; 1798 rdev->num_crtc = 6;
1792 rdev->vm_manager.funcs = &cayman_vm_funcs;
1793 break; 1799 break;
1794 case CHIP_ARUBA: 1800 case CHIP_ARUBA:
1795 rdev->asic = &trinity_asic; 1801 rdev->asic = &trinity_asic;
1796 /* set num crtcs */ 1802 /* set num crtcs */
1797 rdev->num_crtc = 4; 1803 rdev->num_crtc = 4;
1798 rdev->vm_manager.funcs = &cayman_vm_funcs;
1799 break; 1804 break;
1800 case CHIP_TAHITI: 1805 case CHIP_TAHITI:
1801 case CHIP_PITCAIRN: 1806 case CHIP_PITCAIRN:
@@ -1803,7 +1808,6 @@ int radeon_asic_init(struct radeon_device *rdev)
1803 rdev->asic = &si_asic; 1808 rdev->asic = &si_asic;
1804 /* set num crtcs */ 1809 /* set num crtcs */
1805 rdev->num_crtc = 6; 1810 rdev->num_crtc = 6;
1806 rdev->vm_manager.funcs = &si_vm_funcs;
1807 break; 1811 break;
1808 default: 1812 default:
1809 /* FIXME: not supported yet */ 1813 /* FIXME: not supported yet */