Skip to contentSkip to conversation

drm/amdgpu: increase gtt size to 3GB by default v2

PATCH In review Chunming Zhou 3 participants 3 messages Apr 21, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: increase gtt size to 3GB by default v2

v2: address Alex's comment, add AMDGPU_DEFAULT_GTT_SIZE_MB.

Change-Id I0417651a8e6fd23b28f9b30a110a196c332e2d03
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h   | 1 +
 drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 3 ++-
 drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 3 ++-
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 3 ++-
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 ++-
 5 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -0
index 8ab080a..501d6ea 100644
@@ -114,6 +114,7 @@
 extern int amdgpu_cntl_sb_buf_per_se;
 extern int amdgpu_param_buf_per_se;
 
+#define AMDGPU_DEFAULT_GTT_SIZE_MB		3072ULL /* 3GB by default */
 #define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS	        3000
 #define AMDGPU_MAX_USEC_TIMEOUT			100000	/* 100 ms */
 #define AMDGPU_FENCE_JIFFIES_TIMEOUT		(HZ / 2)
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +2 -1
index 0ce0d0a..480368b 100644
@@ -346,7 +346,8 @@ static int gmc_v6_0_mc_init(struct amdgpu_device *adev)
 	 * size equal to the 1024 or vram, whichever is larger.
 	 */
 	if (amdgpu_gart_size == -1)
-		adev->mc.gtt_size = max((1024ULL << 20), adev->mc.mc_vram_size);
+		adev->mc.gtt_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
+					adev->mc.mc_vram_size);
 	else
 		adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20;
 
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +2 -1
index f90dba5..715f605 100644
@@ -392,7 +392,8 @@ static int gmc_v7_0_mc_init(struct amdgpu_device *adev)
 	 * size equal to the 1024 or vram, whichever is larger.
 	 */
 	if (amdgpu_gart_size == -1)
-		adev->mc.gtt_size = max((1024ULL << 20), adev->mc.mc_vram_size);
+		adev->mc.gtt_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
+					adev->mc.mc_vram_size);
 	else
 		adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20;
 
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +2 -1
index fe79328..d0e7510 100644
@@ -484,7 +484,8 @@ static int gmc_v8_0_mc_init(struct amdgpu_device *adev)
 	 * size equal to the 1024 or vram, whichever is larger.
 	 */
 	if (amdgpu_gart_size == -1)
-		adev->mc.gtt_size = max((1024ULL << 20), adev->mc.mc_vram_size);
+		adev->mc.gtt_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
+					adev->mc.mc_vram_size);
 	else
 		adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20;
 
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +2 -1
index 2d7a0e2..6ad0b87 100644
@@ -463,7 +463,8 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev)
 	 * size equal to the 1024 or vram, whichever is larger.
 	 */
 	if (amdgpu_gart_size == -1)
-		adev->mc.gtt_size = max((1024ULL << 20), adev->mc.mc_vram_size);
+		adev->mc.gtt_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
+					adev->mc.mc_vram_size);
 	else
 		adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20;
 
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1492764202-21944-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 21.04.2017 um 10:43 schrieb Chunming Zhou:

Quoted 4 lines

v2: address Alex's comment, add AMDGPU_DEFAULT_GTT_SIZE_MB.

Change-Id I0417651a8e6fd23b28f9b30a110a196c332e2d03
Quoted 67 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu.h   | 1 +
  drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 3 ++-
  drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 3 ++-
  drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 3 ++-
  drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 ++-
  5 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -0
index 8ab080a..501d6ea 100644
@@ -114,6 +114,7 @@
  extern int amdgpu_cntl_sb_buf_per_se;
  extern int amdgpu_param_buf_per_se;
 
+#define AMDGPU_DEFAULT_GTT_SIZE_MB		3072ULL /* 3GB by default */
  #define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS	        3000
  #define AMDGPU_MAX_USEC_TIMEOUT			100000	/* 100 ms */
  #define AMDGPU_FENCE_JIFFIES_TIMEOUT		(HZ / 2)
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +2 -1
index 0ce0d0a..480368b 100644
@@ -346,7 +346,8 @@ static int gmc_v6_0_mc_init(struct amdgpu_device *adev)
  	 * size equal to the 1024 or vram, whichever is larger.
  	 */
  	if (amdgpu_gart_size == -1)
