diff options
author | Christian König <christian.koenig@amd.com> | 2017-11-06 09:37:01 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-06 12:48:05 -0500 |
commit | bb7939b2030ab55acd203c86160c37db22f5796a (patch) | |
tree | 862995ae5c903f912e675d5e89b0ba774cde34c9 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
parent | 6af046d26f34278eacd6ecddb37170624f6d4251 (diff) |
drm/amdgpu: fix VA hole handling on Vega10 v3
Similar to the CPU address space the VA on Vega10 has a hole in it.
v2: use dev_dbg instead of dev_err
v3: add some more comments to explain how the hw works
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
CC: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index c16579287aee..59c9facf9bd7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |||
@@ -564,6 +564,17 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data, | |||
564 | return -EINVAL; | 564 | return -EINVAL; |
565 | } | 565 | } |
566 | 566 | ||
567 | if (args->va_address >= AMDGPU_VA_HOLE_START && | ||
568 | args->va_address < AMDGPU_VA_HOLE_END) { | ||
569 | dev_dbg(&dev->pdev->dev, | ||
570 | "va_address 0x%LX is in VA hole 0x%LX-0x%LX\n", | ||
571 | args->va_address, AMDGPU_VA_HOLE_START, | ||
572 | AMDGPU_VA_HOLE_END); | ||
573 | return -EINVAL; | ||
574 | } | ||
575 | |||
576 | args->va_address &= AMDGPU_VA_HOLE_MASK; | ||
577 | |||
567 | if ((args->flags & ~valid_flags) && (args->flags & ~prt_flags)) { | 578 | if ((args->flags & ~valid_flags) && (args->flags & ~prt_flags)) { |
568 | dev_err(&dev->pdev->dev, "invalid flags combination 0x%08X\n", | 579 | dev_err(&dev->pdev->dev, "invalid flags combination 0x%08X\n", |
569 | args->flags); | 580 | args->flags); |