winsys/amdgpu: add addrlib support for Fiji (v2)
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 8 Jul 2015 02:18:13 +0000 (22:18 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 14 Aug 2015 13:02:29 +0000 (15:02 +0200)
v2: fix tonga chip check

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: David Zhang <david1.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/winsys/amdgpu/drm/addrlib/r800/ciaddrlib.cpp
src/gallium/winsys/amdgpu/drm/addrlib/r800/ciaddrlib.h
src/gallium/winsys/amdgpu/drm/amdgpu_id.h

index 264e2efb8b258eacc7547553005eea4dcc43e16c..7393953c120ae394a62787f223652bc8f2159a3e 100644 (file)
@@ -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)
     {
index 0220736c7bcbabee9534d8faef260ad208ebd450..451508619f96757d2ce645b299bfa4d32562801d 100644 (file)
@@ -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;
     };
index 08a1591496ebe523a9f4e832769165bc58009a06..8882c418e12aa754bb1be6b547bfe5db768af792 100644 (file)
@@ -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 {