diff options
| -rw-r--r-- | drivers/gpu/drm/radeon/evergreen.c | 49 |
1 files changed, 44 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 07c4c6f216f0..7f859ffe99ce 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
| @@ -1299,6 +1299,7 @@ static u32 evergreen_get_tile_pipe_to_backend_map(struct radeon_device *rdev, | |||
| 1299 | switch (rdev->family) { | 1299 | switch (rdev->family) { |
| 1300 | case CHIP_CEDAR: | 1300 | case CHIP_CEDAR: |
| 1301 | case CHIP_REDWOOD: | 1301 | case CHIP_REDWOOD: |
| 1302 | case CHIP_PALM: | ||
| 1302 | force_no_swizzle = false; | 1303 | force_no_swizzle = false; |
| 1303 | break; | 1304 | break; |
| 1304 | case CHIP_CYPRESS: | 1305 | case CHIP_CYPRESS: |
| @@ -1423,6 +1424,7 @@ static void evergreen_program_channel_remap(struct radeon_device *rdev) | |||
| 1423 | case CHIP_JUNIPER: | 1424 | case CHIP_JUNIPER: |
| 1424 | case CHIP_REDWOOD: | 1425 | case CHIP_REDWOOD: |
| 1425 | case CHIP_CEDAR: | 1426 | case CHIP_CEDAR: |
| 1427 | case CHIP_PALM: | ||
| 1426 | default: | 1428 | default: |
| 1427 | tcp_chan_steer_lo = 0x76543210; | 1429 | tcp_chan_steer_lo = 0x76543210; |
| 1428 | tcp_chan_steer_hi = 0x0000ba98; | 1430 | tcp_chan_steer_hi = 0x0000ba98; |
| @@ -1545,6 +1547,27 @@ static void evergreen_gpu_init(struct radeon_device *rdev) | |||
| 1545 | rdev->config.evergreen.sc_hiz_tile_fifo_size = 0x30; | 1547 | rdev->config.evergreen.sc_hiz_tile_fifo_size = 0x30; |
| 1546 | rdev->config.evergreen.sc_earlyz_tile_fifo_size = 0x130; | 1548 | rdev->config.evergreen.sc_earlyz_tile_fifo_size = 0x130; |
| 1547 | break; | 1549 | break; |
| 1550 | case CHIP_PALM: | ||
| 1551 | rdev->config.evergreen.num_ses = 1; | ||
| 1552 | rdev->config.evergreen.max_pipes = 2; | ||
| 1553 | rdev->config.evergreen.max_tile_pipes = 2; | ||
| 1554 | rdev->config.evergreen.max_simds = 2; | ||
| 1555 | rdev->config.evergreen.max_backends = 1 * rdev->config.evergreen.num_ses; | ||
| 1556 | rdev->config.evergreen.max_gprs = 256; | ||
| 1557 | rdev->config.evergreen.max_threads = 192; | ||
| 1558 | rdev->config.evergreen.max_gs_threads = 16; | ||
| 1559 | rdev->config.evergreen.max_stack_entries = 256; | ||
| 1560 | rdev->config.evergreen.sx_num_of_sets = 4; | ||
| 1561 | rdev->config.evergreen.sx_max_export_size = 128; | ||
| 1562 | rdev->config.evergreen.sx_max_export_pos_size = 32; | ||
| 1563 | rdev->config.evergreen.sx_max_export_smx_size = 96; | ||
| 1564 | rdev->config.evergreen.max_hw_contexts = 4; | ||
| 1565 | rdev->config.evergreen.sq_num_cf_insts = 1; | ||
| 1566 | |||
| 1567 | rdev->config.evergreen.sc_prim_fifo_size = 0x40; | ||
| 1568 | rdev->config.evergreen.sc_hiz_tile_fifo_size = 0x30; | ||
| 1569 | rdev->config.evergreen.sc_earlyz_tile_fifo_size = 0x130; | ||
| 1570 | break; | ||
| 1548 | } | 1571 | } |
| 1549 | 1572 | ||
| 1550 | /* Initialize HDP */ | 1573 | /* Initialize HDP */ |
| @@ -1821,9 +1844,15 @@ static void evergreen_gpu_init(struct radeon_device *rdev) | |||
| 1821 | GS_PRIO(2) | | 1844 | GS_PRIO(2) | |
| 1822 | ES_PRIO(3)); | 1845 | ES_PRIO(3)); |
| 1823 | 1846 | ||
| 1824 | if (rdev->family == CHIP_CEDAR) | 1847 | switch (rdev->family) { |
| 1848 | case CHIP_CEDAR: | ||
| 1849 | case CHIP_PALM: | ||
| 1825 | /* no vertex cache */ | 1850 | /* no vertex cache */ |
| 1826 | sq_config &= ~VC_ENABLE; | 1851 | sq_config &= ~VC_ENABLE; |
| 1852 | break; | ||
| 1853 | default: | ||
| 1854 | break; | ||
| 1855 | } | ||
| 1827 | 1856 | ||
| 1828 | sq_lds_resource_mgmt = RREG32(SQ_LDS_RESOURCE_MGMT); | 1857 | sq_lds_resource_mgmt = RREG32(SQ_LDS_RESOURCE_MGMT); |
| 1829 | 1858 | ||
| @@ -1835,10 +1864,15 @@ static void evergreen_gpu_init(struct radeon_device *rdev) | |||
| 1835 | sq_gpr_resource_mgmt_3 = NUM_HS_GPRS((rdev->config.evergreen.max_gprs - (4 * 2)) * 3 / 32); | 1864 | sq_gpr_resource_mgmt_3 = NUM_HS_GPRS((rdev->config.evergreen.max_gprs - (4 * 2)) * 3 / 32); |
| 1836 | sq_gpr_resource_mgmt_3 |= NUM_LS_GPRS((rdev->config.evergreen.max_gprs - (4 * 2)) * 3 / 32); | 1865 | sq_gpr_resource_mgmt_3 |= NUM_LS_GPRS((rdev->config.evergreen.max_gprs - (4 * 2)) * 3 / 32); |
| 1837 | 1866 | ||
| 1838 | if (rdev->family == CHIP_CEDAR) | 1867 | switch (rdev->family) { |
| 1868 | case CHIP_CEDAR: | ||
| 1869 | case CHIP_PALM: | ||
| 1839 | ps_thread_count = 96; | 1870 | ps_thread_count = 96; |
| 1840 | else | 1871 | break; |
| 1872 | default: | ||
| 1841 | ps_thread_count = 128; | 1873 | ps_thread_count = 128; |
| 1874 | break; | ||
| 1875 | } | ||
| 1842 | 1876 | ||
| 1843 | sq_thread_resource_mgmt = NUM_PS_THREADS(ps_thread_count); | 1877 | sq_thread_resource_mgmt = NUM_PS_THREADS(ps_thread_count); |
| 1844 | sq_thread_resource_mgmt |= NUM_VS_THREADS((((rdev->config.evergreen.max_threads - ps_thread_count) / 6) / 8) * 8); | 1878 | sq_thread_resource_mgmt |= NUM_VS_THREADS((((rdev->config.evergreen.max_threads - ps_thread_count) / 6) / 8) * 8); |
| @@ -1869,10 +1903,15 @@ static void evergreen_gpu_init(struct radeon_device *rdev) | |||
| 1869 | WREG32(PA_SC_FORCE_EOV_MAX_CNTS, (FORCE_EOV_MAX_CLK_CNT(4095) | | 1903 | WREG32(PA_SC_FORCE_EOV_MAX_CNTS, (FORCE_EOV_MAX_CLK_CNT(4095) | |
| 1870 | FORCE_EOV_MAX_REZ_CNT(255))); | 1904 | FORCE_EOV_MAX_REZ_CNT(255))); |
| 1871 | 1905 | ||
| 1872 | if (rdev->family == CHIP_CEDAR) | 1906 | switch (rdev->family) { |
| 1907 | case CHIP_CEDAR: | ||
| 1908 | case CHIP_PALM: | ||
| 1873 | vgt_cache_invalidation = CACHE_INVALIDATION(TC_ONLY); | 1909 | vgt_cache_invalidation = CACHE_INVALIDATION(TC_ONLY); |
| 1874 | else | 1910 | break; |
| 1911 | default: | ||
| 1875 | vgt_cache_invalidation = CACHE_INVALIDATION(VC_AND_TC); | 1912 | vgt_cache_invalidation = CACHE_INVALIDATION(VC_AND_TC); |
| 1913 | break; | ||
| 1914 | } | ||
| 1876 | vgt_cache_invalidation |= AUTO_INVLD_EN(ES_AND_GS_AUTO); | 1915 | vgt_cache_invalidation |= AUTO_INVLD_EN(ES_AND_GS_AUTO); |
| 1877 | WREG32(VGT_CACHE_INVALIDATION, vgt_cache_invalidation); | 1916 | WREG32(VGT_CACHE_INVALIDATION, vgt_cache_invalidation); |
| 1878 | 1917 | ||
