diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2012-01-06 09:38:15 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-01-09 12:10:09 +0000 |
commit | 67e915e49a12ee08c22cb1db746bafd909988f85 (patch) | |
tree | 6786118f5a2930e675e66a27e3cdc1a12c54b55a /drivers/gpu/drm/radeon/radeon_gem.c | |
parent | cc1f71942944890c7e05fc55dc4427c94b63d4f1 (diff) | |
download | op-kernel-dev-67e915e49a12ee08c22cb1db746bafd909988f85.zip op-kernel-dev-67e915e49a12ee08c22cb1db746bafd909988f85.tar.gz |
drm/radeon/kms: check if vm is supported in VA ioctl
Add a VM manager enabled field and use it to check if
vm is enabled.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: jglisse@redhat.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_gem.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_gem.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c index 003eeec..7337850 100644 --- a/drivers/gpu/drm/radeon/radeon_gem.c +++ b/drivers/gpu/drm/radeon/radeon_gem.c @@ -404,6 +404,11 @@ int radeon_gem_va_ioctl(struct drm_device *dev, void *data, u32 invalid_flags; int r = 0; + if (!rdev->vm_manager.enabled) { + args->operation = RADEON_VA_RESULT_ERROR; + return -ENOTTY; + } + /* !! DONT REMOVE !! * We don't support vm_id yet, to be sure we don't have have broken * userspace, reject anyone trying to use non 0 value thus moving |