aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c
diff options
context:
space:
mode:
authorHarry Wentland <harry.wentland@amd.com>2019-02-22 09:59:43 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-06-21 18:59:34 -0500
commit728c06986a4f386c7ec5e5170716e30b610c6d32 (patch)
treee105015beed5de647c94c79d09d4f181e724f24c /drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c
parentdrm/amd/display: Add DCN2 IRQ handling (diff)
downloadwireguard-linux-728c06986a4f386c7ec5e5170716e30b610c6d32.tar.xz
wireguard-linux-728c06986a4f386c7ec5e5170716e30b610c6d32.zip
drm/amd/display: Add DCN2 changes to DML
Update DML (Display Mode Lib) to support DCN2 Signed-off-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c b/drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c
index 80ffd7d958b2..91810c7d5cf5 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c
@@ -25,6 +25,19 @@
#include "display_mode_lib.h"
#include "dc_features.h"
+#if defined(CONFIG_DRM_AMD_DC_DCN2_0)
+#include "dcn20/display_mode_vba_20.h"
+#include "dcn20/display_rq_dlg_calc_20.h"
+#endif
+
+#if defined(CONFIG_DRM_AMD_DC_DCN2_0)
+const struct dml_funcs dml20_funcs = {
+ .validate = dml20_ModeSupportAndSystemConfigurationFull,
+ .recalculate = dml20_recalculate,
+ .rq_dlg_get_dlg_reg = dml20_rq_dlg_get_dlg_reg,
+ .rq_dlg_get_rq_reg = dml20_rq_dlg_get_rq_reg
+};
+#endif
void dml_init_instance(struct display_mode_lib *lib,
const struct _vcs_dpi_soc_bounding_box_st *soc_bb,
@@ -34,6 +47,15 @@ void dml_init_instance(struct display_mode_lib *lib,
lib->soc = *soc_bb;
lib->ip = *ip_params;
lib->project = project;
+ switch (project) {
+#ifdef CONFIG_DRM_AMD_DC_DCN2_0
+ case DML_PROJECT_NAVI10:
+ lib->funcs = dml20_funcs;
+ break;
+#endif
+ default:
+ break;
+ }
}
const char *dml_get_status_message(enum dm_validation_status status)