Re: [Mesa-dev] [PATCH 1/2] radeonsi: add Polaris12 support (v3)
On Wed, Dec 21, 2016 at 9:40 AM, Andreas Boll wrote: > 2016-12-20 16:31 GMT+01:00 Alex Deucher : >> On Tue, Dec 20, 2016 at 6:49 AM, Andreas Boll >> wrote: >>> 2016-12-19 23:45 GMT+01:00 Alex Deucher : From: Junwei Zhang v2: use gfxip names for llvm 4.0+ v3: use tonga for llvm <= 3.8 Signed-off-by: Junwei Zhang Reviewed-by: Nicolai Hähnle Acked-by: Christian König --- >>> >>> snip >>> diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index 0b5c6dc..e0b914c 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -755,6 +755,7 @@ static const char* r600_get_chip_name(struct r600_common_screen *rscreen) case CHIP_FIJI: return "AMD FIJI"; case CHIP_POLARIS10: return "AMD POLARIS10"; case CHIP_POLARIS11: return "AMD POLARIS11"; + case CHIP_POLARIS12: return "AMD POLARIS12"; case CHIP_STONEY: return "AMD STONEY"; default: return "AMD unknown"; } @@ -889,9 +890,11 @@ const char *r600_get_llvm_processor_name(enum radeon_family family) #if HAVE_LLVM <= 0x0308 case CHIP_POLARIS10: return "tonga"; case CHIP_POLARIS11: return "tonga"; + case CHIP_POLARIS12: return "tonga"; #else case CHIP_POLARIS10: return "polaris10"; case CHIP_POLARIS11: return "polaris11"; + case CHIP_POLARIS12: return "polaris11"; #endif >>> >>> You've dropped the processor name for LLVM 4.0+. >>> I guess that wasn't intended. >> >> That was intended. It didn't seem worth adding all of the additional >> special cases. If/when we convert the other asics to use gfxip names, >> we can convert polaris12 as well. >> >> Alex > > Ok, it just wasn't obvious from the updated commit message. Maybe > update the v3 comment before pushing. Will do. Alex ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/2] radeonsi: add Polaris12 support (v3)
2016-12-20 16:31 GMT+01:00 Alex Deucher : > On Tue, Dec 20, 2016 at 6:49 AM, Andreas Boll > wrote: >> 2016-12-19 23:45 GMT+01:00 Alex Deucher : >>> From: Junwei Zhang >>> >>> v2: use gfxip names for llvm 4.0+ >>> v3: use tonga for llvm <= 3.8 >>> >>> Signed-off-by: Junwei Zhang >>> Reviewed-by: Nicolai Hähnle >>> Acked-by: Christian König >>> --- >> >> snip >> >>> diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c >>> b/src/gallium/drivers/radeon/r600_pipe_common.c >>> index 0b5c6dc..e0b914c 100644 >>> --- a/src/gallium/drivers/radeon/r600_pipe_common.c >>> +++ b/src/gallium/drivers/radeon/r600_pipe_common.c >>> @@ -755,6 +755,7 @@ static const char* r600_get_chip_name(struct >>> r600_common_screen *rscreen) >>> case CHIP_FIJI: return "AMD FIJI"; >>> case CHIP_POLARIS10: return "AMD POLARIS10"; >>> case CHIP_POLARIS11: return "AMD POLARIS11"; >>> + case CHIP_POLARIS12: return "AMD POLARIS12"; >>> case CHIP_STONEY: return "AMD STONEY"; >>> default: return "AMD unknown"; >>> } >>> @@ -889,9 +890,11 @@ const char *r600_get_llvm_processor_name(enum >>> radeon_family family) >>> #if HAVE_LLVM <= 0x0308 >>> case CHIP_POLARIS10: return "tonga"; >>> case CHIP_POLARIS11: return "tonga"; >>> + case CHIP_POLARIS12: return "tonga"; >>> #else >>> case CHIP_POLARIS10: return "polaris10"; >>> case CHIP_POLARIS11: return "polaris11"; >>> + case CHIP_POLARIS12: return "polaris11"; >>> #endif >> >> You've dropped the processor name for LLVM 4.0+. >> I guess that wasn't intended. > > That was intended. It didn't seem worth adding all of the additional > special cases. If/when we convert the other asics to use gfxip names, > we can convert polaris12 as well. > > Alex Ok, it just wasn't obvious from the updated commit message. Maybe update the v3 comment before pushing. Andreas > >> Something like this should work: >> >> #if HAVE_LLVM <= 0x0308 >> // return processor names for LLVM <= 3.8 >> #elif HAVE_LLVM == 0x0309 >> // return processor names for LLVM 3.9 >> #else >> // return processor names for LLVM > 3.9 >> #endif >> >> Andreas >> >>> default: return ""; >>> } ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/2] radeonsi: add Polaris12 support (v3)
Hi Alex and Marek, > > > > Reviewed-by: Marek Olšák > > > > Has it ever been tested with Mesa? > > It was tested when the code was originally written and the hybrid stack > (including > mesa MM) has been tested recently. I don't have a > polaris12 card at the moment. Just now I verified it again. I could play h264, h265, mp4 as our test procedure. It's Tested-by: Junwei Zhang Regards, Jerry (Junwei Zhang) SRDC SW Development AMD Shanghai _ > -Original Message- > From: Alex Deucher [mailto:alexdeuc...@gmail.com] > Sent: Wednesday, December 21, 2016 3:07 > To: Marek Olšák > Cc: mesa-dev@lists.freedesktop.org; Zhang, Jerry > Subject: Re: [Mesa-dev] [PATCH 1/2] radeonsi: add Polaris12 support (v3) > > On Tue, Dec 20, 2016 at 1:34 PM, Marek Olšák wrote: > > For the series: > > > > Reviewed-by: Marek Olšák > > > > Has it ever been tested with Mesa? > > It was tested when the code was originally written and the hybrid stack > (including > mesa MM) has been tested recently. I don't have a > polaris12 card at the moment. > > Alex > > > > > Marek > > > > On Mon, Dec 19, 2016 at 11:45 PM, Alex Deucher > wrote: > >> From: Junwei Zhang > >> > >> v2: use gfxip names for llvm 4.0+ > >> v3: use tonga for llvm <= 3.8 > >> > >> Signed-off-by: Junwei Zhang > >> Reviewed-by: Nicolai Hähnle > >> Acked-by: Christian König > >> --- > >> src/amd/addrlib/r800/ciaddrlib.cpp| 3 ++- > >> src/amd/addrlib/r800/ciaddrlib.h | 1 + > >> src/amd/common/amd_family.h | 1 + > >> src/amd/common/amdgpu_id.h| 4 > >> src/gallium/drivers/radeon/r600_pipe_common.c | 3 +++ > >> src/gallium/drivers/radeon/radeon_vce.c | 3 ++- > >> src/gallium/drivers/radeonsi/si_pipe.c| 1 + > >> src/gallium/drivers/radeonsi/si_state.c | 1 + > >> src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 4 > >> 9 files changed, 19 insertions(+), 2 deletions(-) > >> > >> diff --git a/src/amd/addrlib/r800/ciaddrlib.cpp > >> b/src/amd/addrlib/r800/ciaddrlib.cpp > >> index 7c5d29a..c726c4d 100644 > >> --- a/src/amd/addrlib/r800/ciaddrlib.cpp > >> +++ b/src/amd/addrlib/r800/ciaddrlib.cpp > >> @@ -353,6 +353,7 @@ AddrChipFamily CIAddrLib::HwlConvertChipFamily( > >> m_settings.isFiji= > >> ASICREV_IS_FIJI_P(uChipRevision); > >> m_settings.isPolaris10 = > >> ASICREV_IS_POLARIS10_P(uChipRevision); > >> m_settings.isPolaris11 = > >> ASICREV_IS_POLARIS11_M(uChipRevision); > >> +m_settings.isPolaris12 = > >> ASICREV_IS_POLARIS12_V(uChipRevision); > >> break; > >> case FAMILY_CZ: > >> m_settings.isCarrizo = 1; > >> @@ -417,7 +418,7 @@ BOOL_32 CIAddrLib::HwlInitGlobalParams( > >> { > >> m_pipes = 16; > >> } > >> -else if (m_settings.isPolaris11) > >> +else if (m_settings.isPolaris11 || m_settings.isPolaris12) > >> { > >> m_pipes = 4; > >> } > >> diff --git a/src/amd/addrlib/r800/ciaddrlib.h > >> b/src/amd/addrlib/r800/ciaddrlib.h > >> index de995fa..2c9a4cc 100644 > >> --- a/src/amd/addrlib/r800/ciaddrlib.h > >> +++ b/src/amd/addrlib/r800/ciaddrlib.h > >> @@ -62,6 +62,7 @@ struct CIChipSettings > >> UINT_32 isFiji: 1; > >> UINT_32 isPolaris10 : 1; > >> UINT_32 isPolaris11 : 1; > >> +UINT_32 isPolaris12 : 1; > >> // VI fusion (Carrizo) > >> UINT_32 isCarrizo : 1; > >> }; > >> diff --git a/src/amd/common/amd_family.h > >> b/src/amd/common/amd_family.h index 6a713ad..b09bbb8 100644 > >> --- a/src/amd/common/amd_family.h > >> +++ b/src/amd/common/amd_family.h > >> @@ -91,6 +91,7 @@ enum radeon_family { > >> CHIP_STONEY, > >> CHIP_POLARIS10, > >> CHIP_POLARIS11, > >> +CHIP_POLARIS12, > >> CHIP_LAST, > >> }; > >> > >> diff --git a/src/amd/common/amdgpu_id.h b/src/amd/common/amdgpu_id.h > >> index f91df55..1683a5a 100644 > >> --- a/src/amd/common/amdgpu_id.h > >> +++ b/src/amd/common/amdgpu_id.h > >> @@ -142
Re: [Mesa-dev] [PATCH 1/2] radeonsi: add Polaris12 support (v3)
On Tue, Dec 20, 2016 at 1:34 PM, Marek Olšák wrote: > For the series: > > Reviewed-by: Marek Olšák > > Has it ever been tested with Mesa? It was tested when the code was originally written and the hybrid stack (including mesa MM) has been tested recently. I don't have a polaris12 card at the moment. Alex > > Marek > > On Mon, Dec 19, 2016 at 11:45 PM, Alex Deucher wrote: >> From: Junwei Zhang >> >> v2: use gfxip names for llvm 4.0+ >> v3: use tonga for llvm <= 3.8 >> >> Signed-off-by: Junwei Zhang >> Reviewed-by: Nicolai Hähnle >> Acked-by: Christian König >> --- >> src/amd/addrlib/r800/ciaddrlib.cpp| 3 ++- >> src/amd/addrlib/r800/ciaddrlib.h | 1 + >> src/amd/common/amd_family.h | 1 + >> src/amd/common/amdgpu_id.h| 4 >> src/gallium/drivers/radeon/r600_pipe_common.c | 3 +++ >> src/gallium/drivers/radeon/radeon_vce.c | 3 ++- >> src/gallium/drivers/radeonsi/si_pipe.c| 1 + >> src/gallium/drivers/radeonsi/si_state.c | 1 + >> src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 4 >> 9 files changed, 19 insertions(+), 2 deletions(-) >> >> diff --git a/src/amd/addrlib/r800/ciaddrlib.cpp >> b/src/amd/addrlib/r800/ciaddrlib.cpp >> index 7c5d29a..c726c4d 100644 >> --- a/src/amd/addrlib/r800/ciaddrlib.cpp >> +++ b/src/amd/addrlib/r800/ciaddrlib.cpp >> @@ -353,6 +353,7 @@ AddrChipFamily CIAddrLib::HwlConvertChipFamily( >> m_settings.isFiji= ASICREV_IS_FIJI_P(uChipRevision); >> m_settings.isPolaris10 = >> ASICREV_IS_POLARIS10_P(uChipRevision); >> m_settings.isPolaris11 = >> ASICREV_IS_POLARIS11_M(uChipRevision); >> +m_settings.isPolaris12 = >> ASICREV_IS_POLARIS12_V(uChipRevision); >> break; >> case FAMILY_CZ: >> m_settings.isCarrizo = 1; >> @@ -417,7 +418,7 @@ BOOL_32 CIAddrLib::HwlInitGlobalParams( >> { >> m_pipes = 16; >> } >> -else if (m_settings.isPolaris11) >> +else if (m_settings.isPolaris11 || m_settings.isPolaris12) >> { >> m_pipes = 4; >> } >> diff --git a/src/amd/addrlib/r800/ciaddrlib.h >> b/src/amd/addrlib/r800/ciaddrlib.h >> index de995fa..2c9a4cc 100644 >> --- a/src/amd/addrlib/r800/ciaddrlib.h >> +++ b/src/amd/addrlib/r800/ciaddrlib.h >> @@ -62,6 +62,7 @@ struct CIChipSettings >> UINT_32 isFiji: 1; >> UINT_32 isPolaris10 : 1; >> UINT_32 isPolaris11 : 1; >> +UINT_32 isPolaris12 : 1; >> // VI fusion (Carrizo) >> UINT_32 isCarrizo : 1; >> }; >> diff --git a/src/amd/common/amd_family.h b/src/amd/common/amd_family.h >> index 6a713ad..b09bbb8 100644 >> --- a/src/amd/common/amd_family.h >> +++ b/src/amd/common/amd_family.h >> @@ -91,6 +91,7 @@ enum radeon_family { >> CHIP_STONEY, >> CHIP_POLARIS10, >> CHIP_POLARIS11, >> +CHIP_POLARIS12, >> CHIP_LAST, >> }; >> >> diff --git a/src/amd/common/amdgpu_id.h b/src/amd/common/amdgpu_id.h >> index f91df55..1683a5a 100644 >> --- a/src/amd/common/amdgpu_id.h >> +++ b/src/amd/common/amdgpu_id.h >> @@ -142,6 +142,8 @@ enum { >> >> VI_POLARIS11_M_A0 = 90, >> >> + VI_POLARIS12_V_A0 = 100, >> + >> VI_UNKNOWN= 0xFF >> }; >> >> @@ -156,6 +158,8 @@ enum { >> ((eChipRev >= VI_POLARIS10_P_A0) && (eChipRev < VI_POLARIS11_M_A0)) >> #define ASICREV_IS_POLARIS11_M(eChipRev) \ >> (eChipRev >= VI_POLARIS11_M_A0) >> +#define ASICREV_IS_POLARIS12_V(eChipRev)\ >> + (eChipRev >= VI_POLARIS12_V_A0) >> >> /* CZ specific rev IDs */ >> enum { >> diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c >> b/src/gallium/drivers/radeon/r600_pipe_common.c >> index 0b5c6dc..e0b914c 100644 >> --- a/src/gallium/drivers/radeon/r600_pipe_common.c >> +++ b/src/gallium/drivers/radeon/r600_pipe_common.c >> @@ -755,6 +755,7 @@ static const char* r600_get_chip_name(struct >> r600_common_screen *rscreen) >> case CHIP_FIJI: return "AMD FIJI"; >> case CHIP_POLARIS10: return "AMD POLARIS10"; >> case CHIP_POLARIS11: return "AMD POLARIS11"; >> + case CHIP_POLARIS12: return "AMD POLARIS12"; >> case CHIP_STONEY: return "AMD STONEY"; >> default: return "AMD unknown"; >> } >> @@ -889,9 +890,11 @@ const char *r600_get_llvm_processor_name(enum >> radeon_family family) >> #if HAVE_LLVM <= 0x0308 >> case CHIP_POLARIS10: return "tonga"; >> case CHIP_POLARIS11: return "tonga"; >> + case CHIP_POLARIS12: return "tonga"; >> #else >> case CHIP_POLARIS10: return "polaris10"; >> case CHIP_POLARIS11: return "polaris11"; >> + case CHIP_POLARIS12: return "polaris11"; >> #endif >> default: return ""; >> } >> diff --git a/src/gallium/drivers/radeon/radeon_vce.c >> b/src/gallium/drivers/radeon/radeon_vce.c >> index aad2ec1..dcd56ea 100644 >> --- a/src/gallium/dr
Re: [Mesa-dev] [PATCH 1/2] radeonsi: add Polaris12 support (v3)
For the series: Reviewed-by: Marek Olšák Has it ever been tested with Mesa? Marek On Mon, Dec 19, 2016 at 11:45 PM, Alex Deucher wrote: > From: Junwei Zhang > > v2: use gfxip names for llvm 4.0+ > v3: use tonga for llvm <= 3.8 > > Signed-off-by: Junwei Zhang > Reviewed-by: Nicolai Hähnle > Acked-by: Christian König > --- > src/amd/addrlib/r800/ciaddrlib.cpp| 3 ++- > src/amd/addrlib/r800/ciaddrlib.h | 1 + > src/amd/common/amd_family.h | 1 + > src/amd/common/amdgpu_id.h| 4 > src/gallium/drivers/radeon/r600_pipe_common.c | 3 +++ > src/gallium/drivers/radeon/radeon_vce.c | 3 ++- > src/gallium/drivers/radeonsi/si_pipe.c| 1 + > src/gallium/drivers/radeonsi/si_state.c | 1 + > src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 4 > 9 files changed, 19 insertions(+), 2 deletions(-) > > diff --git a/src/amd/addrlib/r800/ciaddrlib.cpp > b/src/amd/addrlib/r800/ciaddrlib.cpp > index 7c5d29a..c726c4d 100644 > --- a/src/amd/addrlib/r800/ciaddrlib.cpp > +++ b/src/amd/addrlib/r800/ciaddrlib.cpp > @@ -353,6 +353,7 @@ AddrChipFamily CIAddrLib::HwlConvertChipFamily( > m_settings.isFiji= ASICREV_IS_FIJI_P(uChipRevision); > m_settings.isPolaris10 = > ASICREV_IS_POLARIS10_P(uChipRevision); > m_settings.isPolaris11 = > ASICREV_IS_POLARIS11_M(uChipRevision); > +m_settings.isPolaris12 = > ASICREV_IS_POLARIS12_V(uChipRevision); > break; > case FAMILY_CZ: > m_settings.isCarrizo = 1; > @@ -417,7 +418,7 @@ BOOL_32 CIAddrLib::HwlInitGlobalParams( > { > m_pipes = 16; > } > -else if (m_settings.isPolaris11) > +else if (m_settings.isPolaris11 || m_settings.isPolaris12) > { > m_pipes = 4; > } > diff --git a/src/amd/addrlib/r800/ciaddrlib.h > b/src/amd/addrlib/r800/ciaddrlib.h > index de995fa..2c9a4cc 100644 > --- a/src/amd/addrlib/r800/ciaddrlib.h > +++ b/src/amd/addrlib/r800/ciaddrlib.h > @@ -62,6 +62,7 @@ struct CIChipSettings > UINT_32 isFiji: 1; > UINT_32 isPolaris10 : 1; > UINT_32 isPolaris11 : 1; > +UINT_32 isPolaris12 : 1; > // VI fusion (Carrizo) > UINT_32 isCarrizo : 1; > }; > diff --git a/src/amd/common/amd_family.h b/src/amd/common/amd_family.h > index 6a713ad..b09bbb8 100644 > --- a/src/amd/common/amd_family.h > +++ b/src/amd/common/amd_family.h > @@ -91,6 +91,7 @@ enum radeon_family { > CHIP_STONEY, > CHIP_POLARIS10, > CHIP_POLARIS11, > +CHIP_POLARIS12, > CHIP_LAST, > }; > > diff --git a/src/amd/common/amdgpu_id.h b/src/amd/common/amdgpu_id.h > index f91df55..1683a5a 100644 > --- a/src/amd/common/amdgpu_id.h > +++ b/src/amd/common/amdgpu_id.h > @@ -142,6 +142,8 @@ enum { > > VI_POLARIS11_M_A0 = 90, > > + VI_POLARIS12_V_A0 = 100, > + > VI_UNKNOWN= 0xFF > }; > > @@ -156,6 +158,8 @@ enum { > ((eChipRev >= VI_POLARIS10_P_A0) && (eChipRev < VI_POLARIS11_M_A0)) > #define ASICREV_IS_POLARIS11_M(eChipRev) \ > (eChipRev >= VI_POLARIS11_M_A0) > +#define ASICREV_IS_POLARIS12_V(eChipRev)\ > + (eChipRev >= VI_POLARIS12_V_A0) > > /* CZ specific rev IDs */ > enum { > diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c > b/src/gallium/drivers/radeon/r600_pipe_common.c > index 0b5c6dc..e0b914c 100644 > --- a/src/gallium/drivers/radeon/r600_pipe_common.c > +++ b/src/gallium/drivers/radeon/r600_pipe_common.c > @@ -755,6 +755,7 @@ static const char* r600_get_chip_name(struct > r600_common_screen *rscreen) > case CHIP_FIJI: return "AMD FIJI"; > case CHIP_POLARIS10: return "AMD POLARIS10"; > case CHIP_POLARIS11: return "AMD POLARIS11"; > + case CHIP_POLARIS12: return "AMD POLARIS12"; > case CHIP_STONEY: return "AMD STONEY"; > default: return "AMD unknown"; > } > @@ -889,9 +890,11 @@ const char *r600_get_llvm_processor_name(enum > radeon_family family) > #if HAVE_LLVM <= 0x0308 > case CHIP_POLARIS10: return "tonga"; > case CHIP_POLARIS11: return "tonga"; > + case CHIP_POLARIS12: return "tonga"; > #else > case CHIP_POLARIS10: return "polaris10"; > case CHIP_POLARIS11: return "polaris11"; > + case CHIP_POLARIS12: return "polaris11"; > #endif > default: return ""; > } > diff --git a/src/gallium/drivers/radeon/radeon_vce.c > b/src/gallium/drivers/radeon/radeon_vce.c > index aad2ec1..dcd56ea 100644 > --- a/src/gallium/drivers/radeon/radeon_vce.c > +++ b/src/gallium/drivers/radeon/radeon_vce.c > @@ -413,7 +413,8 @@ struct pipe_video_codec *rvce_create_encoder(struct > pipe_context *context, > enc->use_vui = true; > if (rscreen->info.family >= CHIP_TONGA && > rscreen->info.family != CHIP_STONEY && > - rscreen->info.family != CHIP_P
Re: [Mesa-dev] [PATCH 1/2] radeonsi: add Polaris12 support (v3)
On Tue, Dec 20, 2016 at 6:49 AM, Andreas Boll wrote: > 2016-12-19 23:45 GMT+01:00 Alex Deucher : >> From: Junwei Zhang >> >> v2: use gfxip names for llvm 4.0+ >> v3: use tonga for llvm <= 3.8 >> >> Signed-off-by: Junwei Zhang >> Reviewed-by: Nicolai Hähnle >> Acked-by: Christian König >> --- > > snip > >> diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c >> b/src/gallium/drivers/radeon/r600_pipe_common.c >> index 0b5c6dc..e0b914c 100644 >> --- a/src/gallium/drivers/radeon/r600_pipe_common.c >> +++ b/src/gallium/drivers/radeon/r600_pipe_common.c >> @@ -755,6 +755,7 @@ static const char* r600_get_chip_name(struct >> r600_common_screen *rscreen) >> case CHIP_FIJI: return "AMD FIJI"; >> case CHIP_POLARIS10: return "AMD POLARIS10"; >> case CHIP_POLARIS11: return "AMD POLARIS11"; >> + case CHIP_POLARIS12: return "AMD POLARIS12"; >> case CHIP_STONEY: return "AMD STONEY"; >> default: return "AMD unknown"; >> } >> @@ -889,9 +890,11 @@ const char *r600_get_llvm_processor_name(enum >> radeon_family family) >> #if HAVE_LLVM <= 0x0308 >> case CHIP_POLARIS10: return "tonga"; >> case CHIP_POLARIS11: return "tonga"; >> + case CHIP_POLARIS12: return "tonga"; >> #else >> case CHIP_POLARIS10: return "polaris10"; >> case CHIP_POLARIS11: return "polaris11"; >> + case CHIP_POLARIS12: return "polaris11"; >> #endif > > You've dropped the processor name for LLVM 4.0+. > I guess that wasn't intended. That was intended. It didn't seem worth adding all of the additional special cases. If/when we convert the other asics to use gfxip names, we can convert polaris12 as well. Alex > Something like this should work: > > #if HAVE_LLVM <= 0x0308 > // return processor names for LLVM <= 3.8 > #elif HAVE_LLVM == 0x0309 > // return processor names for LLVM 3.9 > #else > // return processor names for LLVM > 3.9 > #endif > > Andreas > >> default: return ""; >> } ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/2] radeonsi: add Polaris12 support (v3)
2016-12-19 23:45 GMT+01:00 Alex Deucher : > From: Junwei Zhang > > v2: use gfxip names for llvm 4.0+ > v3: use tonga for llvm <= 3.8 > > Signed-off-by: Junwei Zhang > Reviewed-by: Nicolai Hähnle > Acked-by: Christian König > --- snip > diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c > b/src/gallium/drivers/radeon/r600_pipe_common.c > index 0b5c6dc..e0b914c 100644 > --- a/src/gallium/drivers/radeon/r600_pipe_common.c > +++ b/src/gallium/drivers/radeon/r600_pipe_common.c > @@ -755,6 +755,7 @@ static const char* r600_get_chip_name(struct > r600_common_screen *rscreen) > case CHIP_FIJI: return "AMD FIJI"; > case CHIP_POLARIS10: return "AMD POLARIS10"; > case CHIP_POLARIS11: return "AMD POLARIS11"; > + case CHIP_POLARIS12: return "AMD POLARIS12"; > case CHIP_STONEY: return "AMD STONEY"; > default: return "AMD unknown"; > } > @@ -889,9 +890,11 @@ const char *r600_get_llvm_processor_name(enum > radeon_family family) > #if HAVE_LLVM <= 0x0308 > case CHIP_POLARIS10: return "tonga"; > case CHIP_POLARIS11: return "tonga"; > + case CHIP_POLARIS12: return "tonga"; > #else > case CHIP_POLARIS10: return "polaris10"; > case CHIP_POLARIS11: return "polaris11"; > + case CHIP_POLARIS12: return "polaris11"; > #endif You've dropped the processor name for LLVM 4.0+. I guess that wasn't intended. Something like this should work: #if HAVE_LLVM <= 0x0308 // return processor names for LLVM <= 3.8 #elif HAVE_LLVM == 0x0309 // return processor names for LLVM 3.9 #else // return processor names for LLVM > 3.9 #endif Andreas > default: return ""; > } ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/2] radeonsi: add Polaris12 support (v3)
From: Junwei Zhang v2: use gfxip names for llvm 4.0+ v3: use tonga for llvm <= 3.8 Signed-off-by: Junwei Zhang Reviewed-by: Nicolai Hähnle Acked-by: Christian König --- src/amd/addrlib/r800/ciaddrlib.cpp| 3 ++- src/amd/addrlib/r800/ciaddrlib.h | 1 + src/amd/common/amd_family.h | 1 + src/amd/common/amdgpu_id.h| 4 src/gallium/drivers/radeon/r600_pipe_common.c | 3 +++ src/gallium/drivers/radeon/radeon_vce.c | 3 ++- src/gallium/drivers/radeonsi/si_pipe.c| 1 + src/gallium/drivers/radeonsi/si_state.c | 1 + src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 4 9 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/amd/addrlib/r800/ciaddrlib.cpp b/src/amd/addrlib/r800/ciaddrlib.cpp index 7c5d29a..c726c4d 100644 --- a/src/amd/addrlib/r800/ciaddrlib.cpp +++ b/src/amd/addrlib/r800/ciaddrlib.cpp @@ -353,6 +353,7 @@ AddrChipFamily CIAddrLib::HwlConvertChipFamily( m_settings.isFiji= ASICREV_IS_FIJI_P(uChipRevision); m_settings.isPolaris10 = ASICREV_IS_POLARIS10_P(uChipRevision); m_settings.isPolaris11 = ASICREV_IS_POLARIS11_M(uChipRevision); +m_settings.isPolaris12 = ASICREV_IS_POLARIS12_V(uChipRevision); break; case FAMILY_CZ: m_settings.isCarrizo = 1; @@ -417,7 +418,7 @@ BOOL_32 CIAddrLib::HwlInitGlobalParams( { m_pipes = 16; } -else if (m_settings.isPolaris11) +else if (m_settings.isPolaris11 || m_settings.isPolaris12) { m_pipes = 4; } diff --git a/src/amd/addrlib/r800/ciaddrlib.h b/src/amd/addrlib/r800/ciaddrlib.h index de995fa..2c9a4cc 100644 --- a/src/amd/addrlib/r800/ciaddrlib.h +++ b/src/amd/addrlib/r800/ciaddrlib.h @@ -62,6 +62,7 @@ struct CIChipSettings UINT_32 isFiji: 1; UINT_32 isPolaris10 : 1; UINT_32 isPolaris11 : 1; +UINT_32 isPolaris12 : 1; // VI fusion (Carrizo) UINT_32 isCarrizo : 1; }; diff --git a/src/amd/common/amd_family.h b/src/amd/common/amd_family.h index 6a713ad..b09bbb8 100644 --- a/src/amd/common/amd_family.h +++ b/src/amd/common/amd_family.h @@ -91,6 +91,7 @@ enum radeon_family { CHIP_STONEY, CHIP_POLARIS10, CHIP_POLARIS11, +CHIP_POLARIS12, CHIP_LAST, }; diff --git a/src/amd/common/amdgpu_id.h b/src/amd/common/amdgpu_id.h index f91df55..1683a5a 100644 --- a/src/amd/common/amdgpu_id.h +++ b/src/amd/common/amdgpu_id.h @@ -142,6 +142,8 @@ enum { VI_POLARIS11_M_A0 = 90, + VI_POLARIS12_V_A0 = 100, + VI_UNKNOWN= 0xFF }; @@ -156,6 +158,8 @@ enum { ((eChipRev >= VI_POLARIS10_P_A0) && (eChipRev < VI_POLARIS11_M_A0)) #define ASICREV_IS_POLARIS11_M(eChipRev) \ (eChipRev >= VI_POLARIS11_M_A0) +#define ASICREV_IS_POLARIS12_V(eChipRev)\ + (eChipRev >= VI_POLARIS12_V_A0) /* CZ specific rev IDs */ enum { diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index 0b5c6dc..e0b914c 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -755,6 +755,7 @@ static const char* r600_get_chip_name(struct r600_common_screen *rscreen) case CHIP_FIJI: return "AMD FIJI"; case CHIP_POLARIS10: return "AMD POLARIS10"; case CHIP_POLARIS11: return "AMD POLARIS11"; + case CHIP_POLARIS12: return "AMD POLARIS12"; case CHIP_STONEY: return "AMD STONEY"; default: return "AMD unknown"; } @@ -889,9 +890,11 @@ const char *r600_get_llvm_processor_name(enum radeon_family family) #if HAVE_LLVM <= 0x0308 case CHIP_POLARIS10: return "tonga"; case CHIP_POLARIS11: return "tonga"; + case CHIP_POLARIS12: return "tonga"; #else case CHIP_POLARIS10: return "polaris10"; case CHIP_POLARIS11: return "polaris11"; + case CHIP_POLARIS12: return "polaris11"; #endif default: return ""; } diff --git a/src/gallium/drivers/radeon/radeon_vce.c b/src/gallium/drivers/radeon/radeon_vce.c index aad2ec1..dcd56ea 100644 --- a/src/gallium/drivers/radeon/radeon_vce.c +++ b/src/gallium/drivers/radeon/radeon_vce.c @@ -413,7 +413,8 @@ struct pipe_video_codec *rvce_create_encoder(struct pipe_context *context, enc->use_vui = true; if (rscreen->info.family >= CHIP_TONGA && rscreen->info.family != CHIP_STONEY && - rscreen->info.family != CHIP_POLARIS11) + rscreen->info.family != CHIP_POLARIS11 && + rscreen->info.family != CHIP_POLARIS12) enc->dual_pipe = true; /* TODO enable B frame with dual instance */ if ((rscreen->info.family >= CHIP_TONGA) && diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 88685f9..11cca6f 100644 --- a/