Skip to contentSkip to conversation

DC Patches for 10 Feb 2025

PATCH In review Aurabindo Pillai 3 participants 17 messages Feb 5, 2025 – Feb 10, 2025

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

cover DC Patches for 10 Feb 2025

Summary:
* Start enabling support for 4-plane MPO
* DML21 Updates
* SPL Updates
* Other minor fixes

------------------------------------------------------

Aurabindo Pillai (1):
drm/amd/display: Make dcn401_program_pipe non static

Ausef Yousof (1):
drm/amd/display: limit coverage of optimization skip

Austin Zheng (1):
drm/amd/display: DML21 Reintegration

Brendan Tam (1):
drm/amd/display: add workaround flag to link to force FFE preset

Charlene Liu (1):
drm/amd/display: pass calculated dram_speed_mts to dml2

Ilya Bakoulin (1):
drm/amd/display: Don't try AUX transactions on disconnected link

Leo Zeng (1):
drm/amd/display: add new IRQ enum for underflows

Samson Tam (4):
drm/amd/display: use s1_12 filter tables in SPL
drm/amd/display: remove TF check for LLS policy
drm/amd/display: add s1_12 filter tables
drm/amd/display: sspl: cleanup filter code

Taimur Hassan (1):
drm/amd/display: 3.2.320

Zaeem Mohamed (2):
drm/amd/display: Expose 3 secondary planes for supported ASICs drm/amd/display: docstring definitions MAX_SURFACES and MAX_PLANES

 drivers/gpu/drm/amd/display/dc/dc.h           |    10 +-
 .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c  |     2 +
 .../amd/display/dc/dml/dcn351/dcn351_fpu.c    |     1 +
 .../display/dc/dml2/dml21/inc/dml_top_types.h |     5 -
 .../dml2/dml21/src/dml2_core/dml2_core_dcn4.c |    22 +-
 .../dml2/dml21/src/dml2_core/dml2_core_dcn4.h |     3 -
 .../src/dml2_core/dml2_core_dcn4_calcs.c      |    94 +-
 .../dml21/src/dml2_core/dml2_core_shared.c    | 12413 ----------------
 .../src/dml2_core/dml2_core_shared_types.h    |     9 +-
 .../dml21/src/dml2_core/dml2_core_utils.c     |     3 +-
 .../dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c |     6 +-
 .../dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h |     2 -
 .../dml21/src/dml2_mcg/dml2_mcg_factory.c     |     2 +-
 .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c  |     5 +-
 .../dml21/src/dml2_top/dml2_top_interfaces.c  |     1 -
 .../dc/dml2/dml21/src/dml2_top/dml_top.c      |   354 -
 .../dc/dml2/dml21/src/inc/dml2_debug.c        |     5 -
 .../dc/dml2/dml21/src/inc/dml2_debug.h        |     6 +-
 .../src/inc/dml2_internal_shared_types.h      |     6 -
 .../drm/amd/display/dc/dml2/dml2_wrapper.h    |     1 +
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c |     2 +-
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.h |     4 +
 drivers/gpu/drm/amd/display/dc/irq_types.h    |     1 +
 .../display/dc/link/protocols/link_dp_phy.c   |     8 +-
 .../dc/link/protocols/link_dp_training.c      |     2 +
 .../dc/resource/dcn21/dcn21_resource.c        |     6 +-
 .../dc/resource/dcn35/dcn35_resource.c        |     7 +-
 .../dc/resource/dcn351/dcn351_resource.c      |     7 +-
 .../dc/resource/dcn401/dcn401_resource.c      |    12 +-
 drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c  |    31 +-
 .../display/dc/sspl/dc_spl_isharp_filters.c   |   452 +-
 .../display/dc/sspl/dc_spl_isharp_filters.h   |    18 +-
 .../display/dc/sspl/dc_spl_scl_easf_filters.c |  1058 +-
 .../display/dc/sspl/dc_spl_scl_easf_filters.h |     9 +-
 .../amd/display/dc/sspl/dc_spl_scl_filters.c  |   232 +-
 .../amd/display/dc/sspl/dc_spl_scl_filters.h  |    11 +-
 36 files changed, 1231 insertions(+), 13579 deletions(-)
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml_top.c
Signature · 1 line
2.48.1
#1 lore raw

PATCH 1/14 drm/amd/display: Expose 3 secondary planes for supported ASICs

From: Zaeem Mohamed <[email protected]>

[why]
For enabling 4-plane MPO, we need dc to expose 4 planes for DCN35 and beyond, as well as DCN21

[how]
Set dc_caps.max_slave_*planes to 3 for appropriate ASICs

---
 .../gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c  | 6 +++---
 .../gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c  | 6 +++---
 .../drm/amd/display/dc/resource/dcn351/dcn351_resource.c    | 6 +++---
 .../drm/amd/display/dc/resource/dcn401/dcn401_resource.c    | 6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c +3 -3
