aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/evergreen_blit_kms.c
diff options
context:
space:
mode:
authorChristian König <deathsimple@vodafone.de>2012-07-05 10:05:28 -0400
committerChristian König <deathsimple@vodafone.de>2012-07-17 04:32:48 -0400
commit6f72a631998d37673828b0e97c63dafc8e923382 (patch)
treec410a062f6b0d175736a87b4d0ddf385f3f8b1fb /drivers/gpu/drm/radeon/evergreen_blit_kms.c
parent2898c348e5caa50b31b9113726dfa45b2dfc3124 (diff)
drm/radeon: remove r600_blit_suspend
Just reinitialize the shader content on resume instead. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/evergreen_blit_kms.c')
-rw-r--r--drivers/gpu/drm/radeon/evergreen_blit_kms.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen_blit_kms.c b/drivers/gpu/drm/radeon/evergreen_blit_kms.c
index e512560ffc6..89cb9feb565 100644
--- a/drivers/gpu/drm/radeon/evergreen_blit_kms.c
+++ b/drivers/gpu/drm/radeon/evergreen_blit_kms.c
@@ -634,10 +634,6 @@ int evergreen_blit_init(struct radeon_device *rdev)
634 634
635 rdev->r600_blit.max_dim = 16384; 635 rdev->r600_blit.max_dim = 16384;
636 636
637 /* pin copy shader into vram if already initialized */
638 if (rdev->r600_blit.shader_obj)
639 goto done;
640
641 rdev->r600_blit.state_offset = 0; 637 rdev->r600_blit.state_offset = 0;
642 638
643 if (rdev->family < CHIP_CAYMAN) 639 if (rdev->family < CHIP_CAYMAN)
@@ -668,11 +664,26 @@ int evergreen_blit_init(struct radeon_device *rdev)
668 obj_size += cayman_ps_size * 4; 664 obj_size += cayman_ps_size * 4;
669 obj_size = ALIGN(obj_size, 256); 665 obj_size = ALIGN(obj_size, 256);
670 666
671 r = radeon_bo_create(rdev, obj_size, PAGE_SIZE, true, RADEON_GEM_DOMAIN_VRAM, 667 /* pin copy shader into vram if not already initialized */
672 NULL, &rdev->r600_blit.shader_obj); 668 if (!rdev->r600_blit.shader_obj) {
673 if (r) { 669 r = radeon_bo_create(rdev, obj_size, PAGE_SIZE, true,
674 DRM_ERROR("evergreen failed to allocate shader\n"); 670 RADEON_GEM_DOMAIN_VRAM,
675 return r; 671 NULL, &rdev->r600_blit.shader_obj);
672 if (r) {
673 DRM_ERROR("evergreen failed to allocate shader\n");
674 return r;
675 }
676
677 r = radeon_bo_reserve(rdev->r600_blit.shader_obj, false);
678 if (unlikely(r != 0))
679 return r;
680 r = radeon_bo_pin(rdev->r600_blit.shader_obj, RADEON_GEM_DOMAIN_VRAM,
681 &rdev->r600_blit.shader_gpu_addr);
682 radeon_bo_unreserve(rdev->r600_blit.shader_obj);
683 if (r) {
684 dev_err(rdev->dev, "(%d) pin blit object failed\n", r);
685 return r;
686 }
676 } 687 }
677 688
678 DRM_DEBUG("evergreen blit allocated bo %08x vs %08x ps %08x\n", 689 DRM_DEBUG("evergreen blit allocated bo %08x vs %08x ps %08x\n",
@@ -714,17 +725,6 @@ int evergreen_blit_init(struct radeon_device *rdev)
714 radeon_bo_kunmap(rdev->r600_blit.shader_obj); 725 radeon_bo_kunmap(rdev->r600_blit.shader_obj);
715 radeon_bo_unreserve(rdev->r600_blit.shader_obj); 726 radeon_bo_unreserve(rdev->r600_blit.shader_obj);
716 727
717done:
718 r = radeon_bo_reserve(rdev->r600_blit.shader_obj, false);
719 if (unlikely(r != 0))
720 return r;
721 r = radeon_bo_pin(rdev->r600_blit.shader_obj, RADEON_GEM_DOMAIN_VRAM,
722 &rdev->r600_blit.shader_gpu_addr);
723 radeon_bo_unreserve(rdev->r600_blit.shader_obj);
724 if (r) {
725 dev_err(rdev->dev, "(%d) pin blit object failed\n", r);
726 return r;
727 }
728 radeon_ttm_set_active_vram_size(rdev, rdev->mc.real_vram_size); 728 radeon_ttm_set_active_vram_size(rdev, rdev->mc.real_vram_size);
729 return 0; 729 return 0;
730} 730}