Commit 8e6d5992 authored by Marek Olšák's avatar Marek Olšák
Browse files

amd: add chip identification for gfx1100-1103

parent 1627a35f
......@@ -44,6 +44,8 @@
#define FAMILY_RV 0x8E
#define FAMILY_NV 0x8F
#define FAMILY_VGH 0x90
#define FAMILY_GFX1100 0x91
#define FAMILY_GFX1103 0x94
#define FAMILY_YC 0x92
#define FAMILY_GC_10_3_6 0x95
#define FAMILY_GC_10_3_7 0x97
......@@ -61,6 +63,8 @@
#define FAMILY_IS_RV(f) FAMILY_IS(f, RV)
#define FAMILY_IS_NV(f) FAMILY_IS(f, NV)
#define FAMILY_IS_YC(f) FAMILY_IS(f, YC)
#define FAMILY_IS_GFX1100(f) FAMILY_IS(f, GFX1100)
#define FAMILY_IS_GFX1103(f) FAMILY_IS(f, GFX1103)
#define AMDGPU_UNKNOWN 0xFF
......@@ -110,6 +114,12 @@
#define AMDGPU_VANGOGH_RANGE 0x01, 0xFF
#define AMDGPU_GFX1100_RANGE 0x01, 0x10
#define AMDGPU_GFX1101_RANGE 0x20, 0xFF
#define AMDGPU_GFX1102_RANGE 0x10, 0x20
#define AMDGPU_GFX1103_RANGE 0x01, 0xFF
#define AMDGPU_YELLOW_CARP_RANGE 0x01, 0xFF
#define AMDGPU_GFX1036_RANGE 0x01, 0xFF
......@@ -177,6 +187,11 @@
#define ASICREV_IS_VANGOGH(r) ASICREV_IS(r, VANGOGH)
#define ASICREV_IS_GFX1100(r) ASICREV_IS(r, GFX1100)
#define ASICREV_IS_GFX1101(r) ASICREV_IS(r, GFX1101)
#define ASICREV_IS_GFX1102(r) ASICREV_IS(r, GFX1102)
#define ASICREV_IS_GFX1103(r) ASICREV_IS(r, GFX1103)
#define ASICREV_IS_YELLOW_CARP(r) ASICREV_IS(r, YELLOW_CARP)
#define ASICREV_IS_GFX1036(r) ASICREV_IS(r, GFX1036)
......
......@@ -232,6 +232,10 @@ ADDR_E_RETURNCODE Lib::Create(
case FAMILY_GC_10_3_7:
pLib = Gfx10HwlInit(&client);
break;
case FAMILY_GFX1100:
case FAMILY_GFX1103:
pLib = Gfx11HwlInit(&client);
break;
default:
ADDR_ASSERT_ALWAYS();
break;
......
......@@ -738,6 +738,22 @@ ChipFamily Gfx11Lib::HwlConvertChipFamily(
switch (chipFamily)
{
case FAMILY_GFX1100:
if (ASICREV_IS_GFX1100(chipRevision))
{
}
if (ASICREV_IS_GFX1101(chipRevision))
{
}
if (ASICREV_IS_GFX1102(chipRevision))
{
}
break;
case FAMILY_GFX1103:
if (ASICREV_IS_GFX1103(chipRevision))
{
}
break;
default:
ADDR_ASSERT(!"Unknown chip family");
break;
......
......@@ -770,6 +770,14 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
case FAMILY_GC_10_3_7:
identify_chip2(GFX1037, GFX1036);
break;
case FAMILY_GFX1100:
identify_chip(GFX1100);
identify_chip(GFX1101);
identify_chip(GFX1102);
break;
case FAMILY_GFX1103:
identify_chip(GFX1103);
break;
}
if (!info->name) {
......@@ -782,7 +790,9 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
for (unsigned i = 0; info->name[i] && i < ARRAY_SIZE(info->lowercase_name) - 1; i++)
info->lowercase_name[i] = tolower(info->name[i]);
if (info->family >= CHIP_SIENNA_CICHLID)
if (info->family >= CHIP_GFX1100)
info->chip_class = GFX11;
else if (info->family >= CHIP_SIENNA_CICHLID)
info->chip_class = GFX10_3;
else if (info->family >= CHIP_NAVI10)
info->chip_class = GFX10;
......
......@@ -102,6 +102,14 @@ const char *ac_get_family_name(enum radeon_family family)
return "YELLOW_CARP";
case CHIP_GFX1036:
return "GFX1036";
case CHIP_GFX1100:
return "GFX1100";
case CHIP_GFX1101:
return "GFX1101";
case CHIP_GFX1102:
return "GFX1102";
case CHIP_GFX1103:
return "GFX1103";
default:
unreachable("Unknown GPU family");
}
......
......@@ -128,6 +128,10 @@ enum radeon_family
CHIP_BEIGE_GOBY, /* Radeon 6400, 6500 */
CHIP_YELLOW_CARP, /* Ryzen 6000 */
CHIP_GFX1036,
CHIP_GFX1100,
CHIP_GFX1101,
CHIP_GFX1102,
CHIP_GFX1103,
CHIP_LAST,
};
......
......@@ -175,6 +175,14 @@ const char *ac_get_llvm_processor_name(enum radeon_family family)
return LLVM_VERSION_MAJOR >= 13 ? "gfx1035" : "gfx1030";
case CHIP_GFX1036: /* TODO: LLVM 15 doesn't support this yet */
return "gfx1030";
case CHIP_GFX1100:
return "gfx1100";
case CHIP_GFX1101:
return "gfx1101";
case CHIP_GFX1102:
return "gfx1102";
case CHIP_GFX1103:
return "gfx1103";
default:
return "";
}
......
......@@ -65,7 +65,9 @@ static void handle_env_var_force_family(struct amdgpu_winsys *ws)
ws->info.name = "NOOP";
strcpy(ws->info.lowercase_name , "noop");
if (i >= CHIP_SIENNA_CICHLID)
if (i >= CHIP_GFX1100)
ws->info.chip_class = GFX11;
else if (i >= CHIP_SIENNA_CICHLID)
ws->info.chip_class = GFX10_3;
else if (i >= CHIP_NAVI10)
ws->info.chip_class = GFX10;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment