[PATCH 316/459] drm/amd/display: Add DCN2 and NV ASIC ID
Alex Deucher
alexdeucher at gmail.com
Mon Jun 17 19:44:17 UTC 2019
From: Harry Wentland <harry.wentland at amd.com>
DCN2.0 (Display Core Next) is the display block in Navi10.
Signed-off-by: Harry Wentland <harry.wentland at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
.../gpu/drm/amd/display/include/dal_asic_id.h | 25 +++++++++++++++++++
.../gpu/drm/amd/display/include/dal_types.h | 3 +++
2 files changed, 28 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/include/dal_asic_id.h b/drivers/gpu/drm/amd/display/include/dal_asic_id.h
index b302ff3180a4..5ce1832ab41f 100644
--- a/drivers/gpu/drm/amd/display/include/dal_asic_id.h
+++ b/drivers/gpu/drm/amd/display/include/dal_asic_id.h
@@ -147,6 +147,31 @@
#define FAMILY_RV 142 /* DCN 1*/
+#if defined(CONFIG_DRM_AMD_DC_DCN2_0)
+
+#define FAMILY_NV 143 /* DCN 2*/
+
+enum {
+ NV_NAVI10_P_A0 = 1,
+ NV_NAVI12_P_A0 = 10,
+ NV_NAVI14_M_A0 = 20,
+ NV_NAVI21_P_A0 = 40,
+ NV_NAVI10_LITE_P_A0 = 0x80,
+ NV_NAVI10_LITE_P_B0 = 0x81,
+ NV_NAVI12_LITE_P_A0 = 0x82,
+ NV_NAVI21_LITE_P_A0 = 0x90,
+ NV_UNKNOWN = 0xFF
+};
+
+#define ASICREV_IS_NAVI10_P(eChipRev) (eChipRev < NV_NAVI12_P_A0)
+#define ASICREV_IS_NAVI12_P(eChipRev) ((eChipRev >= NV_NAVI12_P_A0) && (eChipRev < NV_NAVI14_M_A0))
+#define ASICREV_IS_NAVI14_M(eChipRev) ((eChipRev >= NV_NAVI14_M_A0) && (eChipRev < NV_NAVI21_P_A0))
+#define ASICREV_IS_NAVI21_M(eChipRev) ((eChipRev >= NV_NAVI21_P_A0) && (eChipRev < NV_NAVI10_LITE_P_A0))
+#define ASICREV_IS_NAVI10_LITE_P(eChipRev) ((eChipRev >= NV_NAVI10_LITE_P_A0) && (eChipRev < NV_NAVI12_LITE_P_A0))
+#define ASICREV_IS_NAVI12_LITE_P(eChipRev) ((eChipRev >= NV_NAVI12_LITE_P_A0) && (eChipRev < NV_NAVI21_LITE_P_A0))
+#define ASICREV_IS_NAVI21_LITE_P(eChipRev) ((eChipRev >= NV_NAVI21_LITE_P_A0) && (eChipRev < NV_UNKNOWN))
+#endif
+
/*
* ASIC chip ID
*/
diff --git a/drivers/gpu/drm/amd/display/include/dal_types.h b/drivers/gpu/drm/amd/display/include/dal_types.h
index dabdbc0999d4..1e3ce4d847ae 100644
--- a/drivers/gpu/drm/amd/display/include/dal_types.h
+++ b/drivers/gpu/drm/amd/display/include/dal_types.h
@@ -46,6 +46,9 @@ enum dce_version {
DCE_VERSION_MAX,
DCN_VERSION_1_0,
DCN_VERSION_1_01,
+#if defined(CONFIG_DRM_AMD_DC_DCN2_0)
+ DCN_VERSION_2_0,
+#endif
DCN_VERSION_MAX
};
--
2.20.1
More information about the amd-gfx
mailing list