From f29f206c93743d421c428383afaa2944f680d9c5 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Fri, 7 Jun 2013 14:00:11 -0400 Subject: [PATCH] radeonsi: initial support for CIK chips Add the infrastructure to differentiate them. Just treat them like SI for now. Signed-off-by: Alex Deucher --- src/gallium/drivers/radeonsi/radeonsi_pipe.c | 14 +++++++++++++- src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 5 +++++ src/gallium/winsys/radeon/drm/radeon_winsys.h | 4 ++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/radeonsi_pipe.c b/src/gallium/drivers/radeonsi/radeonsi_pipe.c index 775fa97306d..9aa88635290 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_pipe.c +++ b/src/gallium/drivers/radeonsi/radeonsi_pipe.c @@ -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); diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c index 0eec984565f..033e78f7971 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c @@ -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 */ diff --git a/src/gallium/winsys/radeon/drm/radeon_winsys.h b/src/gallium/winsys/radeon/drm/radeon_winsys.h index 8dba64e1819..a619d709754 100644 --- a/src/gallium/winsys/radeon/drm/radeon_winsys.h +++ b/src/gallium/winsys/radeon/drm/radeon_winsys.h @@ -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 { -- 2.30.2