From 9ba2b68fdb34fe2deaa59325128ae1976019bf64 Mon Sep 17 00:00:00 2001 From: Amber Lin Date: Thu, 22 Sep 2016 14:59:20 -0400 Subject: [PATCH] Add gfx900 support Add gfx900 device to the support Change-Id: I71f30ef43e5e0ef0e7b5f18205b6cc4767d9d861 --- src/queues.c | 12 ++++++++++-- src/topology.c | 5 ++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/queues.c b/src/queues.c index 6a4636a2b1..5a17dfc950 100644 --- a/src/queues.c +++ b/src/queues.c @@ -45,11 +45,12 @@ enum asic_family_type { CHIP_TONGA, CHIP_FIJI, CHIP_POLARIS10, - CHIP_POLARIS11 + CHIP_POLARIS11, + CHIP_VEGA10 }; #define IS_VI(chip) ((chip) >= CHIP_CARRIZO && (chip) <= CHIP_POLARIS11) -#define IS_DGPU(chip) (((chip) >= CHIP_TONGA && (chip) <= CHIP_POLARIS11) || \ +#define IS_DGPU(chip) (((chip) >= CHIP_TONGA && (chip) <= CHIP_VEGA10) || \ (chip) == CHIP_HAWAII) #define WG_CONTEXT_DATA_SIZE_PER_CU_VI 344576 @@ -96,6 +97,11 @@ struct device_info polaris11_device_info = { .eop_buffer_size = TONGA_PAGE_SIZE, }; +struct device_info vega10_device_info = { + .asic_family = CHIP_VEGA10, + .eop_buffer_size = 4096, +}; + struct device_id { uint16_t dev_id; @@ -174,6 +180,8 @@ struct device_id supported_devices[] = { { 0x67EB, &polaris11_device_info }, { 0x67EF, &polaris11_device_info }, { 0x67FF, &polaris11_device_info }, + { 0x6860, &vega10_device_info }, + { 0x687F, &vega10_device_info }, { 0, NULL } }; diff --git a/src/topology.c b/src/topology.c index 5d74b8a00b..2a4f5a61fa 100644 --- a/src/topology.c +++ b/src/topology.c @@ -160,7 +160,10 @@ static struct hsa_gfxip_table { { 0x67E9, 8, 0, 3, 1, "Polaris11" }, { 0x67EB, 8, 0, 3, 1, "Polaris11" }, { 0x67EF, 8, 0, 3, 1, "Polaris11" }, - { 0x67FF, 8, 0, 3, 1, "Polaris11" } + { 0x67FF, 8, 0, 3, 1, "Polaris11" }, + /* Vega10 */ + { 0x6860, 9, 0, 0, 1, "Vega10" }, + { 0x687F, 9, 0, 0, 1, "Vega10" } }; enum cache_type {