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>
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index 17af0e8..435a3d97 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -234,8 +234,8 @@
}
if ((p->cs_flags & RADEON_CS_USE_VM) &&
- (p->rdev->family < CHIP_CAYMAN)) {
- DRM_ERROR("VM not supported on asic!\n");
+ !p->rdev->vm_manager.enabled) {
+ DRM_ERROR("VM not active on asic!\n");
if (p->chunk_relocs_idx != -1)
kfree(p->chunks[p->chunk_relocs_idx].kdata);
if (p->chunk_flags_idx != -1)