Skip to contentSkip to conversation

Revert "drm/amd/display: Introduce DML2"

PATCH In review Qingqing Zhuo 2 participants 2 messages Sep 20, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "drm/amd/display: Introduce DML2"

This reverts commit 50003b5aa5f55677c7d4634eea755958ba6baa58.

[Why & How]
Revert to unblock arm and ppc compilation issues.

---
 drivers/gpu/drm/amd/display/dc/Makefile       |     1 -
 drivers/gpu/drm/amd/display/dc/core/dc.c      |    27 -
 .../gpu/drm/amd/display/dc/core/dc_resource.c |    16 -
 drivers/gpu/drm/amd/display/dc/dc.h           |     5 -
 .../drm/amd/display/dc/dcn32/dcn32_resource.c |    61 +-
 .../amd/display/dc/dcn321/dcn321_resource.c   |    41 -
 .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c  |    80 -
 .../amd/display/dc/dml/dcn321/dcn321_fpu.c    |    81 -
 drivers/gpu/drm/amd/display/dc/dml2/Makefile  |    70 -
 .../gpu/drm/amd/display/dc/dml2/cmntypes.h    |    92 -
 .../amd/display/dc/dml2/display_mode_core.c   | 10275 ----------------
 .../amd/display/dc/dml2/display_mode_core.h   |   199 -
 .../dc/dml2/display_mode_core_structs.h       |  1968 ---
 .../dc/dml2/display_mode_lib_defines.h        |    75 -
 .../amd/display/dc/dml2/display_mode_util.c   |   796 --
 .../amd/display/dc/dml2/display_mode_util.h   |    74 -
 .../display/dc/dml2/dml2_dc_resource_mgmt.c   |   734 --
 .../display/dc/dml2/dml2_dc_resource_mgmt.h   |    48 -
 .../drm/amd/display/dc/dml2/dml2_dc_types.h   |    40 -
 .../amd/display/dc/dml2/dml2_internal_types.h |   121 -
 .../amd/display/dc/dml2/dml2_mall_phantom.c   |   913 --
 .../amd/display/dc/dml2/dml2_mall_phantom.h   |    50 -
 .../gpu/drm/amd/display/dc/dml2/dml2_policy.c |   311 -
 .../gpu/drm/amd/display/dc/dml2/dml2_policy.h |    47 -
 .../display/dc/dml2/dml2_translation_helper.c |  1109 --
 .../display/dc/dml2/dml2_translation_helper.h |    39 -
 .../gpu/drm/amd/display/dc/dml2/dml2_utils.c  |   452 -
 .../gpu/drm/amd/display/dc/dml2/dml2_utils.h  |   143 -
 .../drm/amd/display/dc/dml2/dml2_wrapper.c    |   730 --
 .../drm/amd/display/dc/dml2/dml2_wrapper.h    |   210 -
 .../gpu/drm/amd/display/dc/dml2/dml_assert.h  |    30 -
 .../drm/amd/display/dc/dml2/dml_depedencies.h |    31 -
 .../display/dc/dml2/dml_display_rq_dlg_calc.c |   585 -
 .../display/dc/dml2/dml_display_rq_dlg_calc.h |    63 -
 .../gpu/drm/amd/display/dc/dml2/dml_logging.h |    29 -
 .../gpu/drm/amd/display/dc/inc/core_types.h   |     1 -
 36 files changed, 3 insertions(+), 19544 deletions(-)
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/Makefile
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/cmntypes.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/display_mode_core_structs.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/display_mode_lib_defines.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_types.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_internal_types.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_mall_phantom.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_mall_phantom.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_policy.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_policy.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml_assert.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml_depedencies.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml_display_rq_dlg_calc.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml_display_rq_dlg_calc.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml_logging.h
drivers/gpu/drm/amd/display/dc/Makefile +0 -1
index 81b4d372d1cd..2f3d9602b7a0 100644
@@ -57,7 +57,6 @@ DC_LIBS += dce60
 endif
 
 DC_LIBS += hdcp
