drm/amdgpu: change gartsize default to 256MB
Limit the default GART size and save a lot of VRAM. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
36d3837266
commit
f9321cc440
|
@ -75,7 +75,7 @@
|
|||
*/
|
||||
extern int amdgpu_modeset;
|
||||
extern int amdgpu_vram_limit;
|
||||
extern int amdgpu_gart_size;
|
||||
extern unsigned amdgpu_gart_size;
|
||||
extern int amdgpu_gtt_size;
|
||||
extern int amdgpu_moverate;
|
||||
extern int amdgpu_benchmarking;
|
||||
|
|
|
@ -1132,13 +1132,11 @@ static void amdgpu_check_arguments(struct amdgpu_device *adev)
|
|||
amdgpu_sched_jobs = roundup_pow_of_two(amdgpu_sched_jobs);
|
||||
}
|
||||
|
||||
if (amdgpu_gart_size != -1) {
|
||||
/* gtt size must be greater or equal to 32M */
|
||||
if (amdgpu_gart_size < 32) {
|
||||
dev_warn(adev->dev, "gart size (%d) too small\n",
|
||||
amdgpu_gart_size);
|
||||
amdgpu_gart_size = -1;
|
||||
}
|
||||
if (amdgpu_gart_size < 32) {
|
||||
/* gart size must be greater or equal to 32M */
|
||||
dev_warn(adev->dev, "gart size (%d) too small\n",
|
||||
amdgpu_gart_size);
|
||||
amdgpu_gart_size = 32;
|
||||
}
|
||||
|
||||
if (amdgpu_gtt_size != -1 && amdgpu_gtt_size < 32) {
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
#define KMS_DRIVER_PATCHLEVEL 0
|
||||
|
||||
int amdgpu_vram_limit = 0;
|
||||
int amdgpu_gart_size = -1; /* auto */
|
||||
unsigned amdgpu_gart_size = 256;
|
||||
int amdgpu_gtt_size = -1; /* auto */
|
||||
int amdgpu_moverate = -1; /* auto */
|
||||
int amdgpu_benchmarking = 0;
|
||||
|
@ -121,8 +121,8 @@ int amdgpu_lbpw = -1;
|
|||
MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing, in megabytes");
|
||||
module_param_named(vramlimit, amdgpu_vram_limit, int, 0600);
|
||||
|
||||
MODULE_PARM_DESC(gartsize, "Size of PCIE/IGP gart to setup in megabytes (32, 64, etc., -1 = auto)");
|
||||
module_param_named(gartsize, amdgpu_gart_size, int, 0600);
|
||||
MODULE_PARM_DESC(gartsize, "Size of PCIE/IGP gart to setup in megabytes (32, 64, etc.)");
|
||||
module_param_named(gartsize, amdgpu_gart_size, uint, 0600);
|
||||
|
||||
MODULE_PARM_DESC(gttsize, "Size of the GTT domain in megabytes (-1 = auto)");
|
||||
module_param_named(gttsize, amdgpu_gtt_size, int, 0600);
|
||||
|
|
|
@ -65,14 +65,7 @@
|
|||
*/
|
||||
void amdgpu_gart_set_defaults(struct amdgpu_device *adev)
|
||||
{
|
||||
/* unless the user had overridden it, set the gart
|
||||
* size equal to the 1024 or vram, whichever is larger.
|
||||
*/
|
||||
if (amdgpu_gart_size == -1)
|
||||
adev->mc.gart_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
|
||||
adev->mc.mc_vram_size);
|
||||
else
|
||||
adev->mc.gart_size = (uint64_t)amdgpu_gart_size << 20;
|
||||
adev->mc.gart_size = (uint64_t)amdgpu_gart_size << 20;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue