summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-11-23 12:57:18 +0100
committerAlex Deucher <alexander.deucher@amd.com>2017-12-06 12:48:30 -0500
commitf3368128bacece315aa0384b54b7da9e6f0909cd (patch)
tree7b2654fc54b4847362c5b3281bb7512f155fe73f /drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
parent341b759e642a847c3a88401db4263dec9f36d552 (diff)
downloadop-kernel-dev-f3368128bacece315aa0384b54b7da9e6f0909cd.zip
op-kernel-dev-f3368128bacece315aa0384b54b7da9e6f0909cd.tar.gz
drm/amdgpu: move validation of the VM size into the VM code
This moves validation of the VM size parameter into amdgpu_vm_adjust_size(). Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 729e4d5..cc97215 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -770,10 +770,10 @@ static int gmc_v9_0_sw_init(void *handle)
case CHIP_RAVEN:
adev->mc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN;
if (adev->rev_id == 0x0 || adev->rev_id == 0x1)
- amdgpu_vm_adjust_size(adev, 256 * 1024, 9, 3);
+ amdgpu_vm_adjust_size(adev, 256 * 1024, 9, 3, 48);
else
/* vm_size is 64GB for legacy 2-level page support */
- amdgpu_vm_adjust_size(adev, 64, 9, 1);
+ amdgpu_vm_adjust_size(adev, 64, 9, 1, 48);
break;
case CHIP_VEGA10:
/* XXX Don't know how to get VRAM type yet. */
@@ -783,7 +783,7 @@ static int gmc_v9_0_sw_init(void *handle)
* vm size is 256TB (48bit), maximum size of Vega10,
* block size 512 (9bit)
*/
- amdgpu_vm_adjust_size(adev, 256 * 1024, 9, 3);
+ amdgpu_vm_adjust_size(adev, 256 * 1024, 9, 3, 48);
break;
default:
break;
OpenPOWER on IntegriCloud