Commit edcd26e8 authored by Alex Deucher's avatar Alex Deucher

drm/radeon: default to 1024M gart size on rv770+

Newer asics have a lot of vram so it's less of an
issue to waste a little more space for the gart
page table.  This gives us some additional gart space
before having to migrate to non-gart system ram
for games, etc. where we use up most of vram.
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 60320347
...@@ -1003,16 +1003,28 @@ static void radeon_check_arguments(struct radeon_device *rdev) ...@@ -1003,16 +1003,28 @@ static void radeon_check_arguments(struct radeon_device *rdev)
radeon_vram_limit = 0; radeon_vram_limit = 0;
} }
if (radeon_gart_size == -1) {
/* default to a larger gart size on newer asics */
if (rdev->family >= CHIP_RV770)
radeon_gart_size = 1024;
else
radeon_gart_size = 512;
}
/* gtt size must be power of two and greater or equal to 32M */ /* gtt size must be power of two and greater or equal to 32M */
if (radeon_gart_size < 32) { if (radeon_gart_size < 32) {
dev_warn(rdev->dev, "gart size (%d) too small forcing to 512M\n", dev_warn(rdev->dev, "gart size (%d) too small\n",
radeon_gart_size); radeon_gart_size);
radeon_gart_size = 512; if (rdev->family >= CHIP_RV770)
radeon_gart_size = 1024;
else
radeon_gart_size = 512;
} else if (!radeon_check_pot_argument(radeon_gart_size)) { } else if (!radeon_check_pot_argument(radeon_gart_size)) {
dev_warn(rdev->dev, "gart size (%d) must be a power of 2\n", dev_warn(rdev->dev, "gart size (%d) must be a power of 2\n",
radeon_gart_size); radeon_gart_size);
radeon_gart_size = 512; if (rdev->family >= CHIP_RV770)
radeon_gart_size = 1024;
else
radeon_gart_size = 512;
} }
rdev->mc.gtt_size = (uint64_t)radeon_gart_size << 20; rdev->mc.gtt_size = (uint64_t)radeon_gart_size << 20;
...@@ -1144,7 +1156,7 @@ int radeon_device_init(struct radeon_device *rdev, ...@@ -1144,7 +1156,7 @@ int radeon_device_init(struct radeon_device *rdev,
rdev->family = flags & RADEON_FAMILY_MASK; rdev->family = flags & RADEON_FAMILY_MASK;
rdev->is_atom_bios = false; rdev->is_atom_bios = false;
rdev->usec_timeout = RADEON_MAX_USEC_TIMEOUT; rdev->usec_timeout = RADEON_MAX_USEC_TIMEOUT;
rdev->mc.gtt_size = radeon_gart_size * 1024 * 1024; rdev->mc.gtt_size = 512 * 1024 * 1024;
rdev->accel_working = false; rdev->accel_working = false;
/* set up ring ids */ /* set up ring ids */
for (i = 0; i < RADEON_NUM_RINGS; i++) { for (i = 0; i < RADEON_NUM_RINGS; i++) {
......
...@@ -154,7 +154,7 @@ int radeon_dynclks = -1; ...@@ -154,7 +154,7 @@ int radeon_dynclks = -1;
int radeon_r4xx_atom = 0; int radeon_r4xx_atom = 0;
int radeon_agpmode = 0; int radeon_agpmode = 0;
int radeon_vram_limit = 0; int radeon_vram_limit = 0;
int radeon_gart_size = 512; /* default gart size */ int radeon_gart_size = -1; /* auto */
int radeon_benchmarking = 0; int radeon_benchmarking = 0;
int radeon_testing = 0; int radeon_testing = 0;
int radeon_connector_table = 0; int radeon_connector_table = 0;
...@@ -187,7 +187,7 @@ module_param_named(vramlimit, radeon_vram_limit, int, 0600); ...@@ -187,7 +187,7 @@ module_param_named(vramlimit, radeon_vram_limit, int, 0600);
MODULE_PARM_DESC(agpmode, "AGP Mode (-1 == PCI)"); MODULE_PARM_DESC(agpmode, "AGP Mode (-1 == PCI)");
module_param_named(agpmode, radeon_agpmode, int, 0444); module_param_named(agpmode, radeon_agpmode, int, 0444);
MODULE_PARM_DESC(gartsize, "Size of PCIE/IGP gart to setup in megabytes (32, 64, etc)"); MODULE_PARM_DESC(gartsize, "Size of PCIE/IGP gart to setup in megabytes (32, 64, etc., -1 = auto)");
module_param_named(gartsize, radeon_gart_size, int, 0600); module_param_named(gartsize, radeon_gart_size, int, 0600);
MODULE_PARM_DESC(benchmark, "Run benchmark"); MODULE_PARM_DESC(benchmark, "Run benchmark");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment