radeonsi: add Polaris12 support (v3)
v2: use gfxip names for llvm 4.0+ v3: use tonga for llvm <= 3.8, drop gfxip name, we can just change that we change the other asics. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
This commit is contained in:

committed by
Alex Deucher

parent
15c8f322ca
commit
018ead4266
@@ -353,6 +353,7 @@ AddrChipFamily CIAddrLib::HwlConvertChipFamily(
|
|||||||
m_settings.isFiji = ASICREV_IS_FIJI_P(uChipRevision);
|
m_settings.isFiji = ASICREV_IS_FIJI_P(uChipRevision);
|
||||||
m_settings.isPolaris10 = ASICREV_IS_POLARIS10_P(uChipRevision);
|
m_settings.isPolaris10 = ASICREV_IS_POLARIS10_P(uChipRevision);
|
||||||
m_settings.isPolaris11 = ASICREV_IS_POLARIS11_M(uChipRevision);
|
m_settings.isPolaris11 = ASICREV_IS_POLARIS11_M(uChipRevision);
|
||||||
|
m_settings.isPolaris12 = ASICREV_IS_POLARIS12_V(uChipRevision);
|
||||||
break;
|
break;
|
||||||
case FAMILY_CZ:
|
case FAMILY_CZ:
|
||||||
m_settings.isCarrizo = 1;
|
m_settings.isCarrizo = 1;
|
||||||
@@ -417,7 +418,7 @@ BOOL_32 CIAddrLib::HwlInitGlobalParams(
|
|||||||
{
|
{
|
||||||
m_pipes = 16;
|
m_pipes = 16;
|
||||||
}
|
}
|
||||||
else if (m_settings.isPolaris11)
|
else if (m_settings.isPolaris11 || m_settings.isPolaris12)
|
||||||
{
|
{
|
||||||
m_pipes = 4;
|
m_pipes = 4;
|
||||||
}
|
}
|
||||||
|
@@ -62,6 +62,7 @@ struct CIChipSettings
|
|||||||
UINT_32 isFiji : 1;
|
UINT_32 isFiji : 1;
|
||||||
UINT_32 isPolaris10 : 1;
|
UINT_32 isPolaris10 : 1;
|
||||||
UINT_32 isPolaris11 : 1;
|
UINT_32 isPolaris11 : 1;
|
||||||
|
UINT_32 isPolaris12 : 1;
|
||||||
// VI fusion (Carrizo)
|
// VI fusion (Carrizo)
|
||||||
UINT_32 isCarrizo : 1;
|
UINT_32 isCarrizo : 1;
|
||||||
};
|
};
|
||||||
|
@@ -91,6 +91,7 @@ enum radeon_family {
|
|||||||
CHIP_STONEY,
|
CHIP_STONEY,
|
||||||
CHIP_POLARIS10,
|
CHIP_POLARIS10,
|
||||||
CHIP_POLARIS11,
|
CHIP_POLARIS11,
|
||||||
|
CHIP_POLARIS12,
|
||||||
CHIP_LAST,
|
CHIP_LAST,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -142,6 +142,8 @@ enum {
|
|||||||
|
|
||||||
VI_POLARIS11_M_A0 = 90,
|
VI_POLARIS11_M_A0 = 90,
|
||||||
|
|
||||||
|
VI_POLARIS12_V_A0 = 100,
|
||||||
|
|
||||||
VI_UNKNOWN = 0xFF
|
VI_UNKNOWN = 0xFF
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -156,6 +158,8 @@ enum {
|
|||||||
((eChipRev >= VI_POLARIS10_P_A0) && (eChipRev < VI_POLARIS11_M_A0))
|
((eChipRev >= VI_POLARIS10_P_A0) && (eChipRev < VI_POLARIS11_M_A0))
|
||||||
#define ASICREV_IS_POLARIS11_M(eChipRev) \
|
#define ASICREV_IS_POLARIS11_M(eChipRev) \
|
||||||
(eChipRev >= VI_POLARIS11_M_A0)
|
(eChipRev >= VI_POLARIS11_M_A0)
|
||||||
|
#define ASICREV_IS_POLARIS12_V(eChipRev)\
|
||||||
|
(eChipRev >= VI_POLARIS12_V_A0)
|
||||||
|
|
||||||
/* CZ specific rev IDs */
|
/* CZ specific rev IDs */
|
||||||
enum {
|
enum {
|
||||||
|
@@ -755,6 +755,7 @@ static const char* r600_get_chip_name(struct r600_common_screen *rscreen)
|
|||||||
case CHIP_FIJI: return "AMD FIJI";
|
case CHIP_FIJI: return "AMD FIJI";
|
||||||
case CHIP_POLARIS10: return "AMD POLARIS10";
|
case CHIP_POLARIS10: return "AMD POLARIS10";
|
||||||
case CHIP_POLARIS11: return "AMD POLARIS11";
|
case CHIP_POLARIS11: return "AMD POLARIS11";
|
||||||
|
case CHIP_POLARIS12: return "AMD POLARIS12";
|
||||||
case CHIP_STONEY: return "AMD STONEY";
|
case CHIP_STONEY: return "AMD STONEY";
|
||||||
default: return "AMD unknown";
|
default: return "AMD unknown";
|
||||||
}
|
}
|
||||||
@@ -889,9 +890,11 @@ const char *r600_get_llvm_processor_name(enum radeon_family family)
|
|||||||
#if HAVE_LLVM <= 0x0308
|
#if HAVE_LLVM <= 0x0308
|
||||||
case CHIP_POLARIS10: return "tonga";
|
case CHIP_POLARIS10: return "tonga";
|
||||||
case CHIP_POLARIS11: return "tonga";
|
case CHIP_POLARIS11: return "tonga";
|
||||||
|
case CHIP_POLARIS12: return "tonga";
|
||||||
#else
|
#else
|
||||||
case CHIP_POLARIS10: return "polaris10";
|
case CHIP_POLARIS10: return "polaris10";
|
||||||
case CHIP_POLARIS11: return "polaris11";
|
case CHIP_POLARIS11: return "polaris11";
|
||||||
|
case CHIP_POLARIS12: return "polaris11";
|
||||||
#endif
|
#endif
|
||||||
default: return "";
|
default: return "";
|
||||||
}
|
}
|
||||||
|
@@ -413,7 +413,8 @@ struct pipe_video_codec *rvce_create_encoder(struct pipe_context *context,
|
|||||||
enc->use_vui = true;
|
enc->use_vui = true;
|
||||||
if (rscreen->info.family >= CHIP_TONGA &&
|
if (rscreen->info.family >= CHIP_TONGA &&
|
||||||
rscreen->info.family != CHIP_STONEY &&
|
rscreen->info.family != CHIP_STONEY &&
|
||||||
rscreen->info.family != CHIP_POLARIS11)
|
rscreen->info.family != CHIP_POLARIS11 &&
|
||||||
|
rscreen->info.family != CHIP_POLARIS12)
|
||||||
enc->dual_pipe = true;
|
enc->dual_pipe = true;
|
||||||
/* TODO enable B frame with dual instance */
|
/* TODO enable B frame with dual instance */
|
||||||
if ((rscreen->info.family >= CHIP_TONGA) &&
|
if ((rscreen->info.family >= CHIP_TONGA) &&
|
||||||
|
@@ -734,6 +734,7 @@ static bool si_init_gs_info(struct si_screen *sscreen)
|
|||||||
case CHIP_FIJI:
|
case CHIP_FIJI:
|
||||||
case CHIP_POLARIS10:
|
case CHIP_POLARIS10:
|
||||||
case CHIP_POLARIS11:
|
case CHIP_POLARIS11:
|
||||||
|
case CHIP_POLARIS12:
|
||||||
sscreen->gs_table_depth = 32;
|
sscreen->gs_table_depth = 32;
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
|
@@ -3936,6 +3936,7 @@ static void si_init_config(struct si_context *sctx)
|
|||||||
raster_config_1 = 0x0000002a;
|
raster_config_1 = 0x0000002a;
|
||||||
break;
|
break;
|
||||||
case CHIP_POLARIS11:
|
case CHIP_POLARIS11:
|
||||||
|
case CHIP_POLARIS12:
|
||||||
raster_config = 0x16000012;
|
raster_config = 0x16000012;
|
||||||
raster_config_1 = 0x00000000;
|
raster_config_1 = 0x00000000;
|
||||||
break;
|
break;
|
||||||
|
@@ -300,6 +300,10 @@ static bool do_winsys_init(struct amdgpu_winsys *ws, int fd)
|
|||||||
ws->family = FAMILY_VI;
|
ws->family = FAMILY_VI;
|
||||||
ws->rev_id = VI_POLARIS11_M_A0;
|
ws->rev_id = VI_POLARIS11_M_A0;
|
||||||
break;
|
break;
|
||||||
|
case CHIP_POLARIS12:
|
||||||
|
ws->family = FAMILY_VI;
|
||||||
|
ws->rev_id = VI_POLARIS12_V_A0;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "amdgpu: Unknown family.\n");
|
fprintf(stderr, "amdgpu: Unknown family.\n");
|
||||||
goto fail;
|
goto fail;
|
||||||
|
Reference in New Issue
Block a user