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: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
6032034761
commit
edcd26e81f
|
@ -1003,15 +1003,27 @@ static void radeon_check_arguments(struct radeon_device *rdev)
|
|||
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 */
|
||||
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);
|
||||
if (rdev->family >= CHIP_RV770)
|
||||
radeon_gart_size = 1024;
|
||||
else
|
||||
radeon_gart_size = 512;
|
||||
|
||||
} else if (!radeon_check_pot_argument(radeon_gart_size)) {
|
||||
dev_warn(rdev->dev, "gart size (%d) must be a power of 2\n",
|
||||
radeon_gart_size);
|
||||
if (rdev->family >= CHIP_RV770)
|
||||
radeon_gart_size = 1024;
|
||||
else
|
||||
radeon_gart_size = 512;
|
||||
}
|
||||
rdev->mc.gtt_size = (uint64_t)radeon_gart_size << 20;
|
||||
|
@ -1144,7 +1156,7 @@ int radeon_device_init(struct radeon_device *rdev,
|
|||
rdev->family = flags & RADEON_FAMILY_MASK;
|
||||
rdev->is_atom_bios = false;
|
||||
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;
|
||||
/* set up ring ids */
|
||||
for (i = 0; i < RADEON_NUM_RINGS; i++) {
|
||||
|
|
|
@ -154,7 +154,7 @@ int radeon_dynclks = -1;
|
|||
int radeon_r4xx_atom = 0;
|
||||
int radeon_agpmode = 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_testing = 0;
|
||||
int radeon_connector_table = 0;
|
||||
|
@ -187,7 +187,7 @@ module_param_named(vramlimit, radeon_vram_limit, int, 0600);
|
|||
MODULE_PARM_DESC(agpmode, "AGP Mode (-1 == PCI)");
|
||||
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_PARM_DESC(benchmark, "Run benchmark");
|
||||
|
|
Loading…
Reference in New Issue