summaryrefslogtreecommitdiff
path: root/src/amd/addrlib
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2017-02-27 22:25:43 +0100
committerMarek Olšák <marek.olsak@amd.com>2017-05-15 13:00:26 +0200
commitefdb378c3688b897bdbec11218cdc9ee5e801bbd (patch)
tree431f1cde2fc8413f5cf1acf83922074ec88650b4 /src/amd/addrlib
parentc98f03c6ebaca82c265b2f3242aed5c6a3c5dcd8 (diff)
amd/addrlib: import Raven support
Cc: 17.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Diffstat (limited to 'src/amd/addrlib')
-rw-r--r--src/amd/addrlib/gfx9/gfx9addrlib.cpp57
-rw-r--r--src/amd/addrlib/gfx9/gfx9addrlib.h8
2 files changed, 62 insertions, 3 deletions
diff --git a/src/amd/addrlib/gfx9/gfx9addrlib.cpp b/src/amd/addrlib/gfx9/gfx9addrlib.cpp
index 96b05de3df..9b2537151a 100644
--- a/src/amd/addrlib/gfx9/gfx9addrlib.cpp
+++ b/src/amd/addrlib/gfx9/gfx9addrlib.cpp
@@ -1193,6 +1193,20 @@ ChipFamily Gfx9Lib::HwlConvertChipFamily(
m_settings.depthPipeXorDisable = 1;
break;
+ case FAMILY_RV:
+ m_settings.isArcticIsland = 1;
+ m_settings.isRaven = ASICREV_IS_RAVEN(uChipRevision);
+
+ if (m_settings.isRaven)
+ {
+ m_settings.isDcn1 = 1;
+ }
+
+ m_settings.metaBaseAlignFix = 1;
+
+ m_settings.depthPipeXorDisable = 1;
+ break;
+
default:
ADDR_ASSERT(!"This should be a Fusion");
break;
@@ -2734,6 +2748,35 @@ BOOL_32 Gfx9Lib::IsValidDisplaySwizzleMode(
break;
}
}
+ else if (m_settings.isDcn1)
+ {
+ switch (swizzleMode)
+ {
+ case ADDR_SW_4KB_D:
+ case ADDR_SW_64KB_D:
+ case ADDR_SW_VAR_D:
+ case ADDR_SW_64KB_D_T:
+ case ADDR_SW_4KB_D_X:
+ case ADDR_SW_64KB_D_X:
+ case ADDR_SW_VAR_D_X:
+ support = (pIn->bpp == 64);
+ break;
+
+ case ADDR_SW_LINEAR:
+ case ADDR_SW_4KB_S:
+ case ADDR_SW_64KB_S:
+ case ADDR_SW_VAR_S:
+ case ADDR_SW_64KB_S_T:
+ case ADDR_SW_4KB_S_X:
+ case ADDR_SW_64KB_S_X:
+ case ADDR_SW_VAR_S_X:
+ support = (pIn->bpp <= 64);
+ break;
+
+ default:
+ break;
+ }
+ }
else
{
ADDR_NOT_IMPLEMENTED();
@@ -3195,6 +3238,20 @@ ADDR_E_RETURNCODE Gfx9Lib::HwlGetPreferredSurfaceSetting(
// DCE12 does not support display surface to be _T swizzle mode
prtXor = FALSE;
}
+ else if (m_settings.isDcn1)
+ {
+ // _R is not supported by Dcn1
+ if (pIn->bpp == 64)
+ {
+ swType = ADDR_SW_D;
+ }
+ else
+ {
+ swType = ADDR_SW_S;
+ }
+
+ blockSet.micro = FALSE;
+ }
else
{
ADDR_NOT_IMPLEMENTED();
diff --git a/src/amd/addrlib/gfx9/gfx9addrlib.h b/src/amd/addrlib/gfx9/gfx9addrlib.h
index 73d51f1ef7..96236103d0 100644
--- a/src/amd/addrlib/gfx9/gfx9addrlib.h
+++ b/src/amd/addrlib/gfx9/gfx9addrlib.h
@@ -54,11 +54,13 @@ struct Gfx9ChipSettings
// Asic/Generation name
UINT_32 isArcticIsland : 1;
UINT_32 isVega10 : 1;
- UINT_32 reserved0 : 30;
+ UINT_32 isRaven : 1;
+ UINT_32 reserved0 : 29;
// Display engine IP version name
UINT_32 isDce12 : 1;
- UINT_32 reserved1 : 31;
+ UINT_32 isDcn1 : 1;
+ UINT_32 reserved1 : 29;
// Misc configuration bits
UINT_32 metaBaseAlignFix : 1;
@@ -201,7 +203,7 @@ protected:
if (IsXor(swizzleMode))
{
- if (m_settings.isVega10)
+ if (m_settings.isVega10 || m_settings.isRaven)
{
baseAlign = GetBlockSize(swizzleMode);
}