drm/radeon: UVD doesn't needs VM on SI v2
authorChristian König <deathsimple@vodafone.de>
Mon, 8 Apr 2013 10:41:27 +0000 (12:41 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 9 Apr 2013 14:31:32 +0000 (10:31 -0400)
v2: update error message and comment

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_cs.c

index 70d38241b083afeb7e8a2d32053b2cc0f33086a7..a3dd04d038fe5c007c8c84f4e5aac3808ac39ce6 100644 (file)
@@ -241,15 +241,15 @@ int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data)
                        return -EINVAL;
                }
 
-               /* we only support VM on SI+ */
-               if ((p->rdev->family >= CHIP_TAHITI) &&
-                   ((p->cs_flags & RADEON_CS_USE_VM) == 0)) {
-                       DRM_ERROR("VM required on SI+!\n");
+               if (radeon_cs_get_ring(p, ring, priority))
                        return -EINVAL;
-               }
 
-               if (radeon_cs_get_ring(p, ring, priority))
+               /* we only support VM on some SI+ rings */
+               if ((p->rdev->asic->ring[p->ring].cs_parse == NULL) &&
+                  ((p->cs_flags & RADEON_CS_USE_VM) == 0)) {
+                       DRM_ERROR("Ring %d requires VM!\n", p->ring);
                        return -EINVAL;
+               }
        }
 
        /* deal with non-vm */