index 2615c36d5ffe..4bd5c2278596 100644
@@ -1413,9 +1413,9 @@ static bool dcn21_resource_construct(
 	dc->caps.min_horizontal_blanking_period = 80;
 	dc->caps.dmdata_alloc_size = 2048;
 
-	dc->caps.max_slave_planes = 1;
-	dc->caps.max_slave_yuv_planes = 1;
-	dc->caps.max_slave_rgb_planes = 1;
+	dc->caps.max_slave_planes = 3;
+	dc->caps.max_slave_yuv_planes = 3;
+	dc->caps.max_slave_rgb_planes = 3;
 	dc->caps.post_blend_color_processing = true;
 	dc->caps.force_dp_tps4_for_cp2520 = true;
 	dc->caps.extended_aux_timeout_support = true;
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +3 -3
index 8ee3d99ea2aa..6d163dcecde6 100644
@@ -1839,9 +1839,9 @@ static bool dcn35_resource_construct(
 	dc->caps.max_cursor_size = 256;
 	dc->caps.min_horizontal_blanking_period = 80;
 	dc->caps.dmdata_alloc_size = 2048;
-	dc->caps.max_slave_planes = 2;
-	dc->caps.max_slave_yuv_planes = 2;
-	dc->caps.max_slave_rgb_planes = 2;
+	dc->caps.max_slave_planes = 3;
+	dc->caps.max_slave_yuv_planes = 3;
+	dc->caps.max_slave_rgb_planes = 3;
 	dc->caps.post_blend_color_processing = true;
 	dc->caps.force_dp_tps4_for_cp2520 = true;
 	if (dc->config.forceHBR2CP2520)
drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c +3 -3
index 14f7c3acdc96..4a03df5d760f 100644
@@ -1811,9 +1811,9 @@ static bool dcn351_resource_construct(
 	dc->caps.max_cursor_size = 256;
 	dc->caps.min_horizontal_blanking_period = 80;
 	dc->caps.dmdata_alloc_size = 2048;
-	dc->caps.max_slave_planes = 2;
-	dc->caps.max_slave_yuv_planes = 2;
-	dc->caps.max_slave_rgb_planes = 2;
+	dc->caps.max_slave_planes = 3;
+	dc->caps.max_slave_yuv_planes = 3;
+	dc->caps.max_slave_rgb_planes = 3;
 	dc->caps.post_blend_color_processing = true;
 	dc->caps.force_dp_tps4_for_cp2520 = true;
 	if (dc->config.forceHBR2CP2520)
drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c +3 -3
index 5cb0e0191a16..6ab194a86cb9 100644
@@ -1872,9 +1872,9 @@ static bool dcn401_resource_construct(
 	dc->caps.subvp_vertical_int_margin_us = 30;
 	dc->caps.subvp_drr_vblank_start_margin_us = 100; // 100us margin
 
-	dc->caps.max_slave_planes = 2;
-	dc->caps.max_slave_yuv_planes = 2;
-	dc->caps.max_slave_rgb_planes = 2;
+	dc->caps.max_slave_planes = 3;
+	dc->caps.max_slave_yuv_planes = 3;
+	dc->caps.max_slave_rgb_planes = 3;
 	dc->caps.post_blend_color_processing = true;
 	dc->caps.force_dp_tps4_for_cp2520 = true;
 	dc->caps.dp_hpo = true;
Signature · 1 line
2.48.1
#2 lore raw

PATCH 2/14 drm/amd/display: docstring definitions MAX_SURFACES and MAX_PLANES

In reply to Aurabindo Pillai

From: Zaeem Mohamed <[email protected]>

MAX_SURFACES and MAX_PLANES now have docstrings that better show the difference between the two.

---
 drivers/gpu/drm/amd/display/dc/dc.h | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/display/dc/dc.h +6 -0
index 42ba65e785ca..e1f4f643c364 100644
@@ -55,7 +55,13 @@ struct dmub_notification;
 
 #define DC_VER "3.2.319"
 
+/**
+ * MAX_SURFACES - representative of the upper bound of surfaces that can be piped to a single CRTC
+ */
 #define MAX_SURFACES 4
+/**
+ * MAX_PLANES - representative of the upper bound of planes that are supported by the HW
+ */
 #define MAX_PLANES 6
 #define MAX_STREAMS 6
 #define MIN_VIEWPORT_SIZE 12
Signature · 1 line
2.48.1
#3 lore raw

Re: [PATCH 02/14] drm/amd/display: docstring definitions MAX_SURFACES and MAX_PLANES

Quoted 17 lines · Aurabindo Pillai

From: Zaeem Mohamed <[email protected]>

MAX_SURFACES and MAX_PLANES now have docstrings that better show the difference between the two.

---
  drivers/gpu/drm/amd/display/dc/dc.h | 6 ++++++
  1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/display/dc/dc.h +0 -0
index 42ba65e785ca..e1f4f643c364 100644
@@ -55,7 +55,13 @@ struct dmub_notification;
 

drivers/gpu/drm/amd/display/dc/dc.h struct dmub_notification; · line 65

Quoted 10 lines
drivers/gpu/drm/amd/display/dc/dc.h +6 -0
  #define DC_VER "3.2.319"
 
+/**
+ * MAX_SURFACES - representative of the upper bound of surfaces that can be piped to a single CRTC
+ */
  #define MAX_SURFACES 4
+/**
+ * MAX_PLANES - representative of the upper bound of planes that are supported by the HW
+ */
  #define MAX_PLANES 6

Nice! Thanks for adding this doc.

Melissa

Quoted 2 lines
drivers/gpu/drm/amd/display/dc/dc.h +0 -0
  #define MAX_STREAMS 6
  #define MIN_VIEWPORT_SIZE 12
#4 lore raw

PATCH 3/14 drm/amd/display: Don't try AUX transactions on disconnected link

In reply to Aurabindo Pillai

From: Ilya Bakoulin <[email protected]>

[Why]
Setting link DPMS off in response to HPD disconnect creates AUX transactions on a link that is supposed to be disconnected. This can cause issues in some cases when the sink re-asserts HPD and expects source to re-enable the link.

[How]
Avoid AUX transactions on disconnected link.

---
 .../gpu/drm/amd/display/dc/link/protocols/link_dp_phy.c   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_phy.c +5 -3
index 2c73ac87cd66..c27ffec5d84f 100644
@@ -75,7 +75,8 @@ void dp_disable_link_phy(struct dc_link *link,
 	struct dc  *dc = link->ctx->dc;
 
 	if (!link->wa_flags.dp_keep_receiver_powered &&
-		!link->skip_implict_edp_power_control)
+			!link->skip_implict_edp_power_control &&
+			link->type != dc_connection_none)
 		dpcd_write_rx_power_ctrl(link, false);
 
 	dc->hwss.disable_link_output(link, link_res, signal);
@@ -163,8 +164,9 @@ enum dc_status dp_set_fec_ready(struct dc_link *link, const struct link_resource
 	} else {
 		if (link->fec_state == dc_link_fec_ready) {
 			fec_config = 0;
-			core_link_write_dpcd(link, DP_FEC_CONFIGURATION,
-				&fec_config, sizeof(fec_config));
+			if (link->type != dc_connection_none)
+				core_link_write_dpcd(link, DP_FEC_CONFIGURATION,
+					&fec_config, sizeof(fec_config));
 
 			link_enc->funcs->fec_set_ready(link_enc, false);
 			link->fec_state = dc_link_fec_not_ready;
Signature · 1 line
2.48.1
#5 lore raw

PATCH 4/14 drm/amd/display: DML21 Reintegration

In reply to Aurabindo Pillai

From: Austin Zheng <[email protected]>

For various fixes to mcache_row_bytes calculation.

---
 .../display/dc/dml2/dml21/inc/dml_top_types.h |     5 -
 .../dml2/dml21/src/dml2_core/dml2_core_dcn4.c |    22 +-
 .../dml2/dml21/src/dml2_core/dml2_core_dcn4.h |     3 -
 .../src/dml2_core/dml2_core_dcn4_calcs.c      |    94 +-
 .../dml21/src/dml2_core/dml2_core_shared.c    | 12413 ----------------
 .../src/dml2_core/dml2_core_shared_types.h    |     9 +-
 .../dml21/src/dml2_core/dml2_core_utils.c     |     3 +-
 .../dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c |     6 +-
 .../dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h |     2 -
 .../dml21/src/dml2_mcg/dml2_mcg_factory.c     |     2 +-
 .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c  |     5 +-
 .../dml21/src/dml2_top/dml2_top_interfaces.c  |     1 -
 .../dc/dml2/dml21/src/dml2_top/dml_top.c      |   354 -
 .../dc/dml2/dml21/src/inc/dml2_debug.c        |     5 -
 .../dc/dml2/dml21/src/inc/dml2_debug.h        |     6 +-
 .../src/inc/dml2_internal_shared_types.h      |     6 -
 16 files changed, 83 insertions(+), 12853 deletions(-)
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml_top.c
drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml_top_types.h +0 -5
index 0ab19cf4d242..19bce4084382 100644
@@ -14,11 +14,6 @@
 
 struct dml2_instance;
 
-enum dml2_status {
-	dml2_success = 0,
-	dml2_error_generic = 1
-};
-
 enum dml2_project_id {
 	dml2_project_invalid = 0,
 	dml2_project_dcn4x_stage1 = 1,
drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.c +11 -11
index ec0beb139200..3664980d1574 100644
@@ -44,7 +44,7 @@ struct dml2_core_ip_params core_dcn4_ip_caps_base = {
 	.dppclk_delay_scl_lb_only = 16,
 	.dppclk_delay_cnvc_formatter = 28,
 	.dppclk_delay_cnvc_cursor = 6,
-	.cursor_buffer_size = 24,
+	.cursor_buffer_size = 42,
 	.cursor_chunk_size = 2,
 	.dispclk_delay_subtotal = 125,
 	.max_inter_dcn_tile_repeaters = 8,
@@ -327,11 +327,11 @@ static void pack_mode_programming_params_with_implicit_subvp(struct dml2_core_in
 		dml2_core_calcs_get_mall_allocation(&core->clean_me_up.mode_lib, &programming->plane_programming[plane_index].surface_size_mall_bytes, dml_internal_pipe_index);
 
 		memcpy(&programming->plane_programming[plane_index].mcache_allocation,
-				&display_cfg->stage2.mcache_allocations[plane_index],
-				sizeof(struct dml2_mcache_surface_allocation));
+			&display_cfg->stage2.mcache_allocations[plane_index],
+			sizeof(struct dml2_mcache_surface_allocation));
 		total_main_mcaches_required += programming->plane_programming[plane_index].mcache_allocation.num_mcaches_plane0 +
-				programming->plane_programming[plane_index].mcache_allocation.num_mcaches_plane1 -
-				(programming->plane_programming[plane_index].mcache_allocation.last_slice_sharing.plane0_plane1 ? 1 : 0);
+			programming->plane_programming[plane_index].mcache_allocation.num_mcaches_plane1 -
+			(programming->plane_programming[plane_index].mcache_allocation.last_slice_sharing.plane0_plane1 ? 1 : 0);
 
 		for (pipe_offset = 0; pipe_offset < programming->plane_programming[plane_index].num_dpps_required; pipe_offset++) {
 			// Assign storage for this pipe's register values
@@ -374,17 +374,17 @@ static void pack_mode_programming_params_with_implicit_subvp(struct dml2_core_in
 
 		/* generate mcache allocation, phantoms use identical mcache configuration, but in the MALL set and unique mcache ID's beginning after all main ID's */
 		memcpy(&programming->plane_programming[main_plane_index].phantom_plane.mcache_allocation,
-				&programming->plane_programming[main_plane_index].mcache_allocation,
-				sizeof(struct dml2_mcache_surface_allocation));
+			&programming->plane_programming[main_plane_index].mcache_allocation,
+			sizeof(struct dml2_mcache_surface_allocation));
 		for (mcache_index = 0; mcache_index < programming->plane_programming[main_plane_index].phantom_plane.mcache_allocation.num_mcaches_plane0; mcache_index++) {
 			programming->plane_programming[main_plane_index].phantom_plane.mcache_allocation.global_mcache_ids_plane0[mcache_index] += total_main_mcaches_required;
 			programming->plane_programming[main_plane_index].phantom_plane.mcache_allocation.global_mcache_ids_mall_plane0[mcache_index] =
-					programming->plane_programming[main_plane_index].phantom_plane.mcache_allocation.global_mcache_ids_plane0[mcache_index];
+				programming->plane_programming[main_plane_index].phantom_plane.mcache_allocation.global_mcache_ids_plane0[mcache_index];
 		}
 		for (mcache_index = 0; mcache_index < programming->plane_programming[main_plane_index].phantom_plane.mcache_allocation.num_mcaches_plane1; mcache_index++) {
 			programming->plane_programming[main_plane_index].phantom_plane.mcache_allocation.global_mcache_ids_plane1[mcache_index] += total_main_mcaches_required;
 			programming->plane_programming[main_plane_index].phantom_plane.mcache_allocation.global_mcache_ids_mall_plane1[mcache_index] =
-					programming->plane_programming[main_plane_index].phantom_plane.mcache_allocation.global_mcache_ids_plane1[mcache_index];
+				programming->plane_programming[main_plane_index].phantom_plane.mcache_allocation.global_mcache_ids_plane1[mcache_index];
 		}
 
 		for (pipe_offset = 0; pipe_offset < programming->plane_programming[main_plane_index].num_dpps_required; pipe_offset++) {
@@ -597,8 +597,8 @@ bool core_dcn4_mode_programming(struct dml2_core_mode_programming_in_out *in_out
 				dml2_core_calcs_get_mall_allocation(&core->clean_me_up.mode_lib, &in_out->programming->plane_programming[plane_index].surface_size_mall_bytes, dml_internal_pipe_index);
 
 				memcpy(&in_out->programming->plane_programming[plane_index].mcache_allocation,
-						&in_out->display_cfg->stage2.mcache_allocations[plane_index],
-						sizeof(struct dml2_mcache_surface_allocation));
+					&in_out->display_cfg->stage2.mcache_allocations[plane_index],
+					sizeof(struct dml2_mcache_surface_allocation));
 
 				for (pipe_offset = 0; pipe_offset < in_out->programming->plane_programming[plane_index].num_dpps_required; pipe_offset++) {
 					in_out->programming->plane_programming[plane_index].plane_descriptor = &in_out->programming->display_config.plane_descriptors[plane_index];
drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.h +0 -3
index e62b2d3eeee6..a68bb001a346 100644
@@ -9,7 +9,4 @@ bool core_dcn4_mode_support(struct dml2_core_mode_support_in_out *in_out);
 bool core_dcn4_mode_programming(struct dml2_core_mode_programming_in_out *in_out);
 bool core_dcn4_populate_informative(struct dml2_core_populate_informative_in_out *in_out);
 bool core_dcn4_calculate_mcache_allocation(struct dml2_calculate_mcache_allocation_in_out *in_out);
-
-bool core_dcn4_unit_test(void);
-
 #endif
drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c +54 -40

296 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c deleted +0 -12413

2,632 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_shared_types.h +8 -1
index b7cb017b59ba..dfe54112a9c6 100644

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_utils.c +2 -1
index 456b3f8a6d38..2504d9c2ec34 100644

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c +3 -3
index fc77fb34a19a..02004b7efa8c 100644

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h +0 -2
index b165c58dfd11..e7b58f2efda4 100644

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.c +1 -1
index c60b8fe90819..cd3fbc0591d8 100644

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c +2 -3
index 15c906c42ec4..f50662b83296 100644

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml2_top_interfaces.c +0 -1
index f88931ccbc5e..5a33e2f357f4 100644

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml_top.c deleted +0 -354

354 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/inc/dml2_debug.c +0 -5
index f95c7ff56f15..c506667897c4 100644

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/inc/dml2_debug.h +2 -4
index a27792b56f7e..bfe6f236d2e4 100644

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/inc/dml2_internal_shared_types.h +0 -6
index 7fb6026bcb49..d8d01dceacdd 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.48.1

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

#6 lore raw

PATCH 5/14 drm/amd/display: use s1_12 filter tables in SPL

In reply to Aurabindo Pillai

From: Samson Tam <[email protected]>

[Why & How]
Instead of converting tables from s1_10 to s1_12,
added s1_12 tables instead in SPL
Remove init calls that do the conversion

---
 .../gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c +0 -5
index 6ab194a86cb9..64f2153310df 100644
@@ -76,9 +76,6 @@
 
 #include "dml2/dml2_wrapper.h"
 
-#include "sspl/dc_spl_scl_easf_filters.h"
-#include "sspl/dc_spl_isharp_filters.h"
-
 #define DC_LOGGER_INIT(logger)
 
 enum dcn401_clk_src_array_id {
@@ -2189,8 +2186,6 @@ static bool dcn401_resource_construct(
 	dc->dml2_options.det_segment_size = DCN4_01_CRB_SEGMENT_SIZE_KB;
 
 	/* SPL */
-	spl_init_easf_filter_coeffs();
-	spl_init_blur_scale_coeffs();
 	dc->caps.scl_caps.sharpener_support = true;
 
 	return true;
Signature · 1 line
2.48.1
#7 lore raw

PATCH 6/14 drm/amd/display: remove TF check for LLS policy

In reply to Aurabindo Pillai

From: Samson Tam <[email protected]>

[Why & How]
LLS policy not affected by TF.
Remove check in don't care case and use
pixel format only.

---
 drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c | 31 +++++---------------
 1 file changed, 7 insertions(+), 24 deletions(-)
drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c +7 -24
index 38a9a0d68058..31495c9978b0 100644
@@ -767,25 +767,13 @@ static enum scl_mode spl_get_dscl_mode(const struct spl_in *spl_in,
 	return SCL_MODE_SCALING_420_YCBCR_ENABLE;
 }
 
-static bool spl_choose_lls_policy(enum spl_pixel_format format,
-	enum spl_transfer_func_type tf_type,
-	enum spl_transfer_func_predefined tf_predefined_type,
+static void spl_choose_lls_policy(enum spl_pixel_format format,
 	enum linear_light_scaling *lls_pref)
 {
-	if (spl_is_video_format(format)) {
+	if (spl_is_subsampled_format(format))
 		*lls_pref = LLS_PREF_NO;
-		if ((tf_type == SPL_TF_TYPE_PREDEFINED) ||
-			(tf_type == SPL_TF_TYPE_DISTRIBUTED_POINTS))
-			return true;
-	} else { /* RGB or YUV444 */
-		if ((tf_type == SPL_TF_TYPE_PREDEFINED) ||
-			(tf_type == SPL_TF_TYPE_BYPASS)) {
-			*lls_pref = LLS_PREF_YES;
-			return true;
-		}
-	}
-	*lls_pref = LLS_PREF_NO;
-	return false;
+	else /* RGB or YUV444 */
+		*lls_pref = LLS_PREF_YES;
 }
 
 /* Enable EASF ?*/
@@ -794,7 +782,6 @@ static bool enable_easf(struct spl_in *spl_in, struct spl_scratch *spl_scratch)
 	int vratio = 0;
 	int hratio = 0;
 	bool skip_easf = false;
-	bool lls_enable_easf = true;
 
 	if (spl_in->disable_easf)
 		skip_easf = true;
@@ -810,17 +797,13 @@ static bool enable_easf(struct spl_in *spl_in, struct spl_scratch *spl_scratch)
 		skip_easf = true;
 
 	/*
-	 * If lls_pref is LLS_PREF_DONT_CARE, then use pixel format and transfer
-	 *  function to determine whether to use LINEAR or NONLINEAR scaling
+	 * If lls_pref is LLS_PREF_DONT_CARE, then use pixel format
+	 *  to determine whether to use LINEAR or NONLINEAR scaling
 	 */
 	if (spl_in->lls_pref == LLS_PREF_DONT_CARE)
-		lls_enable_easf = spl_choose_lls_policy(spl_in->basic_in.format,
-			spl_in->basic_in.tf_type, spl_in->basic_in.tf_predefined_type,
+		spl_choose_lls_policy(spl_in->basic_in.format,
 			&spl_in->lls_pref);
 
-	if (!lls_enable_easf)
-		skip_easf = true;
-
 	/* Check for linear scaling or EASF preferred */
 	if (spl_in->lls_pref != LLS_PREF_YES && !spl_in->prefer_easf)
 		skip_easf = true;
Signature · 1 line
2.48.1
#8 lore raw

PATCH 7/14 drm/amd/display: add new IRQ enum for underflows

In reply to Aurabindo Pillai

From: Leo Zeng <[email protected]>

[WHY & HOW]
needed in certain scenarios for debugging and logging

---
 drivers/gpu/drm/amd/display/dc/irq_types.h | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/irq_types.h +1 -0
index e962c426beda..110f656d43ae 100644
@@ -170,6 +170,7 @@ enum irq_type
 	IRQ_TYPE_VUPDATE = DC_IRQ_SOURCE_VUPDATE1,
 	IRQ_TYPE_VBLANK = DC_IRQ_SOURCE_VBLANK1,
 	IRQ_TYPE_VLINE0 = DC_IRQ_SOURCE_DC1_VLINE0,
+	IRQ_TYPE_DCUNDERFLOW = DC_IRQ_SOURCE_DC1UNDERFLOW,
 };
 
 #define DAL_VALID_IRQ_SRC_NUM(src) \
Signature · 1 line
2.48.1
#9 lore raw

PATCH 8/14 drm/amd/display: limit coverage of optimization skip

In reply to Aurabindo Pillai

From: Ausef Yousof <[email protected]>

[why&how]
causing some regression on dgpu which still needs the pre-emptive return, limit this to reporter asic version it is simple to include
different dcn versions from this point forward, each dcn resource is initialized with the flag and can be enabled at will

---
 drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c   | 1 +
 drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c | 1 +
 drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c | 1 +
 3 files changed, 3 insertions(+)
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +1 -0
index 6d163dcecde6..ffd2b816cd02 100644
@@ -1909,6 +1909,7 @@ static bool dcn35_resource_construct(
 	/* Use pipe context based otg sync logic */
 	dc->config.use_pipe_ctx_sync_logic = true;
 
+
 	dc->config.disable_hbr_audio_dp2 = true;
 	/* read VBIOS LTTPR caps */
 	{
drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c +1 -0
index 4a03df5d760f..98f5bc1b929e 100644
@@ -1877,6 +1877,7 @@ static bool dcn351_resource_construct(
 	/* Use pipe context based otg sync logic */
 	dc->config.use_pipe_ctx_sync_logic = true;
 
+
 	/* Use psp mailbox to enable assr */
 	dc->config.use_assr_psp_message = true;
 
drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c +1 -0
index 64f2153310df..4e842f29d4c4 100644
@@ -1923,6 +1923,7 @@ static bool dcn401_resource_construct(
 	dc->config.dc_mode_clk_limit_support = true;
 	dc->config.enable_windowed_mpo_odm = true;
 	dc->config.set_pipe_unlock_order = true; /* Need to ensure DET gets freed before allocating */
+
 	/* read VBIOS LTTPR caps */
 	{
 		if (ctx->dc_bios->funcs->get_lttpr_caps) {
Signature · 1 line
2.48.1
#10 lore raw

PATCH 9/14 drm/amd/display: add s1_12 filter tables

In reply to Aurabindo Pillai

From: Samson Tam <[email protected]>

[Why & How]
Instead of converting tables from s1_10 to s1_12, add s1_12 tables instead. Remove init calls that do the conversion. Add APIs to read s1_10 tables

---
 .../display/dc/sspl/dc_spl_isharp_filters.c   |  143 ++-
 .../display/dc/sspl/dc_spl_isharp_filters.h   |   10 +-
 .../display/dc/sspl/dc_spl_scl_easf_filters.c | 1025 +++++++++++++++--
 .../display/dc/sspl/dc_spl_scl_easf_filters.h |   10 +-
 4 files changed, 1079 insertions(+), 109 deletions(-)
drivers/gpu/drm/amd/display/dc/sspl/dc_spl_isharp_filters.c +126 -17
index e0572252c640..060451bf90d1 100644
@@ -456,9 +456,113 @@ static const uint16_t filter_isharp_bs_3tap_64p[99] = {
 };
 
 /* Converted Blur & Scale coeff tables from S1.10 to S1.12 */
-static uint16_t filter_isharp_bs_4tap_in_6_64p_s1_12[198];
-static uint16_t filter_isharp_bs_4tap_64p_s1_12[132];
-static uint16_t filter_isharp_bs_3tap_64p_s1_12[99];
+static const uint16_t filter_isharp_bs_4tap_in_6_64p_s1_12[198] = {
+0x0000, 0x0394, 0x08dc, 0x0390, 0x0000, 0x0000,
+0x0000, 0x0378, 0x08dc, 0x03ac, 0x0000, 0x0000,
+0x0000, 0x035c, 0x08d8, 0x03c8, 0x0004, 0x0000,
+0x0000, 0x0340, 0x08d4, 0x03e8, 0x0004, 0x0000,
+0x0000, 0x0324, 0x08d0, 0x0404, 0x0008, 0x0000,
+0x0000, 0x0308, 0x08cc, 0x0420, 0x000c, 0x0000,
+0x0000, 0x02ec, 0x08c8, 0x0440, 0x000c, 0x0000,
+0x0000, 0x02d4, 0x08c0, 0x045c, 0x0010, 0x0000,
+0x0000, 0x02b8, 0x08b8, 0x047c, 0x0014, 0x0000,
+0x0000, 0x02a0, 0x08b0, 0x0498, 0x0018, 0x0000,
+0x0000, 0x0288, 0x08a8, 0x04b4, 0x001c, 0x0000,
+0x0000, 0x0270, 0x08a0, 0x04d0, 0x0020, 0x0000,
+0x0000, 0x0258, 0x0894, 0x04f0, 0x0024, 0x0000,
+0x0000, 0x0240, 0x0888, 0x050c, 0x002c, 0x0000,
+0x0000, 0x0228, 0x087c, 0x052c, 0x0030, 0x0000,
+0x0000, 0x0214, 0x0870, 0x0544, 0x0038, 0x0000,
+0x0000, 0x01fc, 0x0860, 0x0568, 0x003c, 0x0000,
+0x0000, 0x01e8, 0x0854, 0x0580, 0x0044, 0x0000,
+0x0000, 0x01d0, 0x0844, 0x05a0, 0x004c, 0x0000,
+0x0000, 0x01bc, 0x0834, 0x05bc, 0x0054, 0x0000,
+0x0000, 0x01a8, 0x0824, 0x05d8, 0x005c, 0x0000,
+0x0000, 0x0194, 0x0810, 0x05f8, 0x0064, 0x0000,
+0x0000, 0x0180, 0x0800, 0x0614, 0x006c, 0x0000,
+0x0000, 0x0170, 0x07ec, 0x0630, 0x0074, 0x0000,
+0x0000, 0x015c, 0x07d8, 0x064c, 0x0080, 0x0000,
+0x0000, 0x014c, 0x07c4, 0x0668, 0x0088, 0x0000,
+0x0000, 0x0138, 0x07b0, 0x0684, 0x0094, 0x0000,
+0x0000, 0x0128, 0x0798, 0x06a0, 0x00a0, 0x0000,
+0x0000, 0x0118, 0x0784, 0x06bc, 0x00a8, 0x0000,
+0x0000, 0x0108, 0x076c, 0x06d8, 0x00b4, 0x0000,
+0x0000, 0x00fc, 0x0754, 0x06ec, 0x00c4, 0x0000,
+0x0000, 0x00ec, 0x073c, 0x0708, 0x00d0, 0x0000,
+0x0000, 0x00dc, 0x0724, 0x0724, 0x00dc, 0x0000,
+};
+
+static const uint16_t filter_isharp_bs_4tap_64p_s1_12[132] = {
+0x0394, 0x08dc, 0x0390, 0x0000,
+0x0378, 0x08dc, 0x03ac, 0x0000,
+0x035c, 0x08d8, 0x03c8, 0x0004,
+0x0340, 0x08d4, 0x03e8, 0x0004,
+0x0324, 0x08d0, 0x0404, 0x0008,
+0x0308, 0x08cc, 0x0420, 0x000c,
+0x02ec, 0x08c8, 0x0440, 0x000c,
+0x02d4, 0x08c0, 0x045c, 0x0010,
+0x02b8, 0x08b8, 0x047c, 0x0014,
+0x02a0, 0x08b0, 0x0498, 0x0018,
+0x0288, 0x08a8, 0x04b4, 0x001c,
+0x0270, 0x08a0, 0x04d0, 0x0020,
+0x0258, 0x0894, 0x04f0, 0x0024,
+0x0240, 0x0888, 0x050c, 0x002c,
+0x0228, 0x087c, 0x052c, 0x0030,
+0x0214, 0x0870, 0x0544, 0x0038,
+0x01fc, 0x0860, 0x0568, 0x003c,
+0x01e8, 0x0854, 0x0580, 0x0044,
+0x01d0, 0x0844, 0x05a0, 0x004c,
+0x01bc, 0x0834, 0x05bc, 0x0054,
+0x01a8, 0x0824, 0x05d8, 0x005c,
+0x0194, 0x0810, 0x05f8, 0x0064,
+0x0180, 0x0800, 0x0614, 0x006c,
+0x0170, 0x07ec, 0x0630, 0x0074,
+0x015c, 0x07d8, 0x064c, 0x0080,
+0x014c, 0x07c4, 0x0668, 0x0088,
+0x0138, 0x07b0, 0x0684, 0x0094,
+0x0128, 0x0798, 0x06a0, 0x00a0,
+0x0118, 0x0784, 0x06bc, 0x00a8,
+0x0108, 0x076c, 0x06d8, 0x00b4,
+0x00fc, 0x0754, 0x06ec, 0x00c4,
+0x00ec, 0x073c, 0x0708, 0x00d0,
+0x00dc, 0x0724, 0x0724, 0x00dc,
+};
+
+static const uint16_t filter_isharp_bs_3tap_64p_s1_12[99] = {
+0x0800, 0x0800, 0x0000,
+0x07d8, 0x0818, 0x0010,
+0x07b0, 0x082c, 0x0024,
+0x0788, 0x0844, 0x0034,
+0x0760, 0x0858, 0x0048,
+0x0738, 0x0870, 0x0058,
+0x0710, 0x0884, 0x006c,
+0x06e8, 0x0898, 0x0080,
+0x06c0, 0x08a8, 0x0098,
+0x0698, 0x08bc, 0x00ac,
+0x0670, 0x08cc, 0x00c4,
+0x0648, 0x08e0, 0x00d8,
+0x0620, 0x08f0, 0x00f0,
+0x05f8, 0x0900, 0x0108,
+0x05d0, 0x0910, 0x0120,
+0x05a8, 0x0920, 0x0138,
+0x0584, 0x0928, 0x0154,
+0x055c, 0x0938, 0x016c,
+0x0534, 0x0944, 0x0188,
+0x0510, 0x094c, 0x01a4,
+0x04e8, 0x0958, 0x01c0,
+0x04c4, 0x0960, 0x01dc,
+0x049c, 0x096c, 0x01f8,
+0x0478, 0x0970, 0x0218,
+0x0454, 0x0978, 0x0234,
+0x042c, 0x0980, 0x0254,
+0x0408, 0x0988, 0x0270,
+0x03e4, 0x098c, 0x0290,
+0x03c0, 0x0990, 0x02b0,
+0x039c, 0x0994, 0x02d0,
+0x037c, 0x0990, 0x02f4,
+0x0358, 0x0994, 0x0314,
+0x0334, 0x0998, 0x0334,
+};
 
 /* Pre-generated 1DLUT for given setup and sharpness level */
 struct isharp_1D_lut_pregen filter_isharp_1D_lut_pregen[NUM_SHARPNESS_SETUPS] = {
@@ -537,15 +641,15 @@ const uint16_t *spl_get_filter_isharp_wide_6tap_64p(void)
 {
 	return filter_isharp_wide_6tap_64p;
 }
-uint16_t *spl_get_filter_isharp_bs_4tap_in_6_64p(void)
+const uint16_t *spl_get_filter_isharp_bs_4tap_in_6_64p(void)
 {
 	return filter_isharp_bs_4tap_in_6_64p_s1_12;
 }
-uint16_t *spl_get_filter_isharp_bs_4tap_64p(void)
+const uint16_t *spl_get_filter_isharp_bs_4tap_64p(void)
 {
 	return filter_isharp_bs_4tap_64p_s1_12;
 }
-uint16_t *spl_get_filter_isharp_bs_3tap_64p(void)
+const uint16_t *spl_get_filter_isharp_bs_3tap_64p(void)
 {
 	return filter_isharp_bs_3tap_64p_s1_12;
 }
@@ -720,17 +824,7 @@ uint32_t *spl_get_pregen_filter_isharp_1D_lut(enum system_setup setup)
 	return filter_isharp_1D_lut_pregen[setup].value;
 }
 
-void spl_init_blur_scale_coeffs(void)
-{
-	convert_filter_s1_10_to_s1_12(filter_isharp_bs_3tap_64p,
-		filter_isharp_bs_3tap_64p_s1_12, 3);
-	convert_filter_s1_10_to_s1_12(filter_isharp_bs_4tap_64p,
-		filter_isharp_bs_4tap_64p_s1_12, 4);
-	convert_filter_s1_10_to_s1_12(filter_isharp_bs_4tap_in_6_64p,
-		filter_isharp_bs_4tap_in_6_64p_s1_12, 6);
-}
-
-uint16_t *spl_dscl_get_blur_scale_coeffs_64p(int taps)
+const uint16_t *spl_dscl_get_blur_scale_coeffs_64p(int taps)
 {
 	if (taps == 3)
 		return spl_get_filter_isharp_bs_3tap_64p();
@@ -745,6 +839,21 @@ uint16_t *spl_dscl_get_blur_scale_coeffs_64p(int taps)
 	}
 }
 
+const uint16_t *spl_dscl_get_blur_scale_coeffs_64p_s1_10(int taps)
+{
+	if (taps == 3)
+		return filter_isharp_bs_3tap_64p;
+	else if (taps == 4)
+		return filter_isharp_bs_4tap_64p;
+	else if (taps == 6)
+		return filter_isharp_bs_4tap_in_6_64p;
+	else {
+		/* should never happen, bug */
+		SPL_BREAK_TO_DEBUGGER();
+		return NULL;
+	}
+}
+
 void spl_set_blur_scale_data(struct dscl_prog_data *dscl_prog_data,
 		const struct spl_scaler_data *data)
 {
drivers/gpu/drm/amd/display/dc/sspl/dc_spl_isharp_filters.h +5 -5
index 89af91e19b6c..7d0be2fc2d00 100644
@@ -13,11 +13,12 @@ const uint32_t *spl_get_filter_isharp_1D_lut_1p0x(void);
 const uint32_t *spl_get_filter_isharp_1D_lut_1p5x(void);
 const uint32_t *spl_get_filter_isharp_1D_lut_2p0x(void);
 const uint32_t *spl_get_filter_isharp_1D_lut_3p0x(void);
-uint16_t *spl_get_filter_isharp_bs_4tap_in_6_64p(void);
-uint16_t *spl_get_filter_isharp_bs_4tap_64p(void);
-uint16_t *spl_get_filter_isharp_bs_3tap_64p(void);
+const uint16_t *spl_get_filter_isharp_bs_4tap_in_6_64p(void);
+const uint16_t *spl_get_filter_isharp_bs_4tap_64p(void);
+const uint16_t *spl_get_filter_isharp_bs_3tap_64p(void);
 const uint16_t *spl_get_filter_isharp_wide_6tap_64p(void);
-uint16_t *spl_dscl_get_blur_scale_coeffs_64p(int taps);
+const uint16_t *spl_dscl_get_blur_scale_coeffs_64p(int taps);
+const uint16_t *spl_dscl_get_blur_scale_coeffs_64p_s1_10(int taps);
 
 #define NUM_SHARPNESS_ADJ_LEVELS 6
 struct scale_ratio_to_sharpness_level_adj {
@@ -40,7 +41,6 @@ enum system_setup {
 	NUM_SHARPNESS_SETUPS
 };
 
-void spl_init_blur_scale_coeffs(void);
 void spl_set_blur_scale_data(struct dscl_prog_data *dscl_prog_data,
 	const struct spl_scaler_data *data);
 
drivers/gpu/drm/amd/display/dc/sspl/dc_spl_scl_easf_filters.c +943 -82

1,061 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/sspl/dc_spl_scl_easf_filters.h +5 -5
index 8bb2b8108e38..edc2b5d25c13 100644
@@ -13,14 +13,14 @@ struct scale_ratio_to_reg_value_lookup {
 	const uint32_t reg_value;
 };
 
-void spl_init_easf_filter_coeffs(void);
-uint16_t *spl_get_easf_filter_3tap_64p(struct spl_fixed31_32 ratio);
-uint16_t *spl_get_easf_filter_4tap_64p(struct spl_fixed31_32 ratio);
-uint16_t *spl_get_easf_filter_6tap_64p(struct spl_fixed31_32 ratio);
-uint16_t *spl_dscl_get_easf_filter_coeffs_64p(int taps, struct spl_fixed31_32 ratio);
+const uint16_t *spl_get_easf_filter_3tap_64p(struct spl_fixed31_32 ratio);
+const uint16_t *spl_get_easf_filter_4tap_64p(struct spl_fixed31_32 ratio);
+const uint16_t *spl_get_easf_filter_6tap_64p(struct spl_fixed31_32 ratio);
 void spl_set_filters_data(struct dscl_prog_data *dscl_prog_data,
 	const struct spl_scaler_data *data, bool enable_easf_v,
 	bool enable_easf_h);
+const uint16_t *spl_dscl_get_easf_filter_coeffs_64p(int taps, struct spl_fixed31_32 ratio);
+const uint16_t *spl_dscl_get_easf_filter_coeffs_64p_s1_10(int taps, struct spl_fixed31_32 ratio);
 
 uint32_t spl_get_v_bf3_mode(struct spl_fixed31_32 ratio);
 uint32_t spl_get_h_bf3_mode(struct spl_fixed31_32 ratio);
Signature · 1 line
2.48.1
#11 lore raw

PATCH 10/14 drm/amd/display: add workaround flag to link to force FFE preset

In reply to Aurabindo Pillai

From: Brendan Tam <[email protected]>

[Why]
There have been instances of some monitors being unable to link train on their reported link speed using their selected FFE preset. If a different FFE preset is found that has a higher rate of success during link training this workaround can be used to force its FFE preset.

[How]
A new link workaround flag is made called force_dp_ffe_preset. The flag is checked in override_training_settings and will set lt_settings->ffe_preset which is null if the flag is not set. The flag is then set in override_lane_settings.

---
 drivers/gpu/drm/amd/display/dc/dc.h                             | 2 ++
 .../gpu/drm/amd/display/dc/link/protocols/link_dp_training.c    | 2 ++
 2 files changed, 4 insertions(+)
drivers/gpu/drm/amd/display/dc/dc.h +2 -0
index e1f4f643c364..16cd7833e931 100644
@@ -1792,7 +1792,9 @@ struct dc_link {
 		bool dongle_mode_timing_override;
 		bool blank_stream_on_ocs_change;
 		bool read_dpcd204h_on_irq_hpd;
+		bool force_dp_ffe_preset;
 	} wa_flags;
+	union dc_dp_ffe_preset forced_dp_ffe_preset;
 	struct link_mst_stream_allocation_table mst_stream_alloc_table;
 
 	struct dc_link_status link_status;
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c +2 -0
index 88d4288cde0f..751c18e592ea 100644
@@ -736,6 +736,8 @@ void override_training_settings(
 		lt_settings->pre_emphasis = overrides->pre_emphasis;
 	if (overrides->post_cursor2 != NULL)
 		lt_settings->post_cursor2 = overrides->post_cursor2;
+	if (link->wa_flags.force_dp_ffe_preset && !dp_is_lttpr_present(link))
+		lt_settings->ffe_preset = &link->forced_dp_ffe_preset;
 	if (overrides->ffe_preset != NULL)
 		lt_settings->ffe_preset = overrides->ffe_preset;
 	/* Override HW lane settings with BIOS forced values if present */
Signature · 1 line
2.48.1
#12 lore raw

PATCH 11/14 drm/amd/display: pass calculated dram_speed_mts to dml2

In reply to Aurabindo Pillai

From: Charlene Liu <[email protected]>

[why]
currently dml2 is using a hard coded 16 to convert memclk to dram_speed_mts. for apu, this depends on wck_ratio.

change to pass the already calculated dram_speed_mts from fpu to dml2.

v2: use existing calculation of dram_speed_mts for now to avoid regression

---
 drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c   | 2 ++
 drivers/gpu/drm/amd/display/dc/dml/dcn351/dcn351_fpu.c | 1 +
 drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.h     | 1 +
 3 files changed, 4 insertions(+)
drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c +2 -0
index 47d785204f29..e8efffcc69a1 100644
@@ -367,6 +367,8 @@ void dcn35_update_bw_bounding_box_fpu(struct dc *dc,
 				clock_limits[i].socclk_mhz;
 			dc->dml2_options.bbox_overrides.clks_table.clk_entries[i].memclk_mhz =
 				clk_table->entries[i].memclk_mhz * clk_table->entries[i].wck_ratio;
+
+			dc->dml2_options.bbox_overrides.clks_table.clk_entries[i].dram_speed_mts = clock_limits[i].dram_speed_mts;
 			dc->dml2_options.bbox_overrides.clks_table.clk_entries[i].dtbclk_mhz =
 				clock_limits[i].dtbclk_mhz;
 			dc->dml2_options.bbox_overrides.clks_table.num_entries_per_clk.num_dcfclk_levels =
drivers/gpu/drm/amd/display/dc/dml/dcn351/dcn351_fpu.c +1 -0
index d9e63c4fdd95..17d0b4923b0c 100644
@@ -401,6 +401,7 @@ void dcn351_update_bw_bounding_box_fpu(struct dc *dc,
 				clock_limits[i].socclk_mhz;
 			dc->dml2_options.bbox_overrides.clks_table.clk_entries[i].memclk_mhz =
 				clk_table->entries[i].memclk_mhz * clk_table->entries[i].wck_ratio;
+			dc->dml2_options.bbox_overrides.clks_table.clk_entries[i].dram_speed_mts = clock_limits[i].dram_speed_mts;
 			dc->dml2_options.bbox_overrides.clks_table.clk_entries[i].dtbclk_mhz =
 				clock_limits[i].dtbclk_mhz;
 			dc->dml2_options.bbox_overrides.clks_table.num_entries_per_clk.num_dcfclk_levels =
drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.h +1 -0
index 0f944fcfd5a5..785226945699 100644
@@ -159,6 +159,7 @@ struct dml2_clks_table_entry {
 	unsigned int dtbclk_mhz;
 	unsigned int dispclk_mhz;
 	unsigned int dppclk_mhz;
+	unsigned int dram_speed_mts; /*which is based on wck_ratio*/
 };
 
 struct dml2_clks_num_entries {
Signature · 1 line
2.48.1
#13 lore raw

PATCH 12/14 drm/amd/display: Make dcn401_program_pipe non static

In reply to Aurabindo Pillai

Allow reuse of code by making dcn401_program_pipe() non static.

Fixes 0ed6d68efd76 ("drm/amd/display: Allow reuse of of DCN4x code")
---
 drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 2 +-
 drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.h | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +1 -1
index 8ad0ff669b7a..c4a37a95e812 100644
@@ -1934,7 +1934,7 @@ static void dcn401_program_tg(
 		hws->funcs.setup_vupdate_interrupt(dc, pipe_ctx);
 }
 
-static void dcn401_program_pipe(
+void dcn401_program_pipe(
 	struct dc *dc,
 	struct pipe_ctx *pipe_ctx,
 	struct dc_state *context)
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.h +4 -0
index dbd69d215b8b..781cf0efccc6 100644
@@ -93,6 +93,10 @@ void dcn401_reset_back_end_for_pipe(
 void dcn401_reset_hw_ctx_wrap(
 		struct dc *dc,
 		struct dc_state *context);
+void dcn401_program_pipe(
+	struct dc *dc,
+	struct pipe_ctx *pipe_ctx,
+	struct dc_state *context);
 void dcn401_perform_3dlut_wa_unlock(struct pipe_ctx *pipe_ctx);
 void dcn401_program_front_end_for_ctx(struct dc *dc, struct dc_state *context);
 void dcn401_post_unlock_program_front_end(struct dc *dc, struct dc_state *context);
Signature · 1 line
2.48.1
#14 lore raw

PATCH 13/14 drm/amd/display: sspl: cleanup filter code

In reply to Aurabindo Pillai

From: Samson Tam <[email protected]>

[Why & How]
Remove unused filters and functions
Add static to limit scope

---
 .../display/dc/sspl/dc_spl_isharp_filters.c   | 321 +-----------------
 .../display/dc/sspl/dc_spl_isharp_filters.h   |  18 +-
 .../display/dc/sspl/dc_spl_scl_easf_filters.c |  39 ++-
 .../display/dc/sspl/dc_spl_scl_easf_filters.h |   9 +-
 .../amd/display/dc/sspl/dc_spl_scl_filters.c  | 232 +------------
 .../amd/display/dc/sspl/dc_spl_scl_filters.h  |  11 +-
 6 files changed, 40 insertions(+), 590 deletions(-)
drivers/gpu/drm/amd/display/dc/sspl/dc_spl_isharp_filters.c +4 -317
index 060451bf90d1..12acdd34e6a6 100644
@@ -6,232 +6,6 @@
 #include "dc_spl_filters.h"
 #include "dc_spl_isharp_filters.h"
 
-//========================================
-// Delta Gain 1DLUT
-// LUT content is packed as 4-bytes into one DWORD/entry
-// A_start = 0.000000
-// A_end   = 10.000000
-// A_gain  = 2.000000
-// B_start = 11.000000
-// B_end   = 86.000000
-// C_start = 40.000000
-// C_end   = 64.000000
-//========================================
-static const uint32_t filter_isharp_1D_lut_0[ISHARP_LUT_TABLE_SIZE] = {
-0x02010000,
-0x0A070503,
-0x1614100D,
-0x1C1B1918,
-0x22211F1E,
-0x27262423,
-0x2A2A2928,
-0x2D2D2C2B,
-0x302F2F2E,
-0x31313030,
-0x31313131,
-0x31313131,
-0x30303031,
-0x292D2F2F,
-0x191D2125,
-0x050A0F14,
-0x00000000,
-0x00000000,
-0x00000000,
-0x00000000,
-0x00000000,
-0x00000000,
-0x00000000,
-0x00000000,
-0x00000000,
-0x00000000,
-0x00000000,
-0x00000000,
-0x00000000,
-0x00000000,
-0x00000000,
-0x00000000,
-};
-//========================================
-// Delta Gain 1DLUT
-// LUT content is packed as 4-bytes into one DWORD/entry
-// A_start = 0.000000
-// A_end   = 10.000000
-// A_gain  = 0.500000
-// B_start = 11.000000
-// B_end   = 127.000000
-// C_start = 96.000000
-// C_end   = 127.000000
-//========================================
-
-static const uint32_t filter_isharp_1D_lut_0p5x[ISHARP_LUT_TABLE_SIZE] = {
-0x00000000,
-0x02020101,
-0x06050403,
-0x07070606,
-0x09080808,
-0x0A0A0A09,
-0x0C0B0B0B,
-0x0D0D0C0C,
-0x0E0E0D0D,
-0x0F0F0E0E,
-0x100F0F0F,
-0x10101010,
-0x11111010,
-0x11111111,
-0x11111111,
-0x11111111,
-0x11111111,
-0x11111111,
-0x11111111,
-0x10101111,
-0x10101010,
-0x0F0F0F10,
-0x0E0E0F0F,
-0x0D0D0E0E,
-0x0C0C0D0D,
-0x0B0B0B0C,
-0x090A0A0A,
-0x08080809,
-0x06060707,
-0x04050506,
-0x02030304,
-0x00010102,
-};
-//========================================
-// Delta Gain 1DLUT
-// LUT content is packed as 4-bytes into one DWORD/entry
-// A_start = 0.000000
-// A_end   = 10.000000
-// A_gain  = 1.000000
-// B_start = 11.000000
-// B_end   = 127.000000
-// C_start = 96.000000
-// C_end   = 127.000000
-//========================================
-static const uint32_t filter_isharp_1D_lut_1p0x[ISHARP_LUT_TABLE_SIZE] = {
-0x01000000,
-0x05040302,
-0x0B0A0806,
-0x0E0E0D0C,
-0x1211100F,
-0x15141312,
-0x17171615,
-0x1A191918,
-0x1C1B1B1A,
-0x1E1D1D1C,
-0x1F1F1E1E,
-0x2020201F,
-0x21212121,
-0x22222222,
-0x23232222,
-0x23232323,
-0x23232323,
-0x22222323,
-0x22222222,
-0x21212121,
-0x1F202020,
-0x1E1E1F1F,
-0x1C1D1D1E,
-0x1A1B1B1C,
-0x1819191A,
-0x15161717,
-0x12131415,
-0x0F101112,
-0x0C0D0E0E,
-0x08090A0B,
-0x04050607,
-0x00010203,
-};
-//========================================
-// Delta Gain 1DLUT
-// LUT content is packed as 4-bytes into one DWORD/entry
-// A_start = 0.000000
-// A_end   = 10.000000
-// A_gain  = 1.500000
-// B_start = 11.000000
-// B_end   = 127.000000
-// C_start = 96.000000
-// C_end   = 127.000000
-//========================================
-static const uint32_t filter_isharp_1D_lut_1p5x[ISHARP_LUT_TABLE_SIZE] = {
-0x01010000,
-0x07050402,
-0x110F0C0A,
-0x16141312,
-0x1B191817,
-0x1F1E1D1C,
-0x23222120,
-0x26262524,
-0x2A292827,
-0x2C2C2B2A,
-0x2F2E2E2D,
-0x3130302F,
-0x32323131,
-0x33333332,
-0x34343433,
-0x34343434,
-0x34343434,
-0x33343434,
-0x32333333,
-0x31313232,
-0x2F303031,
-0x2D2E2E2F,
-0x2A2B2C2C,
-0x2728292A,
-0x24252626,
-0x20212223,
-0x1C1D1E1F,
-0x1718191B,
-0x12131416,
-0x0C0E0F10,
-0x0608090B,
-0x00020305
-};
-//========================================
-// Delta Gain 1DLUT
-// LUT content is packed as 4-bytes into one DWORD/entry
-// A_start = 0.000000
-// A_end   = 10.000000
-// A_gain  = 2.000000
-// B_start = 11.000000
-// B_end   = 127.000000
-// C_start = 40.000000
-// C_end   = 127.000000
-//========================================
-static const uint32_t filter_isharp_1D_lut_2p0x[ISHARP_LUT_TABLE_SIZE] = {
-0x02010000,
-0x0A070503,
-0x1614100D,
-0x1D1B1A18,
-0x2322201F,
-0x29282625,
-0x2F2D2C2B,
-0x33323130,
-0x38373534,
-0x3B3A3938,
-0x3E3E3D3C,
-0x4140403F,
-0x43424241,
-0x44444443,
-0x45454545,
-0x46454545,
-0x45454546,
-0x45454545,
-0x43444444,
-0x41424243,
-0x3F404041,
-0x3C3D3E3E,
-0x38393A3B,
-0x34353738,
-0x30313233,
-0x2B2C2D2F,
-0x25262829,
-0x1F202223,
-0x181A1B1D,
-0x10121416,
-0x080B0D0E,
-0x00020406,
-};
 //========================================
 // Delta Gain 1DLUT
 // LUT content is packed as 4-bytes into one DWORD/entry
@@ -278,52 +52,6 @@ static const uint32_t filter_isharp_1D_lut_3p0x[ISHARP_LUT_TABLE_SIZE] = {
 0x0003060A,
 };
 
-//========================================
-// Wide scaler coefficients
-//========================================================
-// <using>			gen_scaler_coeffs.m
-// <date>			15-Dec-2021
-// <coeffDescrip>	6t_64p_LanczosEd_p_1_p_10qb_
-// <num_taps>		6
-// <num_phases>		64
-// <CoefType>		LanczosEd
-// <CoefQuant>		S1.10
-//========================================================
-static const uint16_t filter_isharp_wide_6tap_64p[198] = {
-0x0000, 0x0000, 0x0400, 0x0000, 0x0000, 0x0000,
-0x0003, 0x0FF3, 0x0400, 0x000D, 0x0FFD, 0x0000,
-0x0006, 0x0FE7, 0x03FE, 0x001C, 0x0FF9, 0x0000,
-0x0009, 0x0FDB, 0x03FC, 0x002B, 0x0FF5, 0x0000,
-0x000C, 0x0FD0, 0x03F9, 0x003A, 0x0FF1, 0x0000,
-0x000E, 0x0FC5, 0x03F5, 0x004A, 0x0FED, 0x0001,
-0x0011, 0x0FBB, 0x03F0, 0x005A, 0x0FE9, 0x0001,
-0x0013, 0x0FB2, 0x03EB, 0x006A, 0x0FE5, 0x0001,
-0x0015, 0x0FA9, 0x03E4, 0x007B, 0x0FE1, 0x0002,
-0x0017, 0x0FA1, 0x03DD, 0x008D, 0x0FDC, 0x0002,
-0x0018, 0x0F99, 0x03D4, 0x00A0, 0x0FD8, 0x0003,
-0x001A, 0x0F92, 0x03CB, 0x00B2, 0x0FD3, 0x0004,
-0x001B, 0x0F8C, 0x03C1, 0x00C6, 0x0FCE, 0x0004,
-0x001C, 0x0F86, 0x03B7, 0x00D9, 0x0FC9, 0x0005,
-0x001D, 0x0F80, 0x03AB, 0x00EE, 0x0FC4, 0x0006,
-0x001E, 0x0F7C, 0x039F, 0x0101, 0x0FBF, 0x0007,
-0x001F, 0x0F78, 0x0392, 0x0115, 0x0FBA, 0x0008,
-0x001F, 0x0F74, 0x0385, 0x012B, 0x0FB5, 0x0008,
-0x0020, 0x0F71, 0x0376, 0x0140, 0x0FB0, 0x0009,
-0x0020, 0x0F6E, 0x0367, 0x0155, 0x0FAB, 0x000B,
-0x0020, 0x0F6C, 0x0357, 0x016B, 0x0FA6, 0x000C,
-0x0020, 0x0F6A, 0x0347, 0x0180, 0x0FA2, 0x000D,
-0x0020, 0x0F69, 0x0336, 0x0196, 0x0F9D, 0x000E,
-0x0020, 0x0F69, 0x0325, 0x01AB, 0x0F98, 0x000F,
-0x001F, 0x0F68, 0x0313, 0x01C3, 0x0F93, 0x0010,
-0x001F, 0x0F69, 0x0300, 0x01D8, 0x0F8F, 0x0011,
-0x001E, 0x0F69, 0x02ED, 0x01EF, 0x0F8B, 0x0012,
-0x001D, 0x0F6A, 0x02D9, 0x0205, 0x0F87, 0x0014,
-0x001D, 0x0F6C, 0x02C5, 0x021A, 0x0F83, 0x0015,
-0x001C, 0x0F6E, 0x02B1, 0x0230, 0x0F7F, 0x0016,
-0x001B, 0x0F70, 0x029C, 0x0247, 0x0F7B, 0x0017,
-0x001A, 0x0F72, 0x0287, 0x025D, 0x0F78, 0x0018,
-0x0019, 0x0F75, 0x0272, 0x0272, 0x0F75, 0x0019
-};
 // Blur and scale coefficients
 //========================================================
 // <using>			gen_BlurScale_coeffs.m
@@ -613,47 +341,6 @@ struct scale_ratio_to_sharpness_level_adj sharpness_level_adj[NUM_SHARPNESS_ADJ_
 	{1, 1, 5},
 };
 
-const uint32_t *spl_get_filter_isharp_1D_lut_0(void)
-{
-	return filter_isharp_1D_lut_0;
-}
-const uint32_t *spl_get_filter_isharp_1D_lut_0p5x(void)
-{
-	return filter_isharp_1D_lut_0p5x;
-}
-const uint32_t *spl_get_filter_isharp_1D_lut_1p0x(void)
-{
-	return filter_isharp_1D_lut_1p0x;
-}
-const uint32_t *spl_get_filter_isharp_1D_lut_1p5x(void)
-{
-	return filter_isharp_1D_lut_1p5x;
-}
-const uint32_t *spl_get_filter_isharp_1D_lut_2p0x(void)
-{
-	return filter_isharp_1D_lut_2p0x;
-}
-const uint32_t *spl_get_filter_isharp_1D_lut_3p0x(void)
-{
-	return filter_isharp_1D_lut_3p0x;
-}
-const uint16_t *spl_get_filter_isharp_wide_6tap_64p(void)
-{
-	return filter_isharp_wide_6tap_64p;
-}
-const uint16_t *spl_get_filter_isharp_bs_4tap_in_6_64p(void)
-{
-	return filter_isharp_bs_4tap_in_6_64p_s1_12;
-}
-const uint16_t *spl_get_filter_isharp_bs_4tap_64p(void)
-{
-	return filter_isharp_bs_4tap_64p_s1_12;
-}
-const uint16_t *spl_get_filter_isharp_bs_3tap_64p(void)
-{
-	return filter_isharp_bs_3tap_64p_s1_12;
-}
-
 static unsigned int spl_calculate_sharpness_level_adj(struct spl_fixed31_32 ratio)
 {
 	int j;
@@ -693,7 +380,7 @@ static unsigned int spl_calculate_sharpness_level_adj(struct spl_fixed31_32 rati
 }
 
 static unsigned int spl_calculate_sharpness_level(struct spl_fixed31_32 ratio,
-		int discrete_sharpness_level, enum system_setup setup,
+		unsigned int discrete_sharpness_level, enum system_setup setup,
 		struct spl_sharpness_range sharpness_range,
 		enum scale_to_sharpness_policy scale_to_sharpness_policy)
 {
@@ -827,11 +514,11 @@ uint32_t *spl_get_pregen_filter_isharp_1D_lut(enum system_setup setup)
 const uint16_t *spl_dscl_get_blur_scale_coeffs_64p(int taps)
 {
 	if (taps == 3)
-		return spl_get_filter_isharp_bs_3tap_64p();
+		return filter_isharp_bs_3tap_64p_s1_12;
 	else if (taps == 4)
-		return spl_get_filter_isharp_bs_4tap_64p();
+		return filter_isharp_bs_4tap_64p_s1_12;
 	else if (taps == 6)
-		return spl_get_filter_isharp_bs_4tap_in_6_64p();
+		return filter_isharp_bs_4tap_in_6_64p_s1_12;
 	else {
 		/* should never happen, bug */
 		SPL_BREAK_TO_DEBUGGER();
drivers/gpu/drm/amd/display/dc/sspl/dc_spl_isharp_filters.h +5 -13
index 7d0be2fc2d00..f5e3d3ecc913 100644
@@ -7,19 +7,6 @@
 
 #include "dc_spl_types.h"
 
-const uint32_t *spl_get_filter_isharp_1D_lut_0(void);
-const uint32_t *spl_get_filter_isharp_1D_lut_0p5x(void);
-const uint32_t *spl_get_filter_isharp_1D_lut_1p0x(void);
-const uint32_t *spl_get_filter_isharp_1D_lut_1p5x(void);
-const uint32_t *spl_get_filter_isharp_1D_lut_2p0x(void);
-const uint32_t *spl_get_filter_isharp_1D_lut_3p0x(void);
-const uint16_t *spl_get_filter_isharp_bs_4tap_in_6_64p(void);
-const uint16_t *spl_get_filter_isharp_bs_4tap_64p(void);
-const uint16_t *spl_get_filter_isharp_bs_3tap_64p(void);
-const uint16_t *spl_get_filter_isharp_wide_6tap_64p(void);
-const uint16_t *spl_dscl_get_blur_scale_coeffs_64p(int taps);
-const uint16_t *spl_dscl_get_blur_scale_coeffs_64p_s1_10(int taps);
-
 #define NUM_SHARPNESS_ADJ_LEVELS 6
 struct scale_ratio_to_sharpness_level_adj {
 	unsigned int ratio_numer;
@@ -47,4 +34,9 @@ void spl_set_blur_scale_data(struct dscl_prog_data *dscl_prog_data,
 void spl_build_isharp_1dlut_from_reference_curve(struct spl_fixed31_32 ratio, enum system_setup setup,
 	struct adaptive_sharpness sharpness, enum scale_to_sharpness_policy scale_to_sharpness_policy);
 uint32_t *spl_get_pregen_filter_isharp_1D_lut(enum system_setup setup);
+
+// public API
+const uint16_t *spl_dscl_get_blur_scale_coeffs_64p(int taps);
+const uint16_t *spl_dscl_get_blur_scale_coeffs_64p_s1_10(int taps);
+
 #endif /* __DC_SPL_ISHARP_FILTERS_H__ */
drivers/gpu/drm/amd/display/dc/sspl/dc_spl_scl_easf_filters.c +19 -20
index 5f4e2e36c91f..0d1bd81ff04a 100644
@@ -1136,7 +1136,6 @@ static const uint16_t easf_filter_6tap_64p_ratio_1_00[198] = {
 };
 
 /* Converted scaler coeff tables from S1.10 to S1.12 */
-
 static const uint16_t easf_filter_3tap_64p_ratio_0_30_s1_12[99] = {
 0x0800, 0x0800, 0x0000,
 0x07d8, 0x0818, 0x0010,
@@ -2001,7 +2000,7 @@ static const uint16_t easf_filter_6tap_64p_ratio_1_00_s1_12[198] = {
 0x0064, 0x3dd4, 0x09c8, 0x09c8, 0x3dd4, 0x0064,
 };
 
-struct scale_ratio_to_reg_value_lookup easf_v_bf3_mode_lookup[] = {
+static struct scale_ratio_to_reg_value_lookup easf_v_bf3_mode_lookup[] = {
 	{3, 10, 0x0000},
 	{4, 10, 0x0000},
 	{5, 10, 0x0000},
@@ -2013,7 +2012,7 @@ struct scale_ratio_to_reg_value_lookup easf_v_bf3_mode_lookup[] = {
 	{-1, -1, 0x0002},
 };
 
-struct scale_ratio_to_reg_value_lookup easf_h_bf3_mode_lookup[] = {
+static struct scale_ratio_to_reg_value_lookup easf_h_bf3_mode_lookup[] = {
 	{3, 10, 0x0000},
 	{4, 10, 0x0000},
 	{5, 10, 0x0000},
@@ -2025,7 +2024,7 @@ struct scale_ratio_to_reg_value_lookup easf_h_bf3_mode_lookup[] = {
 	{-1, -1, 0x0002},
 };
 
-struct scale_ratio_to_reg_value_lookup easf_reducer_gain6_6tap_lookup[] = {
+static struct scale_ratio_to_reg_value_lookup easf_reducer_gain6_6tap_lookup[] = {
 	{3, 10, 0x4100},
 	{4, 10, 0x4100},
 	{5, 10, 0x4100},
@@ -2037,7 +2036,7 @@ struct scale_ratio_to_reg_value_lookup easf_reducer_gain6_6tap_lookup[] = {
 	{-1, -1, 0x4100},
 };
 
-struct scale_ratio_to_reg_value_lookup easf_reducer_gain4_6tap_lookup[] = {
+static struct scale_ratio_to_reg_value_lookup easf_reducer_gain4_6tap_lookup[] = {
 	{3, 10, 0x4000},
 	{4, 10, 0x4000},
 	{5, 10, 0x4000},
@@ -2049,7 +2048,7 @@ struct scale_ratio_to_reg_value_lookup easf_reducer_gain4_6tap_lookup[] = {
 	{-1, -1, 0x4000},
 };
 
-struct scale_ratio_to_reg_value_lookup easf_gain_ring6_6tap_lookup[] = {
+static struct scale_ratio_to_reg_value_lookup easf_gain_ring6_6tap_lookup[] = {
 	{3, 10, 0x0000},
 	{4, 10, 0x251F},
 	{5, 10, 0x291F},
@@ -2061,7 +2060,7 @@ struct scale_ratio_to_reg_value_lookup easf_gain_ring6_6tap_lookup[] = {
 	{-1, -1, 0xA640},
 };
 
-struct scale_ratio_to_reg_value_lookup easf_gain_ring4_6tap_lookup[] = {
+static struct scale_ratio_to_reg_value_lookup easf_gain_ring4_6tap_lookup[] = {
 	{3, 10, 0x0000},
 	{4, 10, 0x9600},
 	{5, 10, 0xA460},
@@ -2073,7 +2072,7 @@ struct scale_ratio_to_reg_value_lookup easf_gain_ring4_6tap_lookup[] = {
 	{-1, -1, 0xB058},
 };
 
-struct scale_ratio_to_reg_value_lookup easf_reducer_gain6_4tap_lookup[] = {
+static struct scale_ratio_to_reg_value_lookup easf_reducer_gain6_4tap_lookup[] = {
 	{3, 10, 0x4100},
 	{4, 10, 0x4100},
 	{5, 10, 0x4100},
@@ -2085,7 +2084,7 @@ struct scale_ratio_to_reg_value_lookup easf_reducer_gain6_4tap_lookup[] = {
 	{-1, -1, 0x4100},
 };
 
-struct scale_ratio_to_reg_value_lookup easf_reducer_gain4_4tap_lookup[] = {
+static struct scale_ratio_to_reg_value_lookup easf_reducer_gain4_4tap_lookup[] = {
 	{3, 10, 0x4000},
 	{4, 10, 0x4000},
 	{5, 10, 0x4000},
@@ -2097,7 +2096,7 @@ struct scale_ratio_to_reg_value_lookup easf_reducer_gain4_4tap_lookup[] = {
 	{-1, -1, 0x4000},
 };
 
-struct scale_ratio_to_reg_value_lookup easf_gain_ring6_4tap_lookup[] = {
+static struct scale_ratio_to_reg_value_lookup easf_gain_ring6_4tap_lookup[] = {
 	{3, 10, 0x0000},
 	{4, 10, 0x0000},
 	{5, 10, 0x0000},
@@ -2109,7 +2108,7 @@ struct scale_ratio_to_reg_value_lookup easf_gain_ring6_4tap_lookup[] = {
 	{-1, -1, 0x0000},
 };
 
-struct scale_ratio_to_reg_value_lookup easf_gain_ring4_4tap_lookup[] = {
+static struct scale_ratio_to_reg_value_lookup easf_gain_ring4_4tap_lookup[] = {
 	{3, 10, 0x0000},
 	{4, 10, 0x0000},
 	{5, 10, 0x0000},
@@ -2121,7 +2120,7 @@ struct scale_ratio_to_reg_value_lookup easf_gain_ring4_4tap_lookup[] = {
 	{-1, -1, 0xAC00},
 };
 
-struct scale_ratio_to_reg_value_lookup easf_3tap_dntilt_uptilt_offset_lookup[] = {
+static struct scale_ratio_to_reg_value_lookup easf_3tap_dntilt_uptilt_offset_lookup[] = {
 	{3, 10, 0x0000},
 	{4, 10, 0x0000},
 	{5, 10, 0x0000},
@@ -2133,7 +2132,7 @@ struct scale_ratio_to_reg_value_lookup easf_3tap_dntilt_uptilt_offset_lookup[] =
 	{-1, -1, 0xA8D8},
 };
 
-struct scale_ratio_to_reg_value_lookup easf_3tap_uptilt_maxval_lookup[] = {
+static struct scale_ratio_to_reg_value_lookup easf_3tap_uptilt_maxval_lookup[] = {
 	{3, 10, 0x0000},
 	{4, 10, 0x0000},
 	{5, 10, 0x0000},
@@ -2145,7 +2144,7 @@ struct scale_ratio_to_reg_value_lookup easf_3tap_uptilt_maxval_lookup[] = {
 	{-1, -1, 0x3ADB},
 };
 
-struct scale_ratio_to_reg_value_lookup easf_3tap_dntilt_slope_lookup[] = {
+static struct scale_ratio_to_reg_value_lookup easf_3tap_dntilt_slope_lookup[] = {
 	{3, 10, 0x3800},
 	{4, 10, 0x3800},
 	{5, 10, 0x3800},
@@ -2157,7 +2156,7 @@ struct scale_ratio_to_reg_value_lookup easf_3tap_dntilt_slope_lookup[] = {
 	{-1, -1, 0x3B66},
 };
 
-struct scale_ratio_to_reg_value_lookup easf_3tap_uptilt1_slope_lookup[] = {
+static struct scale_ratio_to_reg_value_lookup easf_3tap_uptilt1_slope_lookup[] = {
 	{3, 10, 0x3800},
 	{4, 10, 0x3800},
 	{5, 10, 0x3800},
@@ -2169,7 +2168,7 @@ struct scale_ratio_to_reg_value_lookup easf_3tap_uptilt1_slope_lookup[] = {
 	{-1, -1, 0x2F20},
 };
 
-struct scale_ratio_to_reg_value_lookup easf_3tap_uptilt2_slope_lookup[] = {
+static struct scale_ratio_to_reg_value_lookup easf_3tap_uptilt2_slope_lookup[] = {
 	{3, 10, 0x0000},
 	{4, 10, 0x0000},
 	{5, 10, 0x0000},
@@ -2181,7 +2180,7 @@ struct scale_ratio_to_reg_value_lookup easf_3tap_uptilt2_slope_lookup[] = {
 	{-1, -1, 0x1F00},
 };
 
-struct scale_ratio_to_reg_value_lookup easf_3tap_uptilt2_offset_lookup[] = {
+static struct scale_ratio_to_reg_value_lookup easf_3tap_uptilt2_offset_lookup[] = {
 	{3, 10, 0x0000},
 	{4, 10, 0x0000},
 	{5, 10, 0x0000},
@@ -2193,7 +2192,7 @@ struct scale_ratio_to_reg_value_lookup easf_3tap_uptilt2_offset_lookup[] = {
 	{-1, -1, 0x9E00},
 };
 
-const uint16_t *spl_get_easf_filter_3tap_64p(struct spl_fixed31_32 ratio)
+static const uint16_t *spl_get_easf_filter_3tap_64p(struct spl_fixed31_32 ratio)
 {
 	if (ratio.value < spl_fixpt_from_fraction(3, 10).value)
 		return easf_filter_3tap_64p_ratio_0_30_s1_12;
@@ -2213,7 +2212,7 @@ const uint16_t *spl_get_easf_filter_3tap_64p(struct spl_fixed31_32 ratio)
 		return easf_filter_3tap_64p_ratio_1_00_s1_12;
 }
 
-const uint16_t *spl_get_easf_filter_4tap_64p(struct spl_fixed31_32 ratio)
+static const uint16_t *spl_get_easf_filter_4tap_64p(struct spl_fixed31_32 ratio)
 {
 	if (ratio.value < spl_fixpt_from_fraction(3, 10).value)
 		return easf_filter_4tap_64p_ratio_0_30_s1_12;
@@ -2233,7 +2232,7 @@ const uint16_t *spl_get_easf_filter_4tap_64p(struct spl_fixed31_32 ratio)
 		return easf_filter_4tap_64p_ratio_1_00_s1_12;
 }
 
-const uint16_t *spl_get_easf_filter_6tap_64p(struct spl_fixed31_32 ratio)
+static const uint16_t *spl_get_easf_filter_6tap_64p(struct spl_fixed31_32 ratio)
 {
 	if (ratio.value < spl_fixpt_from_fraction(3, 10).value)
 		return easf_filter_6tap_64p_ratio_0_30_s1_12;
drivers/gpu/drm/amd/display/dc/sspl/dc_spl_scl_easf_filters.h +4 -5
index edc2b5d25c13..321ae22a04d4 100644
@@ -13,14 +13,9 @@ struct scale_ratio_to_reg_value_lookup {
 	const uint32_t reg_value;
 };
 
-const uint16_t *spl_get_easf_filter_3tap_64p(struct spl_fixed31_32 ratio);
-const uint16_t *spl_get_easf_filter_4tap_64p(struct spl_fixed31_32 ratio);
-const uint16_t *spl_get_easf_filter_6tap_64p(struct spl_fixed31_32 ratio);
 void spl_set_filters_data(struct dscl_prog_data *dscl_prog_data,
 	const struct spl_scaler_data *data, bool enable_easf_v,
 	bool enable_easf_h);
-const uint16_t *spl_dscl_get_easf_filter_coeffs_64p(int taps, struct spl_fixed31_32 ratio);
-const uint16_t *spl_dscl_get_easf_filter_coeffs_64p_s1_10(int taps, struct spl_fixed31_32 ratio);
 
 uint32_t spl_get_v_bf3_mode(struct spl_fixed31_32 ratio);
 uint32_t spl_get_h_bf3_mode(struct spl_fixed31_32 ratio);
@@ -35,4 +30,8 @@ uint32_t spl_get_3tap_uptilt1_slope(int taps, struct spl_fixed31_32 ratio);
 uint32_t spl_get_3tap_uptilt2_slope(int taps, struct spl_fixed31_32 ratio);
 uint32_t spl_get_3tap_uptilt2_offset(int taps, struct spl_fixed31_32 ratio);
 
+/* public API */
+const uint16_t *spl_dscl_get_easf_filter_coeffs_64p(int taps, struct spl_fixed31_32 ratio);
+const uint16_t *spl_dscl_get_easf_filter_coeffs_64p_s1_10(int taps, struct spl_fixed31_32 ratio);
+
 #endif /* __DC_SPL_SCL_EASF_FILTERS_H__ */
drivers/gpu/drm/amd/display/dc/sspl/dc_spl_scl_filters.c +7 -225

283 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/sspl/dc_spl_scl_filters.h +1 -10
index 48202bc4f81e..c315a438d064 100644
@@ -7,16 +7,7 @@
 
 #include "dc_spl_types.h"
 
-const uint16_t *spl_get_filter_3tap_16p(struct spl_fixed31_32 ratio);
-const uint16_t *spl_get_filter_3tap_64p(struct spl_fixed31_32 ratio);
-const uint16_t *spl_get_filter_4tap_16p(struct spl_fixed31_32 ratio);
-const uint16_t *spl_get_filter_4tap_64p(struct spl_fixed31_32 ratio);
-const uint16_t *spl_get_filter_5tap_64p(struct spl_fixed31_32 ratio);
-const uint16_t *spl_get_filter_6tap_64p(struct spl_fixed31_32 ratio);
-const uint16_t *spl_get_filter_7tap_64p(struct spl_fixed31_32 ratio);
-const uint16_t *spl_get_filter_8tap_64p(struct spl_fixed31_32 ratio);
-const uint16_t *spl_get_filter_2tap_16p(void);
-const uint16_t *spl_get_filter_2tap_64p(void);
+/* public API */
 const uint16_t *spl_dscl_get_filter_coeffs_64p(int taps, struct spl_fixed31_32 ratio);
 
 #endif /* __DC_SPL_SCL_FILTERS_H__ */
Signature · 1 line
2.48.1
#15 lore raw

PATCH 14/14 drm/amd/display: 3.2.320

In reply to Aurabindo Pillai

From: Taimur Hassan <[email protected]>

Summary:

* Start enabling support for 4-plane MPO
* DML21 Updates
* SPL Updates
* Other minor fixes

---
 drivers/gpu/drm/amd/display/dc/dc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
index 16cd7833e931..ab88ce02893e 100644
@@ -53,7 +53,7 @@ struct aux_payload;
 struct set_config_cmd_payload;
 struct dmub_notification;
 
-#define DC_VER "3.2.319"
+#define DC_VER "3.2.320"
 
 /**
  * MAX_SURFACES - representative of the upper bound of surfaces that can be piped to a single CRTC
Signature · 1 line
2.48.1
Tested-by on the v1 series
#16 lore raw
In reply to Aurabindo Pillai

[Public]

Hi all,

This week this patchset was tested on 4 systems, two dGPU and two APU based, and tested across multiple display and connection types.

APU
* Single Display eDP -> 1080p 60hz, 2560x1600 120hz, 1920x1200 165hz
* Single Display DP (SST DSC) -> 4k144hz, 4k240hz
* Multi display -> eDP + DP/HDMI/USB-C -> 1080p 60hz eDP + 4k 144hz, 4k 240hz (Includes USB-C to DP/HDMI adapters)
* Thunderbolt -> LG Ultrafine 5k
* MST DSC -> Cable Matters 101075 (DP to 3x DP) with 3x 4k60hz displays, HP Hook G2 with 2x 4k60hz displays
* USB 4 -> HP Hook G4, Lenovo Thunderbolt Dock, both with 2x 4k60hz DP and 1x 4k60hz HDMI displays
* SST PCON -> Club3D CAC-1085 + 1x 4k 144hz, FRL3, at a max resolution supported by the dongle of 4k 120hz YUV420 12bpc.
* MST PCON -> 1x 4k 144hz, FRL3, at a max resolution supported by the adapter of 4k 120hz RGB 8bpc.

DGPU
* Single Display DP (SST DSC) -> 4k144hz, 4k240hz
* Multiple Display DP -> 4k240hz + 4k144hz
* MST (Startech MST14DP123DP [DP to 3x DP] and 2x 4k 60hz displays)
* MST DSC (with Cable Matters 101075 [DP to 3x DP] with 3x 4k60hz displays)

The testing is a mix of automated and manual tests. Manual testing includes (but is not limited to)
* Changing display configurations and settings
* Video/Audio playback
* Benchmark testing
* Suspend/Resume testing
* Feature testing (Freesync, HDCP, etc.)

Automated testing includes (but is not limited to)
* Script testing (scripts to automate some of the manual checks)
* IGT testing

The testing is mainly tested on the following displays, but occasionally there are tests with other displays
* Samsung G8 Neo 4k240hz
* Samsung QN55QN95B 4k 120hz
* Acer XV322QKKV 4k144hz
* HP U27 4k Wireless 4k60hz
* LG 27UD58B 4k60hz
* LG 32UN650WA 4k60hz
* LG Ultrafine 5k 5k60hz
* AU Optronics B140HAN01.1 1080p 60hz eDP
* AU Optronics B160UAN01.J 1920x1200 165hz eDP
* AU Optronics B160QAN02.L 2560x1600 120hz eDP

The patchset consists of the amd-staging-drm-next branch (Head commit - 06fbedfaf1a93cd81387ecd517dc48f5b89fc465 -> Revert "drm/amd/display: Use HW lock mgr for PSR1") with new patches added on top of it.

Tested on Ubuntu 24.04.1, on Wayland and X11, using KDE Plasma and Gnome.

Thank you,

Dan Wheeler
Sr. Technologist | AMD
SW Display
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
Facebook | Twitter | amd.com

-----Original Message-----
From: Aurabindo Pillai <[email protected]>
Sent: Wednesday, February 5, 2025 1:39 PM
To: [email protected]
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Siqueira, Rodrigo <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Zuo, Jerry <[email protected]>; Mohamed, Zaeem <[email protected]>; Chiu, Solomon <[email protected]>; Wheeler, Daniel <[email protected]>
Subject: [PATCH 00/14] DC Patches for 10 Feb 2025

Summary:
* Start enabling support for 4-plane MPO
* DML21 Updates
* SPL Updates
* Other minor fixes

------------------------------------------------------

Aurabindo Pillai (1):
drm/amd/display: Make dcn401_program_pipe non static

Ausef Yousof (1):
drm/amd/display: limit coverage of optimization skip

Austin Zheng (1):
drm/amd/display: DML21 Reintegration

Brendan Tam (1):
drm/amd/display: add workaround flag to link to force FFE preset

Charlene Liu (1):
drm/amd/display: pass calculated dram_speed_mts to dml2

Ilya Bakoulin (1):
drm/amd/display: Don't try AUX transactions on disconnected link

Leo Zeng (1):
drm/amd/display: add new IRQ enum for underflows

Samson Tam (4):
drm/amd/display: use s1_12 filter tables in SPL
drm/amd/display: remove TF check for LLS policy
drm/amd/display: add s1_12 filter tables
drm/amd/display: sspl: cleanup filter code

Taimur Hassan (1):
drm/amd/display: 3.2.320

Zaeem Mohamed (2):
drm/amd/display: Expose 3 secondary planes for supported ASICs drm/amd/display: docstring definitions MAX_SURFACES and MAX_PLANES

 drivers/gpu/drm/amd/display/dc/dc.h           |    10 +-
 .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c  |     2 +
 .../amd/display/dc/dml/dcn351/dcn351_fpu.c    |     1 +
 .../display/dc/dml2/dml21/inc/dml_top_types.h |     5 -
 .../dml2/dml21/src/dml2_core/dml2_core_dcn4.c |    22 +-
 .../dml2/dml21/src/dml2_core/dml2_core_dcn4.h |     3 -
 .../src/dml2_core/dml2_core_dcn4_calcs.c      |    94 +-
 .../dml21/src/dml2_core/dml2_core_shared.c    | 12413 ----------------
 .../src/dml2_core/dml2_core_shared_types.h    |     9 +-
 .../dml21/src/dml2_core/dml2_core_utils.c     |     3 +-
 .../dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c |     6 +-
 .../dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h |     2 -
 .../dml21/src/dml2_mcg/dml2_mcg_factory.c     |     2 +-
 .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c  |     5 +-
 .../dml21/src/dml2_top/dml2_top_interfaces.c  |     1 -
 .../dc/dml2/dml21/src/dml2_top/dml_top.c      |   354 -
 .../dc/dml2/dml21/src/inc/dml2_debug.c        |     5 -
 .../dc/dml2/dml21/src/inc/dml2_debug.h        |     6 +-
 .../src/inc/dml2_internal_shared_types.h      |     6 -
 .../drm/amd/display/dc/dml2/dml2_wrapper.h    |     1 +
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c |     2 +-
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.h |     4 +
 drivers/gpu/drm/amd/display/dc/irq_types.h    |     1 +
 .../display/dc/link/protocols/link_dp_phy.c   |     8 +-
 .../dc/link/protocols/link_dp_training.c      |     2 +
 .../dc/resource/dcn21/dcn21_resource.c        |     6 +-
 .../dc/resource/dcn35/dcn35_resource.c        |     7 +-
 .../dc/resource/dcn351/dcn351_resource.c      |     7 +-
 .../dc/resource/dcn401/dcn401_resource.c      |    12 +-
 drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c  |    31 +-
 .../display/dc/sspl/dc_spl_isharp_filters.c   |   452 +-
 .../display/dc/sspl/dc_spl_isharp_filters.h   |    18 +-
 .../display/dc/sspl/dc_spl_scl_easf_filters.c |  1058 +-
 .../display/dc/sspl/dc_spl_scl_easf_filters.h |     9 +-
 .../amd/display/dc/sspl/dc_spl_scl_filters.c  |   232 +-
 .../amd/display/dc/sspl/dc_spl_scl_filters.h  |    11 +-
 36 files changed, 1231 insertions(+), 13579 deletions(-)  delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml_top.c

--
2.48.1