-		adev->mc.gtt_size = max((1024ULL << 20), adev->mc.mc_vram_size);
+		adev->mc.gtt_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
+					adev->mc.mc_vram_size);
  	else
  		adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20;
 
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +2 -1
index f90dba5..715f605 100644
@@ -392,7 +392,8 @@ static int gmc_v7_0_mc_init(struct amdgpu_device *adev)
  	 * size equal to the 1024 or vram, whichever is larger.
  	 */
  	if (amdgpu_gart_size == -1)
-		adev->mc.gtt_size = max((1024ULL << 20), adev->mc.mc_vram_size);
+		adev->mc.gtt_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
+					adev->mc.mc_vram_size);
  	else
  		adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20;
 
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +2 -1
index fe79328..d0e7510 100644
@@ -484,7 +484,8 @@ static int gmc_v8_0_mc_init(struct amdgpu_device *adev)
  	 * size equal to the 1024 or vram, whichever is larger.
  	 */
  	if (amdgpu_gart_size == -1)
-		adev->mc.gtt_size = max((1024ULL << 20), adev->mc.mc_vram_size);
+		adev->mc.gtt_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
+					adev->mc.mc_vram_size);
  	else
  		adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20;
 
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0 -0
index 2d7a0e2..6ad0b87 100644

drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_mc_init(struct amdgpu_device *adev) · line 470

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +2 -1
@@ -463,7 +463,8 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev)
  	 * size equal to the 1024 or vram, whichever is larger.
  	 */
  	if (amdgpu_gart_size == -1)
-		adev->mc.gtt_size = max((1024ULL << 20), adev->mc.mc_vram_size);
+		adev->mc.gtt_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
+					adev->mc.mc_vram_size);
  	else
  		adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20;
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by
#3 lore raw
In reply to a message not in the archive
Quoted 4 lines · Chunming Zhou

v2: address Alex's comment, add AMDGPU_DEFAULT_GTT_SIZE_MB.

Change-Id I0417651a8e6fd23b28f9b30a110a196c332e2d03
Quoted 79 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h   | 1 +
 drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 3 ++-
 drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 3 ++-
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 3 ++-
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 ++-
 5 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -0
index 8ab080a..501d6ea 100644
@@ -114,6 +114,7 @@
 extern int amdgpu_cntl_sb_buf_per_se;
 extern int amdgpu_param_buf_per_se;
 
+#define AMDGPU_DEFAULT_GTT_SIZE_MB             3072ULL /* 3GB by default */
 #define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS         3000
 #define AMDGPU_MAX_USEC_TIMEOUT                        100000  /* 100 ms */
 #define AMDGPU_FENCE_JIFFIES_TIMEOUT           (HZ / 2)
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +2 -1
index 0ce0d0a..480368b 100644
@@ -346,7 +346,8 @@ static int gmc_v6_0_mc_init(struct amdgpu_device *adev)
         * size equal to the 1024 or vram, whichever is larger.
         */
        if (amdgpu_gart_size == -1)
-               adev->mc.gtt_size = max((1024ULL << 20), adev->mc.mc_vram_size);
+               adev->mc.gtt_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
+                                       adev->mc.mc_vram_size);
        else
                adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20;
 
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +2 -1
index f90dba5..715f605 100644
@@ -392,7 +392,8 @@ static int gmc_v7_0_mc_init(struct amdgpu_device *adev)
         * size equal to the 1024 or vram, whichever is larger.
         */
        if (amdgpu_gart_size == -1)
-               adev->mc.gtt_size = max((1024ULL << 20), adev->mc.mc_vram_size);
+               adev->mc.gtt_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
+                                       adev->mc.mc_vram_size);
        else
                adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20;
 
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +2 -1
index fe79328..d0e7510 100644
@@ -484,7 +484,8 @@ static int gmc_v8_0_mc_init(struct amdgpu_device *adev)
         * size equal to the 1024 or vram, whichever is larger.
         */
        if (amdgpu_gart_size == -1)
-               adev->mc.gtt_size = max((1024ULL << 20), adev->mc.mc_vram_size);
+               adev->mc.gtt_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
+                                       adev->mc.mc_vram_size);
        else
                adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20;
 
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +2 -2
index 2d7a0e2..6ad0b87 100644
@@ -463,7 +463,8 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev)
         * size equal to the 1024 or vram, whichever is larger.
         */
        if (amdgpu_gart_size == -1)
-               adev->mc.gtt_size = max((1024ULL << 20), adev->mc.mc_vram_size);
+               adev->mc.gtt_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
+                                       adev->mc.mc_vram_size);
        else
                adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20;
 
--

1.9.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx