radeonsi: initial support for CIK chips
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 7 Jun 2013 18:00:11 +0000 (14:00 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 28 Jun 2013 19:15:28 +0000 (15:15 -0400)
Add the infrastructure to differentiate them.
Just treat them like SI for now.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/radeonsi/radeonsi_pipe.c
src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
src/gallium/winsys/radeon/drm/radeon_winsys.h

index 775fa97306d94b04dc2b99ad2f3463e506e81500..9aa886352901e7dd07c8edcf4a4a1905f1535ee1 100644 (file)
@@ -239,6 +239,13 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
                rctx->max_db = 8;
                si_init_config(rctx);
                break;
+       case CIK:
+               si_init_state_functions(rctx);
+               LIST_INITHEAD(&rctx->active_query_list);
+               rctx->cs = rctx->ws->cs_create(rctx->ws, RING_GFX, NULL);
+               rctx->max_db = 8;
+               si_init_config(rctx);
+               break;
        default:
                R600_ERR("Unsupported chip class %d.\n", rctx->chip_class);
                r600_destroy_context(&rctx->context);
@@ -304,6 +311,9 @@ static const char *r600_get_family_name(enum radeon_family family)
        case CHIP_VERDE: return "AMD CAPE VERDE";
        case CHIP_OLAND: return "AMD OLAND";
        case CHIP_HAINAN: return "AMD HAINAN";
+       case CHIP_BONAIRE: return "AMD BONAIRE";
+       case CHIP_KAVERI: return "AMD KAVERI";
+       case CHIP_KABINI: return "AMD KABINI";
        default: return "AMD unknown";
        }
 }
@@ -794,7 +804,9 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws)
        }
 
        /* setup class */
-       if (rscreen->family >= CHIP_TAHITI) {
+       if (rscreen->family >= CHIP_BONAIRE) {
+               rscreen->chip_class = CIK;
+       } else if (rscreen->family >= CHIP_TAHITI) {
                rscreen->chip_class = SI;
        } else {
                fprintf(stderr, "r600: Unsupported family %d\n", rscreen->family);
index 0eec984565f1ba5e24a28efeff4b1ab4acbcd210..033e78f79719eee885b43ca70b1ed5d34ac7ba0d 100644 (file)
@@ -324,6 +324,11 @@ static boolean do_winsys_init(struct radeon_drm_winsys *ws)
     case CHIP_HAINAN:
         ws->info.chip_class = SI;
         break;
+    case CHIP_BONAIRE:
+    case CHIP_KAVERI:
+    case CHIP_KABINI:
+        ws->info.chip_class = CIK;
+        break;
     }
 
     /* Check for dma */
index 8dba64e18198bfca7518d139334000cfa73f5966..a619d709754ae9eb9d709388e64c3232e8963620 100644 (file)
@@ -125,6 +125,9 @@ enum radeon_family {
     CHIP_VERDE,
     CHIP_OLAND,
     CHIP_HAINAN,
+    CHIP_BONAIRE,
+    CHIP_KAVERI,
+    CHIP_KABINI,
     CHIP_LAST,
 };
 
@@ -138,6 +141,7 @@ enum chip_class {
     EVERGREEN,
     CAYMAN,
     SI,
+    CIK,
 };
 
 enum ring_type {