drm/radeon/kms: add support for compute rings in CS ioctl on SI
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 20 Mar 2012 21:18:24 +0000 (17:18 -0400)
committerDave Airlie <airlied@redhat.com>
Wed, 21 Mar 2012 06:55:55 +0000 (06:55 +0000)
Very basic implementation for picking the ring priority.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_cs.c

index 5e459a3a872df9a195cc5180b116fe7985b217c3..5cac8327833840d5b2503d0e8dd028b283d858a7 100644 (file)
@@ -103,8 +103,13 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 priority
                p->ring = RADEON_RING_TYPE_GFX_INDEX;
                break;
        case RADEON_CS_RING_COMPUTE:
-               /* for now */
-               p->ring = RADEON_RING_TYPE_GFX_INDEX;
+               if (p->rdev->family >= CHIP_TAHITI) {
+                       if (p->priority > 0)
+                               p->ring = CAYMAN_RING_TYPE_CP1_INDEX;
+                       else
+                               p->ring = CAYMAN_RING_TYPE_CP2_INDEX;
+               } else
+                       p->ring = RADEON_RING_TYPE_GFX_INDEX;
                break;
        }
        return 0;
This page took 0.027123 seconds and 5 git commands to generate.