From 528a6ff5992e6710921d6e4157a8a51884bc277f Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Tue, 7 Jul 2015 22:18:13 -0400 Subject: [PATCH] winsys/amdgpu: add addrlib support for Fiji (v2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit v2: fix tonga chip check Reviewed-by: Marek Olšák Reviewed-by: Christian König Reviewed-by: David Zhang Signed-off-by: Alex Deucher --- src/gallium/winsys/amdgpu/drm/addrlib/r800/ciaddrlib.cpp | 5 +++++ src/gallium/winsys/amdgpu/drm/addrlib/r800/ciaddrlib.h | 1 + src/gallium/winsys/amdgpu/drm/amdgpu_id.h | 6 +++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gallium/winsys/amdgpu/drm/addrlib/r800/ciaddrlib.cpp b/src/gallium/winsys/amdgpu/drm/addrlib/r800/ciaddrlib.cpp index 264e2efb8b2..7393953c120 100644 --- a/src/gallium/winsys/amdgpu/drm/addrlib/r800/ciaddrlib.cpp +++ b/src/gallium/winsys/amdgpu/drm/addrlib/r800/ciaddrlib.cpp @@ -350,6 +350,7 @@ AddrChipFamily CIAddrLib::HwlConvertChipFamily( m_settings.isVolcanicIslands = 1; m_settings.isIceland = ASICREV_IS_ICELAND_M(uChipRevision); m_settings.isTonga = ASICREV_IS_TONGA_P(uChipRevision); + m_settings.isFiji = ASICREV_IS_FIJI_P(uChipRevision); break; case FAMILY_CZ: m_settings.isCarrizo = 1; @@ -410,6 +411,10 @@ BOOL_32 CIAddrLib::HwlInitGlobalParams( { m_pipes = 2; } + else if (m_settings.isFiji) + { + m_pipes = 16; + } if (valid) { diff --git a/src/gallium/winsys/amdgpu/drm/addrlib/r800/ciaddrlib.h b/src/gallium/winsys/amdgpu/drm/addrlib/r800/ciaddrlib.h index 0220736c7bc..451508619f9 100644 --- a/src/gallium/winsys/amdgpu/drm/addrlib/r800/ciaddrlib.h +++ b/src/gallium/winsys/amdgpu/drm/addrlib/r800/ciaddrlib.h @@ -59,6 +59,7 @@ struct CIChipSettings UINT_32 isVolcanicIslands : 1; UINT_32 isIceland : 1; UINT_32 isTonga : 1; + UINT_32 isFiji : 1; // VI fusion (Carrizo) UINT_32 isCarrizo : 1; }; diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_id.h b/src/gallium/winsys/amdgpu/drm/amdgpu_id.h index 08a1591496e..8882c418e12 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_id.h +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_id.h @@ -136,6 +136,8 @@ enum { VI_TONGA_P_A0 = 20, VI_TONGA_P_A1 = 21, + VI_FIJI_P_A0 = 60, + VI_UNKNOWN = 0xFF }; @@ -143,7 +145,9 @@ enum { #define ASICREV_IS_ICELAND_M(eChipRev) \ (eChipRev < VI_TONGA_P_A0) #define ASICREV_IS_TONGA_P(eChipRev) \ - (eChipRev >= VI_TONGA_P_A0) + ((eChipRev >= VI_TONGA_P_A0) && (eChipRev < VI_FIJI_P_A0)) +#define ASICREV_IS_FIJI_P(eChipRev) \ + (eChipRev >= VI_FIJI_P_A0) /* CZ specific rev IDs */ enum { -- 2.30.2