-DC_LIBS += dml2
 
 AMD_DC = $(addsuffix /Makefile, $(addprefix $(FULL_AMD_DISPLAY_PATH)/dc/,$(DC_LIBS)))
 
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -27
index 5e393ae7eb62..f91d0f6b0d7d 100644
@@ -75,8 +75,6 @@
 
 #include "hw_sequencer_private.h"
 
-#include "dml2/dml2_internal_types.h"
-
 #include "dce/dmub_outbox.h"
 
 #define CTX \
@@ -2222,10 +2220,6 @@ struct dc_state *dc_create_state(struct dc *dc)
 	if (!context)
 		return NULL;
 
-	if (dc->debug.using_dml2) {
-		dml2_create(dc, &dc->dml2_options, &context->bw_ctx.dml2);
-	}
-
 	init_state(dc, context);
 
 	kref_init(&context->refcount);
@@ -2238,21 +2232,10 @@ struct dc_state *dc_copy_state(struct dc_state *src_ctx)
 	int i, j;
 	struct dc_state *new_ctx = kvmalloc(sizeof(struct dc_state), GFP_KERNEL);
 
-	struct dml2_context *dml2 =  NULL;
-
 	if (!new_ctx)
 		return NULL;
 	memcpy(new_ctx, src_ctx, sizeof(struct dc_state));
 
