diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2012-03-20 17:18:36 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-03-21 02:55:57 -0400 |
commit | 7b76e479e0f9d2f106bdf0686eff075837a6429a (patch) | |
tree | 0069bd7e92effd23776f8de9312b067c756e3e35 /drivers/gpu/drm/radeon/ni.c | |
parent | 1d3949c4abaa4bb99578b9011b93e7b94f01a80c (diff) |
drm/radeon/kms: cayman gpu init updates for trinity
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/ni.c')
-rw-r--r-- | drivers/gpu/drm/radeon/ni.c | 52 |
1 files changed, 48 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 160799c14b91..833892f1f48a 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c | |||
@@ -478,6 +478,7 @@ static u32 cayman_get_tile_pipe_to_backend_map(struct radeon_device *rdev, | |||
478 | memset((uint8_t *)&swizzle_pipe[0], 0, sizeof(u32) * CAYMAN_MAX_PIPES); | 478 | memset((uint8_t *)&swizzle_pipe[0], 0, sizeof(u32) * CAYMAN_MAX_PIPES); |
479 | switch (rdev->family) { | 479 | switch (rdev->family) { |
480 | case CHIP_CAYMAN: | 480 | case CHIP_CAYMAN: |
481 | case CHIP_ARUBA: | ||
481 | force_no_swizzle = true; | 482 | force_no_swizzle = true; |
482 | break; | 483 | break; |
483 | default: | 484 | default: |
@@ -610,7 +611,6 @@ static void cayman_gpu_init(struct radeon_device *rdev) | |||
610 | 611 | ||
611 | switch (rdev->family) { | 612 | switch (rdev->family) { |
612 | case CHIP_CAYMAN: | 613 | case CHIP_CAYMAN: |
613 | default: | ||
614 | rdev->config.cayman.max_shader_engines = 2; | 614 | rdev->config.cayman.max_shader_engines = 2; |
615 | rdev->config.cayman.max_pipes_per_simd = 4; | 615 | rdev->config.cayman.max_pipes_per_simd = 4; |
616 | rdev->config.cayman.max_tile_pipes = 8; | 616 | rdev->config.cayman.max_tile_pipes = 8; |
@@ -632,6 +632,43 @@ static void cayman_gpu_init(struct radeon_device *rdev) | |||
632 | rdev->config.cayman.sc_hiz_tile_fifo_size = 0x30; | 632 | rdev->config.cayman.sc_hiz_tile_fifo_size = 0x30; |
633 | rdev->config.cayman.sc_earlyz_tile_fifo_size = 0x130; | 633 | rdev->config.cayman.sc_earlyz_tile_fifo_size = 0x130; |
634 | break; | 634 | break; |
635 | case CHIP_ARUBA: | ||
636 | default: | ||
637 | rdev->config.cayman.max_shader_engines = 1; | ||
638 | rdev->config.cayman.max_pipes_per_simd = 4; | ||
639 | rdev->config.cayman.max_tile_pipes = 2; | ||
640 | if ((rdev->pdev->device == 0x9900) || | ||
641 | (rdev->pdev->device == 0x9901)) { | ||
642 | rdev->config.cayman.max_simds_per_se = 6; | ||
643 | rdev->config.cayman.max_backends_per_se = 2; | ||
644 | } else if ((rdev->pdev->device == 0x9903) || | ||
645 | (rdev->pdev->device == 0x9904)) { | ||
646 | rdev->config.cayman.max_simds_per_se = 4; | ||
647 | rdev->config.cayman.max_backends_per_se = 2; | ||
648 | } else if ((rdev->pdev->device == 0x9990) || | ||
649 | (rdev->pdev->device == 0x9991)) { | ||
650 | rdev->config.cayman.max_simds_per_se = 3; | ||
651 | rdev->config.cayman.max_backends_per_se = 1; | ||
652 | } else { | ||
653 | rdev->config.cayman.max_simds_per_se = 2; | ||
654 | rdev->config.cayman.max_backends_per_se = 1; | ||
655 | } | ||
656 | rdev->config.cayman.max_texture_channel_caches = 2; | ||
657 | rdev->config.cayman.max_gprs = 256; | ||
658 | rdev->config.cayman.max_threads = 256; | ||
659 | rdev->config.cayman.max_gs_threads = 32; | ||
660 | rdev->config.cayman.max_stack_entries = 512; | ||
661 | rdev->config.cayman.sx_num_of_sets = 8; | ||
662 | rdev->config.cayman.sx_max_export_size = 256; | ||
663 | rdev->config.cayman.sx_max_export_pos_size = 64; | ||
664 | rdev->config.cayman.sx_max_export_smx_size = 192; | ||
665 | rdev->config.cayman.max_hw_contexts = 8; | ||
666 | rdev->config.cayman.sq_num_cf_insts = 2; | ||
667 | |||
668 | rdev->config.cayman.sc_prim_fifo_size = 0x40; | ||
669 | rdev->config.cayman.sc_hiz_tile_fifo_size = 0x30; | ||
670 | rdev->config.cayman.sc_earlyz_tile_fifo_size = 0x130; | ||
671 | break; | ||
635 | } | 672 | } |
636 | 673 | ||
637 | /* Initialize HDP */ | 674 | /* Initialize HDP */ |
@@ -652,7 +689,9 @@ static void cayman_gpu_init(struct radeon_device *rdev) | |||
652 | 689 | ||
653 | cc_rb_backend_disable = RREG32(CC_RB_BACKEND_DISABLE); | 690 | cc_rb_backend_disable = RREG32(CC_RB_BACKEND_DISABLE); |
654 | cc_gc_shader_pipe_config = RREG32(CC_GC_SHADER_PIPE_CONFIG); | 691 | cc_gc_shader_pipe_config = RREG32(CC_GC_SHADER_PIPE_CONFIG); |
655 | cgts_tcc_disable = 0xff000000; | 692 | cgts_tcc_disable = 0xffff0000; |
693 | for (i = 0; i < rdev->config.cayman.max_texture_channel_caches; i++) | ||
694 | cgts_tcc_disable &= ~(1 << (16 + i)); | ||
656 | gc_user_rb_backend_disable = RREG32(GC_USER_RB_BACKEND_DISABLE); | 695 | gc_user_rb_backend_disable = RREG32(GC_USER_RB_BACKEND_DISABLE); |
657 | gc_user_shader_pipe_config = RREG32(GC_USER_SHADER_PIPE_CONFIG); | 696 | gc_user_shader_pipe_config = RREG32(GC_USER_SHADER_PIPE_CONFIG); |
658 | cgts_user_tcc_disable = RREG32(CGTS_USER_TCC_DISABLE); | 697 | cgts_user_tcc_disable = RREG32(CGTS_USER_TCC_DISABLE); |
@@ -804,8 +843,13 @@ static void cayman_gpu_init(struct radeon_device *rdev) | |||
804 | rdev->config.cayman.tile_config |= (3 << 0); | 843 | rdev->config.cayman.tile_config |= (3 << 0); |
805 | break; | 844 | break; |
806 | } | 845 | } |
807 | rdev->config.cayman.tile_config |= | 846 | |
808 | ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) << 4; | 847 | /* num banks is 8 on all fusion asics. 0 = 4, 1 = 8, 2 = 16 */ |
848 | if (rdev->flags & RADEON_IS_IGP) | ||
849 | rdev->config.evergreen.tile_config |= 1 << 4; | ||
850 | else | ||
851 | rdev->config.cayman.tile_config |= | ||
852 | ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) << 4; | ||
809 | rdev->config.cayman.tile_config |= | 853 | rdev->config.cayman.tile_config |= |
810 | ((gb_addr_config & PIPE_INTERLEAVE_SIZE_MASK) >> PIPE_INTERLEAVE_SIZE_SHIFT) << 8; | 854 | ((gb_addr_config & PIPE_INTERLEAVE_SIZE_MASK) >> PIPE_INTERLEAVE_SIZE_SHIFT) << 8; |
811 | rdev->config.cayman.tile_config |= | 855 | rdev->config.cayman.tile_config |= |