diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-02-25 16:57:49 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-03-13 00:24:13 -0400 |
commit | c1556f71513f2e660fb2bbdc29344361b1ebff35 (patch) | |
tree | a7720f25bf130eb77475b6735fc522e151dcbf9d /drivers/gpu/drm/radeon/radeon_drv.h | |
parent | 7659e9804b7a66047433182d86393d38ba4eff79 (diff) |
radeon: add support for rs600 GPUs
RS600s are an AMD IGP for Intel CPUs, that look like RS690s from
a lot of perspectives but look like r600s from a memory controller
point of view.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_drv.h')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h index 86614a27bb6e..7091aafff196 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.h +++ b/drivers/gpu/drm/radeon/radeon_drv.h | |||
@@ -126,6 +126,7 @@ enum radeon_family { | |||
126 | CHIP_RV410, | 126 | CHIP_RV410, |
127 | CHIP_RS400, | 127 | CHIP_RS400, |
128 | CHIP_RS480, | 128 | CHIP_RS480, |
129 | CHIP_RS600, | ||
129 | CHIP_RS690, | 130 | CHIP_RS690, |
130 | CHIP_RS740, | 131 | CHIP_RS740, |
131 | CHIP_RV515, | 132 | CHIP_RV515, |
@@ -474,6 +475,8 @@ extern void r600_do_cp_reset(drm_radeon_private_t *dev_priv); | |||
474 | extern void r600_do_cp_stop(drm_radeon_private_t *dev_priv); | 475 | extern void r600_do_cp_stop(drm_radeon_private_t *dev_priv); |
475 | extern int r600_cp_dispatch_indirect(struct drm_device *dev, | 476 | extern int r600_cp_dispatch_indirect(struct drm_device *dev, |
476 | struct drm_buf *buf, int start, int end); | 477 | struct drm_buf *buf, int start, int end); |
478 | extern int r600_page_table_init(struct drm_device *dev); | ||
479 | extern void r600_page_table_cleanup(struct drm_device *dev, struct drm_ati_pcigart_info *gart_info); | ||
477 | 480 | ||
478 | /* Flags for stats.boxes | 481 | /* Flags for stats.boxes |
479 | */ | 482 | */ |
@@ -610,6 +613,56 @@ extern int r600_cp_dispatch_indirect(struct drm_device *dev, | |||
610 | #define RS690_MC_AGP_BASE 0x102 | 613 | #define RS690_MC_AGP_BASE 0x102 |
611 | #define RS690_MC_AGP_BASE_2 0x103 | 614 | #define RS690_MC_AGP_BASE_2 0x103 |
612 | 615 | ||
616 | #define RS600_MC_INDEX 0x70 | ||
617 | # define RS600_MC_ADDR_MASK 0xffff | ||
618 | # define RS600_MC_IND_SEQ_RBS_0 (1 << 16) | ||
619 | # define RS600_MC_IND_SEQ_RBS_1 (1 << 17) | ||
620 | # define RS600_MC_IND_SEQ_RBS_2 (1 << 18) | ||
621 | # define RS600_MC_IND_SEQ_RBS_3 (1 << 19) | ||
622 | # define RS600_MC_IND_AIC_RBS (1 << 20) | ||
623 | # define RS600_MC_IND_CITF_ARB0 (1 << 21) | ||
624 | # define RS600_MC_IND_CITF_ARB1 (1 << 22) | ||
625 | # define RS600_MC_IND_WR_EN (1 << 23) | ||
626 | #define RS600_MC_DATA 0x74 | ||
627 | |||
628 | #define RS600_MC_STATUS 0x0 | ||
629 | # define RS600_MC_IDLE (1 << 1) | ||
630 | #define RS600_MC_FB_LOCATION 0x4 | ||
631 | #define RS600_MC_AGP_LOCATION 0x5 | ||
632 | #define RS600_AGP_BASE 0x6 | ||
633 | #define RS600_AGP_BASE_2 0x7 | ||
634 | #define RS600_MC_CNTL1 0x9 | ||
635 | # define RS600_ENABLE_PAGE_TABLES (1 << 26) | ||
636 | #define RS600_MC_PT0_CNTL 0x100 | ||
637 | # define RS600_ENABLE_PT (1 << 0) | ||
638 | # define RS600_EFFECTIVE_L2_CACHE_SIZE(x) ((x) << 15) | ||
639 | # define RS600_EFFECTIVE_L2_QUEUE_SIZE(x) ((x) << 21) | ||
640 | # define RS600_INVALIDATE_ALL_L1_TLBS (1 << 28) | ||
641 | # define RS600_INVALIDATE_L2_CACHE (1 << 29) | ||
642 | #define RS600_MC_PT0_CONTEXT0_CNTL 0x102 | ||
643 | # define RS600_ENABLE_PAGE_TABLE (1 << 0) | ||
644 | # define RS600_PAGE_TABLE_TYPE_FLAT (0 << 1) | ||
645 | #define RS600_MC_PT0_SYSTEM_APERTURE_LOW_ADDR 0x112 | ||
646 | #define RS600_MC_PT0_SYSTEM_APERTURE_HIGH_ADDR 0x114 | ||
647 | #define RS600_MC_PT0_CONTEXT0_DEFAULT_READ_ADDR 0x11c | ||
648 | #define RS600_MC_PT0_CONTEXT0_FLAT_BASE_ADDR 0x12c | ||
649 | #define RS600_MC_PT0_CONTEXT0_FLAT_START_ADDR 0x13c | ||
650 | #define RS600_MC_PT0_CONTEXT0_FLAT_END_ADDR 0x14c | ||
651 | #define RS600_MC_PT0_CLIENT0_CNTL 0x16c | ||
652 | # define RS600_ENABLE_TRANSLATION_MODE_OVERRIDE (1 << 0) | ||
653 | # define RS600_TRANSLATION_MODE_OVERRIDE (1 << 1) | ||
654 | # define RS600_SYSTEM_ACCESS_MODE_MASK (3 << 8) | ||
655 | # define RS600_SYSTEM_ACCESS_MODE_PA_ONLY (0 << 8) | ||
656 | # define RS600_SYSTEM_ACCESS_MODE_USE_SYS_MAP (1 << 8) | ||
657 | # define RS600_SYSTEM_ACCESS_MODE_IN_SYS (2 << 8) | ||
658 | # define RS600_SYSTEM_ACCESS_MODE_NOT_IN_SYS (3 << 8) | ||
659 | # define RS600_SYSTEM_APERTURE_UNMAPPED_ACCESS_PASSTHROUGH (0 << 10) | ||
660 | # define RS600_SYSTEM_APERTURE_UNMAPPED_ACCESS_DEFAULT_PAGE (1 << 10) | ||
661 | # define RS600_EFFECTIVE_L1_CACHE_SIZE(x) ((x) << 11) | ||
662 | # define RS600_ENABLE_FRAGMENT_PROCESSING (1 << 14) | ||
663 | # define RS600_EFFECTIVE_L1_QUEUE_SIZE(x) ((x) << 15) | ||
664 | # define RS600_INVALIDATE_L1_TLB (1 << 20) | ||
665 | |||
613 | #define R520_MC_IND_INDEX 0x70 | 666 | #define R520_MC_IND_INDEX 0x70 |
614 | #define R520_MC_IND_WR_EN (1 << 24) | 667 | #define R520_MC_IND_WR_EN (1 << 24) |
615 | #define R520_MC_IND_DATA 0x74 | 668 | #define R520_MC_IND_DATA 0x74 |
@@ -1743,11 +1796,19 @@ do { \ | |||
1743 | RADEON_WRITE(RS690_MC_INDEX, RS690_MC_INDEX_WR_ACK); \ | 1796 | RADEON_WRITE(RS690_MC_INDEX, RS690_MC_INDEX_WR_ACK); \ |
1744 | } while (0) | 1797 | } while (0) |
1745 | 1798 | ||
1799 | #define RS600_WRITE_MCIND(addr, val) \ | ||
1800 | do { \ | ||
1801 | RADEON_WRITE(RS600_MC_INDEX, RS600_MC_IND_WR_EN | RS600_MC_IND_CITF_ARB0 | ((addr) & RS600_MC_ADDR_MASK)); \ | ||
1802 | RADEON_WRITE(RS600_MC_DATA, val); \ | ||
1803 | } while (0) | ||
1804 | |||
1746 | #define IGP_WRITE_MCIND(addr, val) \ | 1805 | #define IGP_WRITE_MCIND(addr, val) \ |
1747 | do { \ | 1806 | do { \ |
1748 | if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS690) || \ | 1807 | if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS690) || \ |
1749 | ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS740)) \ | 1808 | ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS740)) \ |
1750 | RS690_WRITE_MCIND(addr, val); \ | 1809 | RS690_WRITE_MCIND(addr, val); \ |
1810 | else if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS600) \ | ||
1811 | RS600_WRITE_MCIND(addr, val); \ | ||
1751 | else \ | 1812 | else \ |
1752 | RS480_WRITE_MCIND(addr, val); \ | 1813 | RS480_WRITE_MCIND(addr, val); \ |
1753 | } while (0) | 1814 | } while (0) |