-	if (new_ctx->bw_ctx.dml2) {
-		dml2 = kzalloc(sizeof(struct dml2_context), GFP_KERNEL);
-		if (!dml2)
-			return NULL;
-
-		memcpy(dml2, src_ctx->bw_ctx.dml2, sizeof(struct dml2_context));
-		new_ctx->bw_ctx.dml2 = dml2;
-	}
-
 	for (i = 0; i < MAX_PIPES; i++) {
 			struct pipe_ctx *cur_pipe = &new_ctx->res_ctx.pipe_ctx[i];
 
@@ -2291,10 +2274,6 @@ static void dc_state_free(struct kref *kref)
 {
 	struct dc_state *context = container_of(kref, struct dc_state, refcount);
 	dc_resource_state_destruct(context);
-
-	dml2_destroy(context->bw_ctx.dml2);
-	context->bw_ctx.dml2 = 0;
-
 	kvfree(context);
 }
 
@@ -4630,7 +4609,6 @@ void dc_set_power_state(
 {
 	struct kref refcount;
 	struct display_mode_lib *dml;
-	struct dml2_context *dml2 = NULL;
 
 	if (!dc->current_state)
 		return;
@@ -4650,8 +4628,6 @@ void dc_set_power_state(
 
 		break;
 	default:
-		if (dc->debug.using_dml2)
-			dml2 = dc->current_state->bw_ctx.dml2;
 		ASSERT(dc->current_state->stream_count == 0);
 		/* Zero out the current context so that on resume we start with
 		 * clean state, and dc hw programming optimizations will not
@@ -4678,9 +4654,6 @@ void dc_set_power_state(
 
 		kfree(dml);
 
-		if (dc->debug.using_dml2)
-			dc->current_state->bw_ctx.dml2 = dml2;
-
 		break;
 	}
 }
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +0 -16
index a93db60fe4d9..5810cf78cf29 100644
@@ -41,7 +41,6 @@
 #include "dpcd_defs.h"
 #include "link_enc_cfg.h"
 #include "link.h"
-#include "clk_mgr.h"
 #include "virtual/virtual_link_hwss.h"
 #include "link/hwss/link_hwss_dio.h"
 #include "link/hwss/link_hwss_dpia.h"
@@ -85,8 +84,6 @@
 
 #define DC_LOGGER_INIT(logger)
 
-#include "dml2/dml2_wrapper.h"
-
 #define UNABLE_TO_SPLIT -1
 
 enum dce_version resource_parse_asic_id(struct hw_asic_id asic_id)
@@ -319,10 +316,6 @@ struct resource_pool *dc_create_resource_pool(struct dc  *dc,
 				res_pool->ref_clocks.xtalin_clock_inKhz;
 			res_pool->ref_clocks.dchub_ref_clock_inKhz =
 				res_pool->ref_clocks.xtalin_clock_inKhz;
-			if ((res_pool->hubbub->funcs->get_dchub_ref_freq))
-				res_pool->hubbub->funcs->get_dchub_ref_freq(res_pool->hubbub,
-					res_pool->ref_clocks.dccg_ref_clock_inKhz,
-					&res_pool->ref_clocks.dchub_ref_clock_inKhz);
 		} else
 			ASSERT_CRITICAL(false);
 	}
@@ -4317,18 +4310,9 @@ void dc_resource_state_copy_construct(
 {
 	int i, j;
 	struct kref refcount = dst_ctx->refcount;
-	struct dml2_context *dml2 = NULL;
-
-	// Need to preserve allocated dml2 context
-	if (src_ctx->clk_mgr->ctx->dc->debug.using_dml2)
-		dml2 = dst_ctx->bw_ctx.dml2;
 
 	*dst_ctx = *src_ctx;
 
-	// Preserve allocated dml2 context
-	if (src_ctx->clk_mgr->ctx->dc->debug.using_dml2)
-		dst_ctx->bw_ctx.dml2 = dml2;
-
 	for (i = 0; i < MAX_PIPES; i++) {
 		struct pipe_ctx *cur_pipe = &dst_ctx->res_ctx.pipe_ctx[i];
 
drivers/gpu/drm/amd/display/dc/dc.h +0 -5
index 056b82e83cad..fd5040966ba0 100644
@@ -40,8 +40,6 @@
 #include "inc/hw/dmcu.h"
 #include "dml/display_mode_lib.h"
 
-#include "dml2/dml2_wrapper.h"
-
 struct abm_save_restore;
 
 /* forward declaration */
@@ -938,7 +936,6 @@ struct dc_debug_options {
 	bool dml_disallow_alternate_prefetch_modes;
 	bool use_legacy_soc_bb_mechanism;
 	bool exit_idle_opt_for_cursor_updates;
-	bool using_dml2;
 	bool enable_single_display_2to1_odm_policy;
 	bool enable_double_buffered_dsc_pg_support;
 	bool enable_dp_dig_pixel_rate_div_policy;
@@ -1044,8 +1041,6 @@ struct dc {
 			struct _vcs_dpi_voltage_scaling_st clock_limits[DC__VOLTAGE_STATES];
 		} update_bw_bounding_box;
 	} scratch;
-
-	struct dml2_configuration_options dml2_options;
 };
 
 enum frame_buffer_mode {
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c +3 -58

91 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c +0 -41

47 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c +0 -80

148 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c +0 -81

148 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/Makefile deleted +0 -70

70 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/cmntypes.h deleted +0 -92

92 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c deleted +0 -10275

2,258 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.h deleted +0 -199

199 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/display_mode_core_structs.h deleted +0 -1968

1,968 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/display_mode_lib_defines.h deleted +0 -75

75 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c deleted +0 -796

796 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.h deleted +0 -74

74 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c deleted +0 -734

734 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.h deleted +0 -48

48 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_types.h deleted +0 -40
deleted file mode 100644
index 191b2e63ce6e..000000000000

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/dml2/dml2_internal_types.h deleted +0 -121

121 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_mall_phantom.c deleted +0 -913

913 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_mall_phantom.h deleted +0 -50

50 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_policy.c deleted +0 -311

311 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_policy.h deleted +0 -47

47 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c deleted +0 -1109

1,109 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.h deleted +0 -39
deleted file mode 100644
index 1bcfca51e665..000000000000

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c deleted +0 -452

452 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.h deleted +0 -143

143 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c deleted +0 -730

730 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.h deleted +0 -210

210 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml_assert.h deleted +0 -30
deleted file mode 100644
index b5e463aa61af..000000000000

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/dml2/dml_depedencies.h deleted +0 -31
deleted file mode 100644
index d8c7f7497e9c..000000000000

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/dml2/dml_display_rq_dlg_calc.c deleted +0 -585

585 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml_display_rq_dlg_calc.h deleted +0 -63

63 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml_logging.h deleted +0 -29
deleted file mode 100644
index 890c0a072012..000000000000

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/inc/core_types.h +0 -1
index 83795d3c844d..9f41e8d15065 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.34.1

Part of the diff is not shown here. View the raw message.