aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChunming Zhou <David1.Zhou@amd.com>2017-04-21 04:40:00 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-04-28 17:32:54 -0400
commit55ed8caf14fdfecf300d35cfe2e04b670b0191c1 (patch)
treeed86ebbae0a17a0097141d5b4c9b2ec0398b593d
parent5a0f3b5f6d798637b0af5d6d3ab3eb02063e0317 (diff)
drm/amdgpu: increase gtt size to 3GB by default v2
v2: address Alex's comment, add AMDGPU_DEFAULT_GTT_SIZE_MB. Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h1
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c3
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c3
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c3
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c3
5 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index c4f6211640da..a4fc54c70f30 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -110,6 +110,7 @@ extern int amdgpu_pos_buf_per_se;
110extern int amdgpu_cntl_sb_buf_per_se; 110extern int amdgpu_cntl_sb_buf_per_se;
111extern int amdgpu_param_buf_per_se; 111extern int amdgpu_param_buf_per_se;
112 112
113#define AMDGPU_DEFAULT_GTT_SIZE_MB 3072ULL /* 3GB by default */
113#define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS 3000 114#define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS 3000
114#define AMDGPU_MAX_USEC_TIMEOUT 100000 /* 100 ms */ 115#define AMDGPU_MAX_USEC_TIMEOUT 100000 /* 100 ms */
115#define AMDGPU_FENCE_JIFFIES_TIMEOUT (HZ / 2) 116#define AMDGPU_FENCE_JIFFIES_TIMEOUT (HZ / 2)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
index 31c50b2dbbc1..a572979f186c 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
@@ -346,7 +346,8 @@ static int gmc_v6_0_mc_init(struct amdgpu_device *adev)
346 * size equal to the 1024 or vram, whichever is larger. 346 * size equal to the 1024 or vram, whichever is larger.
347 */ 347 */
348 if (amdgpu_gart_size == -1) 348 if (amdgpu_gart_size == -1)
349 adev->mc.gtt_size = max((1024ULL << 20), adev->mc.mc_vram_size); 349 adev->mc.gtt_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
350 adev->mc.mc_vram_size);
350 else 351 else
351 adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20; 352 adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20;
352 353
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
index 2217d4d0f895..a9083a16a250 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
@@ -395,7 +395,8 @@ static int gmc_v7_0_mc_init(struct amdgpu_device *adev)
395 * size equal to the 1024 or vram, whichever is larger. 395 * size equal to the 1024 or vram, whichever is larger.
396 */ 396 */
397 if (amdgpu_gart_size == -1) 397 if (amdgpu_gart_size == -1)
398 adev->mc.gtt_size = max((1024ULL << 20), adev->mc.mc_vram_size); 398 adev->mc.gtt_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
399 adev->mc.mc_vram_size);
399 else 400 else
400 adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20; 401 adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20;
401 402
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
index e4f5df32f31e..4ac99784160a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
@@ -557,7 +557,8 @@ static int gmc_v8_0_mc_init(struct amdgpu_device *adev)
557 * size equal to the 1024 or vram, whichever is larger. 557 * size equal to the 1024 or vram, whichever is larger.
558 */ 558 */
559 if (amdgpu_gart_size == -1) 559 if (amdgpu_gart_size == -1)
560 adev->mc.gtt_size = max((1024ULL << 20), adev->mc.mc_vram_size); 560 adev->mc.gtt_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
561 adev->mc.mc_vram_size);
561 else 562 else
562 adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20; 563 adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20;
563 564
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index edf43769ae70..e5d4dfeae3fe 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -486,7 +486,8 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev)
486 * size equal to the 1024 or vram, whichever is larger. 486 * size equal to the 1024 or vram, whichever is larger.
487 */ 487 */
488 if (amdgpu_gart_size == -1) 488 if (amdgpu_gart_size == -1)
489 adev->mc.gtt_size = max((1024ULL << 20), adev->mc.mc_vram_size); 489 adev->mc.gtt_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
490 adev->mc.mc_vram_size);
490 else 491 else
491 adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20; 492 adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20;
492 493