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:

committed by
Dave Airlie

parent
cc1f719429
commit
67e915e49a
@@ -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
|
||||
|
Reference in New Issue
Block a user