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

@@ -234,8 +234,8 @@ int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data)
}
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)