diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-06-12 01:53:10 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-06-12 01:56:28 -0400 |
commit | 2a71ebcd85bcc4d6607f577f23a491f796c30e82 (patch) | |
tree | d310f48c5abfb0bbdd20b607d3cd934fc77535c3 | |
parent | fbe0efb869efde8d847ede3a925230ef88910086 (diff) |
drm/radeon: add rv740 drm support.
This adds drm support for the RV740 family of chips to the r600 support code.
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/radeon/r600_cp.c | 38 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.h | 1 | ||||
-rw-r--r-- | include/drm/drm_pciids.h | 5 |
3 files changed, 41 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c index bc9d09dfa8e7..aa4eee4b7f3a 100644 --- a/drivers/gpu/drm/radeon/r600_cp.c +++ b/drivers/gpu/drm/radeon/r600_cp.c | |||
@@ -489,15 +489,16 @@ static void r700_cp_load_microcode(drm_radeon_private_t *dev_priv) | |||
489 | RADEON_WRITE(R600_CP_ME_RAM_DATA, RV770_cp_microcode[i]); | 489 | RADEON_WRITE(R600_CP_ME_RAM_DATA, RV770_cp_microcode[i]); |
490 | RADEON_WRITE(R600_CP_ME_RAM_WADDR, 0); | 490 | RADEON_WRITE(R600_CP_ME_RAM_WADDR, 0); |
491 | 491 | ||
492 | } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV730)) { | 492 | } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV730) || |
493 | ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV740)) { | ||
493 | RADEON_WRITE(R600_CP_PFP_UCODE_ADDR, 0); | 494 | RADEON_WRITE(R600_CP_PFP_UCODE_ADDR, 0); |
494 | DRM_INFO("Loading RV730 PFP Microcode\n"); | 495 | DRM_INFO("Loading RV730/RV740 PFP Microcode\n"); |
495 | for (i = 0; i < R700_PFP_UCODE_SIZE; i++) | 496 | for (i = 0; i < R700_PFP_UCODE_SIZE; i++) |
496 | RADEON_WRITE(R600_CP_PFP_UCODE_DATA, RV730_pfp_microcode[i]); | 497 | RADEON_WRITE(R600_CP_PFP_UCODE_DATA, RV730_pfp_microcode[i]); |
497 | RADEON_WRITE(R600_CP_PFP_UCODE_ADDR, 0); | 498 | RADEON_WRITE(R600_CP_PFP_UCODE_ADDR, 0); |
498 | 499 | ||
499 | RADEON_WRITE(R600_CP_ME_RAM_WADDR, 0); | 500 | RADEON_WRITE(R600_CP_ME_RAM_WADDR, 0); |
500 | DRM_INFO("Loading RV730 CP Microcode\n"); | 501 | DRM_INFO("Loading RV730/RV740 CP Microcode\n"); |
501 | for (i = 0; i < R700_PM4_UCODE_SIZE; i++) | 502 | for (i = 0; i < R700_PM4_UCODE_SIZE; i++) |
502 | RADEON_WRITE(R600_CP_ME_RAM_DATA, RV730_cp_microcode[i]); | 503 | RADEON_WRITE(R600_CP_ME_RAM_DATA, RV730_cp_microcode[i]); |
503 | RADEON_WRITE(R600_CP_ME_RAM_WADDR, 0); | 504 | RADEON_WRITE(R600_CP_ME_RAM_WADDR, 0); |
@@ -1324,6 +1325,10 @@ static void r700_gfx_init(struct drm_device *dev, | |||
1324 | dev_priv->r700_sc_prim_fifo_size = 0xf9; | 1325 | dev_priv->r700_sc_prim_fifo_size = 0xf9; |
1325 | dev_priv->r700_sc_hiz_tile_fifo_size = 0x30; | 1326 | dev_priv->r700_sc_hiz_tile_fifo_size = 0x30; |
1326 | dev_priv->r700_sc_earlyz_tile_fifo_fize = 0x130; | 1327 | dev_priv->r700_sc_earlyz_tile_fifo_fize = 0x130; |
1328 | if (dev_priv->r600_sx_max_export_pos_size > 16) { | ||
1329 | dev_priv->r600_sx_max_export_pos_size -= 16; | ||
1330 | dev_priv->r600_sx_max_export_smx_size += 16; | ||
1331 | } | ||
1327 | break; | 1332 | break; |
1328 | case CHIP_RV710: | 1333 | case CHIP_RV710: |
1329 | dev_priv->r600_max_pipes = 2; | 1334 | dev_priv->r600_max_pipes = 2; |
@@ -1345,6 +1350,31 @@ static void r700_gfx_init(struct drm_device *dev, | |||
1345 | dev_priv->r700_sc_hiz_tile_fifo_size = 0x30; | 1350 | dev_priv->r700_sc_hiz_tile_fifo_size = 0x30; |
1346 | dev_priv->r700_sc_earlyz_tile_fifo_fize = 0x130; | 1351 | dev_priv->r700_sc_earlyz_tile_fifo_fize = 0x130; |
1347 | break; | 1352 | break; |
1353 | case CHIP_RV740: | ||
1354 | dev_priv->r600_max_pipes = 4; | ||
1355 | dev_priv->r600_max_tile_pipes = 4; | ||
1356 | dev_priv->r600_max_simds = 8; | ||
1357 | dev_priv->r600_max_backends = 4; | ||
1358 | dev_priv->r600_max_gprs = 256; | ||
1359 | dev_priv->r600_max_threads = 248; | ||
1360 | dev_priv->r600_max_stack_entries = 512; | ||
1361 | dev_priv->r600_max_hw_contexts = 8; | ||
1362 | dev_priv->r600_max_gs_threads = 16 * 2; | ||
1363 | dev_priv->r600_sx_max_export_size = 256; | ||
1364 | dev_priv->r600_sx_max_export_pos_size = 32; | ||
1365 | dev_priv->r600_sx_max_export_smx_size = 224; | ||
1366 | dev_priv->r600_sq_num_cf_insts = 2; | ||
1367 | |||
1368 | dev_priv->r700_sx_num_of_sets = 7; | ||
1369 | dev_priv->r700_sc_prim_fifo_size = 0x100; | ||
1370 | dev_priv->r700_sc_hiz_tile_fifo_size = 0x30; | ||
1371 | dev_priv->r700_sc_earlyz_tile_fifo_fize = 0x130; | ||
1372 | |||
1373 | if (dev_priv->r600_sx_max_export_pos_size > 16) { | ||
1374 | dev_priv->r600_sx_max_export_pos_size -= 16; | ||
1375 | dev_priv->r600_sx_max_export_smx_size += 16; | ||
1376 | } | ||
1377 | break; | ||
1348 | default: | 1378 | default: |
1349 | break; | 1379 | break; |
1350 | } | 1380 | } |
@@ -1493,6 +1523,7 @@ static void r700_gfx_init(struct drm_device *dev, | |||
1493 | break; | 1523 | break; |
1494 | case CHIP_RV730: | 1524 | case CHIP_RV730: |
1495 | case CHIP_RV710: | 1525 | case CHIP_RV710: |
1526 | case CHIP_RV740: | ||
1496 | default: | 1527 | default: |
1497 | sq_ms_fifo_sizes |= R600_FETCH_FIFO_HIWATER(0x4); | 1528 | sq_ms_fifo_sizes |= R600_FETCH_FIFO_HIWATER(0x4); |
1498 | break; | 1529 | break; |
@@ -1569,6 +1600,7 @@ static void r700_gfx_init(struct drm_device *dev, | |||
1569 | switch (dev_priv->flags & RADEON_FAMILY_MASK) { | 1600 | switch (dev_priv->flags & RADEON_FAMILY_MASK) { |
1570 | case CHIP_RV770: | 1601 | case CHIP_RV770: |
1571 | case CHIP_RV730: | 1602 | case CHIP_RV730: |
1603 | case CHIP_RV740: | ||
1572 | gs_prim_buffer_depth = 384; | 1604 | gs_prim_buffer_depth = 384; |
1573 | break; | 1605 | break; |
1574 | case CHIP_RV710: | 1606 | case CHIP_RV710: |
diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h index 8071d965f142..e266e5f8dc26 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.h +++ b/drivers/gpu/drm/radeon/radeon_drv.h | |||
@@ -146,6 +146,7 @@ enum radeon_family { | |||
146 | CHIP_RV770, | 146 | CHIP_RV770, |
147 | CHIP_RV730, | 147 | CHIP_RV730, |
148 | CHIP_RV710, | 148 | CHIP_RV710, |
149 | CHIP_RV740, | ||
149 | CHIP_LAST, | 150 | CHIP_LAST, |
150 | }; | 151 | }; |
151 | 152 | ||
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 8b4c80cdd277..c7a1a8dc5ea4 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
@@ -254,6 +254,11 @@ | |||
254 | {0x1002, 0x940A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R600|RADEON_NEW_MEMMAP}, \ | 254 | {0x1002, 0x940A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R600|RADEON_NEW_MEMMAP}, \ |
255 | {0x1002, 0x940B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R600|RADEON_NEW_MEMMAP}, \ | 255 | {0x1002, 0x940B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R600|RADEON_NEW_MEMMAP}, \ |
256 | {0x1002, 0x940F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R600|RADEON_NEW_MEMMAP}, \ | 256 | {0x1002, 0x940F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R600|RADEON_NEW_MEMMAP}, \ |
257 | {0x1002, 0x94A0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \ | ||
258 | {0x1002, 0x94A1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \ | ||
259 | {0x1002, 0x94B1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \ | ||
260 | {0x1002, 0x94B3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \ | ||
261 | {0x1002, 0x94B5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \ | ||
257 | {0x1002, 0x9440, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ | 262 | {0x1002, 0x9440, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ |
258 | {0x1002, 0x9441, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ | 263 | {0x1002, 0x9441, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ |
259 | {0x1002, 0x9442, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ | 264 | {0x1002, 0x9442, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ |