diff options
author | Christian König <christian.koenig@amd.com> | 2014-06-06 07:56:50 +0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-06-10 06:06:54 +0400 |
commit | 4510fb985d3c3c5dae4d66af0fbbf95cc0662f35 (patch) | |
tree | 6bd9b76c16c5879d79125ef402a7b2507f12f0b0 /drivers/gpu/drm/radeon/radeon_device.c | |
parent | c1c4413258e46aef9c27696052a5b7110bdf2941 (diff) | |
download | linux-4510fb985d3c3c5dae4d66af0fbbf95cc0662f35.tar.xz |
drm/radeon: make vm_block_size a module parameter
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_device.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_device.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 3f1e3060377c..03686fab842d 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -1073,6 +1073,22 @@ static void radeon_check_arguments(struct radeon_device *rdev) radeon_vm_size); radeon_vm_size = 4096; } + + /* defines number of bits in page table versus page directory, + * a page is 4KB so we have 12 bits offset, minimum 9 bits in the + * page table and the remaining bits are in the page directory */ + if (radeon_vm_block_size < 9) { + dev_warn(rdev->dev, "VM page table size (%d) to small\n", + radeon_vm_block_size); + radeon_vm_block_size = 9; + } + + if (radeon_vm_block_size > 24 || + radeon_vm_size < (1ull << radeon_vm_block_size)) { + dev_warn(rdev->dev, "VM page table size (%d) to large\n", + radeon_vm_block_size); + radeon_vm_block_size = 9; + } } /** |