diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-11 22:13:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-11 22:13:16 -0400 |
commit | fad632092a71bfc098989597b2a17bd8bf16b219 (patch) | |
tree | 4b87cb7c3219e1880fdea2d54aaf9f72bb92db6e | |
parent | b5121290cad7c9e1a786952da4f6d9bfbfb87597 (diff) | |
parent | 03a80665341bbb9a57064c2ddeca13b554d56893 (diff) |
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm/radeon/nouveau: fix build regression on alpha due to Xen changes.
drm/radeon/kms: fix cayman acceleration
drm/radeon: fix cayman struct accessors.
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_sgdma.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/ni.c | 18 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_gart.c | 6 |
3 files changed, 14 insertions, 13 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_sgdma.c b/drivers/gpu/drm/nouveau/nouveau_sgdma.c index 4bce801bc588..c77111eca6ac 100644 --- a/drivers/gpu/drm/nouveau/nouveau_sgdma.c +++ b/drivers/gpu/drm/nouveau/nouveau_sgdma.c | |||
@@ -42,7 +42,8 @@ nouveau_sgdma_populate(struct ttm_backend *be, unsigned long num_pages, | |||
42 | 42 | ||
43 | nvbe->nr_pages = 0; | 43 | nvbe->nr_pages = 0; |
44 | while (num_pages--) { | 44 | while (num_pages--) { |
45 | if (dma_addrs[nvbe->nr_pages] != DMA_ERROR_CODE) { | 45 | /* this code path isn't called and is incorrect anyways */ |
46 | if (0) { /*dma_addrs[nvbe->nr_pages] != DMA_ERROR_CODE)*/ | ||
46 | nvbe->pages[nvbe->nr_pages] = | 47 | nvbe->pages[nvbe->nr_pages] = |
47 | dma_addrs[nvbe->nr_pages]; | 48 | dma_addrs[nvbe->nr_pages]; |
48 | nvbe->ttm_alloced[nvbe->nr_pages] = true; | 49 | nvbe->ttm_alloced[nvbe->nr_pages] = true; |
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 7aade20f63a8..3d8a7634bbe9 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c | |||
@@ -674,7 +674,7 @@ static void cayman_gpu_init(struct radeon_device *rdev) | |||
674 | 674 | ||
675 | cc_rb_backend_disable = RREG32(CC_RB_BACKEND_DISABLE); | 675 | cc_rb_backend_disable = RREG32(CC_RB_BACKEND_DISABLE); |
676 | cc_gc_shader_pipe_config = RREG32(CC_GC_SHADER_PIPE_CONFIG); | 676 | cc_gc_shader_pipe_config = RREG32(CC_GC_SHADER_PIPE_CONFIG); |
677 | cgts_tcc_disable = RREG32(CGTS_TCC_DISABLE); | 677 | cgts_tcc_disable = 0xff000000; |
678 | gc_user_rb_backend_disable = RREG32(GC_USER_RB_BACKEND_DISABLE); | 678 | gc_user_rb_backend_disable = RREG32(GC_USER_RB_BACKEND_DISABLE); |
679 | gc_user_shader_pipe_config = RREG32(GC_USER_SHADER_PIPE_CONFIG); | 679 | gc_user_shader_pipe_config = RREG32(GC_USER_SHADER_PIPE_CONFIG); |
680 | cgts_user_tcc_disable = RREG32(CGTS_USER_TCC_DISABLE); | 680 | cgts_user_tcc_disable = RREG32(CGTS_USER_TCC_DISABLE); |
@@ -871,7 +871,7 @@ static void cayman_gpu_init(struct radeon_device *rdev) | |||
871 | 871 | ||
872 | smx_dc_ctl0 = RREG32(SMX_DC_CTL0); | 872 | smx_dc_ctl0 = RREG32(SMX_DC_CTL0); |
873 | smx_dc_ctl0 &= ~NUMBER_OF_SETS(0x1ff); | 873 | smx_dc_ctl0 &= ~NUMBER_OF_SETS(0x1ff); |
874 | smx_dc_ctl0 |= NUMBER_OF_SETS(rdev->config.evergreen.sx_num_of_sets); | 874 | smx_dc_ctl0 |= NUMBER_OF_SETS(rdev->config.cayman.sx_num_of_sets); |
875 | WREG32(SMX_DC_CTL0, smx_dc_ctl0); | 875 | WREG32(SMX_DC_CTL0, smx_dc_ctl0); |
876 | 876 | ||
877 | WREG32(SPI_CONFIG_CNTL_1, VTX_DONE_DELAY(4) | CRC_SIMD_ID_WADDR_DISABLE); | 877 | WREG32(SPI_CONFIG_CNTL_1, VTX_DONE_DELAY(4) | CRC_SIMD_ID_WADDR_DISABLE); |
@@ -887,20 +887,20 @@ static void cayman_gpu_init(struct radeon_device *rdev) | |||
887 | 887 | ||
888 | WREG32(TA_CNTL_AUX, DISABLE_CUBE_ANISO); | 888 | WREG32(TA_CNTL_AUX, DISABLE_CUBE_ANISO); |
889 | 889 | ||
890 | WREG32(SX_EXPORT_BUFFER_SIZES, (COLOR_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_size / 4) - 1) | | 890 | WREG32(SX_EXPORT_BUFFER_SIZES, (COLOR_BUFFER_SIZE((rdev->config.cayman.sx_max_export_size / 4) - 1) | |
891 | POSITION_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_pos_size / 4) - 1) | | 891 | POSITION_BUFFER_SIZE((rdev->config.cayman.sx_max_export_pos_size / 4) - 1) | |
892 | SMX_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_smx_size / 4) - 1))); | 892 | SMX_BUFFER_SIZE((rdev->config.cayman.sx_max_export_smx_size / 4) - 1))); |
893 | 893 | ||
894 | WREG32(PA_SC_FIFO_SIZE, (SC_PRIM_FIFO_SIZE(rdev->config.evergreen.sc_prim_fifo_size) | | 894 | WREG32(PA_SC_FIFO_SIZE, (SC_PRIM_FIFO_SIZE(rdev->config.cayman.sc_prim_fifo_size) | |
895 | SC_HIZ_TILE_FIFO_SIZE(rdev->config.evergreen.sc_hiz_tile_fifo_size) | | 895 | SC_HIZ_TILE_FIFO_SIZE(rdev->config.cayman.sc_hiz_tile_fifo_size) | |
896 | SC_EARLYZ_TILE_FIFO_SIZE(rdev->config.evergreen.sc_earlyz_tile_fifo_size))); | 896 | SC_EARLYZ_TILE_FIFO_SIZE(rdev->config.cayman.sc_earlyz_tile_fifo_size))); |
897 | 897 | ||
898 | 898 | ||
899 | WREG32(VGT_NUM_INSTANCES, 1); | 899 | WREG32(VGT_NUM_INSTANCES, 1); |
900 | 900 | ||
901 | WREG32(CP_PERFMON_CNTL, 0); | 901 | WREG32(CP_PERFMON_CNTL, 0); |
902 | 902 | ||
903 | WREG32(SQ_MS_FIFO_SIZES, (CACHE_FIFO_SIZE(16 * rdev->config.evergreen.sq_num_cf_insts) | | 903 | WREG32(SQ_MS_FIFO_SIZES, (CACHE_FIFO_SIZE(16 * rdev->config.cayman.sq_num_cf_insts) | |
904 | FETCH_FIFO_HIWATER(0x4) | | 904 | FETCH_FIFO_HIWATER(0x4) | |
905 | DONE_FIFO_HIWATER(0xe0) | | 905 | DONE_FIFO_HIWATER(0xe0) | |
906 | ALU_UPDATE_FIFO_HIWATER(0x8))); | 906 | ALU_UPDATE_FIFO_HIWATER(0x8))); |
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c index 8a955bbdb608..a533f52fd163 100644 --- a/drivers/gpu/drm/radeon/radeon_gart.c +++ b/drivers/gpu/drm/radeon/radeon_gart.c | |||
@@ -181,9 +181,9 @@ int radeon_gart_bind(struct radeon_device *rdev, unsigned offset, | |||
181 | p = t / (PAGE_SIZE / RADEON_GPU_PAGE_SIZE); | 181 | p = t / (PAGE_SIZE / RADEON_GPU_PAGE_SIZE); |
182 | 182 | ||
183 | for (i = 0; i < pages; i++, p++) { | 183 | for (i = 0; i < pages; i++, p++) { |
184 | /* On TTM path, we only use the DMA API if TTM_PAGE_FLAG_DMA32 | 184 | /* we reverted the patch using dma_addr in TTM for now but this |
185 | * is requested. */ | 185 | * code stops building on alpha so just comment it out for now */ |
186 | if (dma_addr[i] != DMA_ERROR_CODE) { | 186 | if (0) { /*dma_addr[i] != DMA_ERROR_CODE) */ |
187 | rdev->gart.ttm_alloced[p] = true; | 187 | rdev->gart.ttm_alloced[p] = true; |
188 | rdev->gart.pages_addr[p] = dma_addr[i]; | 188 | rdev->gart.pages_addr[p] = dma_addr[i]; |
189 | } else { | 189 | } else { |