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>
This commit is contained in:
Alex Deucher
2012-01-06 09:38:15 -05:00
committed by Dave Airlie
parent cc1f719429
commit 67e915e49a
4 changed files with 18 additions and 3 deletions

View File

@@ -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