drm/radeon: Use write-combined CPU mappings of IBs on >= CIK
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 29 Jul 2014 09:47:21 +0000 (18:47 +0900)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Aug 2014 12:53:41 +0000 (08:53 -0400)
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_ring.c

index 7cfea7e4583fc1f92e6c548a447e4e3486675473..20b0e4faf7aea4dd1d2361a76b45232a7cd0774c 100644 (file)
@@ -201,10 +201,22 @@ int radeon_ib_pool_init(struct radeon_device *rdev)
        if (rdev->ib_pool_ready) {
                return 0;
        }
-       r = radeon_sa_bo_manager_init(rdev, &rdev->ring_tmp_bo,
-                                     RADEON_IB_POOL_SIZE*64*1024,
-                                     RADEON_GPU_PAGE_SIZE,
-                                     RADEON_GEM_DOMAIN_GTT, 0);
+
+       if (rdev->family >= CHIP_BONAIRE) {
+               r = radeon_sa_bo_manager_init(rdev, &rdev->ring_tmp_bo,
+                                             RADEON_IB_POOL_SIZE*64*1024,
+                                             RADEON_GPU_PAGE_SIZE,
+                                             RADEON_GEM_DOMAIN_GTT,
+                                             RADEON_GEM_GTT_WC);
+       } else {
+               /* Before CIK, it's better to stick to cacheable GTT due
+                * to the command stream checking
+                */
+               r = radeon_sa_bo_manager_init(rdev, &rdev->ring_tmp_bo,
+                                             RADEON_IB_POOL_SIZE*64*1024,
+                                             RADEON_GPU_PAGE_SIZE,
+                                             RADEON_GEM_DOMAIN_GTT, 0);
+       }
        if (r) {
                return r;
        }