All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amd/display: Embed DCN2 SOC bounding box
@ 2019-07-30 13:57 Nicholas Kazlauskas
       [not found] ` <20190730135733.14563-1-nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Nicholas Kazlauskas @ 2019-07-30 13:57 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Alex Deucher, Harry Wentland, Nicholas Kazlauskas

[Why]
In order to support uclk switching on NV10 the SOC bounding box
needs to be updated.

[How]
We currently read the constants from the gpu info FW, but supporting
workarounds in DC for different versions of the FW adds additional
complexity to the codebase.

NV10 has been released so it's cleanest to keep the bounding box and
source code in sync by embedding the bounding box like we do for
other ASICs.

Fixes: 02316e963a5a ("drm/amd/display: Force uclk to max for every state")

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
---
 .../drm/amd/display/dc/dcn20/dcn20_resource.c | 114 +++++++++++++++++-
 1 file changed, 112 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
index 44537651f0a1..ff30f5cc4981 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
@@ -80,7 +80,7 @@
 
 #include "amdgpu_socbb.h"
 
-#define SOC_BOUNDING_BOX_VALID false
+#define SOC_BOUNDING_BOX_VALID true
 #define DC_LOGGER_INIT(logger)
 
 struct _vcs_dpi_ip_params_st dcn2_0_ip = {
@@ -154,7 +154,117 @@ struct _vcs_dpi_ip_params_st dcn2_0_ip = {
 	.xfc_fill_constant_bytes = 0,
 };
 
-struct _vcs_dpi_soc_bounding_box_st dcn2_0_soc = { 0 };
+struct _vcs_dpi_soc_bounding_box_st dcn2_0_soc = {
+	/* Defaults that get patched on driver load from firmware. */
+	.clock_limits = {
+			{
+				.state = 0,
+				.dcfclk_mhz = 560.0,
+				.fabricclk_mhz = 560.0,
+				.dispclk_mhz = 513.0,
+				.dppclk_mhz = 513.0,
+				.phyclk_mhz = 540.0,
+				.socclk_mhz = 560.0,
+				.dscclk_mhz = 171.0,
+				.dram_speed_mts = 8960.0,
+			},
+			{
+				.state = 1,
+				.dcfclk_mhz = 694.0,
+				.fabricclk_mhz = 694.0,
+				.dispclk_mhz = 642.0,
+				.dppclk_mhz = 642.0,
+				.phyclk_mhz = 600.0,
+				.socclk_mhz = 694.0,
+				.dscclk_mhz = 214.0,
+				.dram_speed_mts = 11104.0,
+			},
+			{
+				.state = 2,
+				.dcfclk_mhz = 875.0,
+				.fabricclk_mhz = 875.0,
+				.dispclk_mhz = 734.0,
+				.dppclk_mhz = 734.0,
+				.phyclk_mhz = 810.0,
+				.socclk_mhz = 875.0,
+				.dscclk_mhz = 245.0,
+				.dram_speed_mts = 14000.0,
+			},
+			{
+				.state = 3,
+				.dcfclk_mhz = 1000.0,
+				.fabricclk_mhz = 1000.0,
+				.dispclk_mhz = 1100.0,
+				.dppclk_mhz = 1100.0,
+				.phyclk_mhz = 810.0,
+				.socclk_mhz = 1000.0,
+				.dscclk_mhz = 367.0,
+				.dram_speed_mts = 16000.0,
+			},
+			{
+				.state = 4,
+				.dcfclk_mhz = 1200.0,
+				.fabricclk_mhz = 1200.0,
+				.dispclk_mhz = 1284.0,
+				.dppclk_mhz = 1284.0,
+				.phyclk_mhz = 810.0,
+				.socclk_mhz = 1200.0,
+				.dscclk_mhz = 428.0,
+				.dram_speed_mts = 16000.0,
+			},
+			/*Extra state, no dispclk ramping*/
+			{
+				.state = 5,
+				.dcfclk_mhz = 1200.0,
+				.fabricclk_mhz = 1200.0,
+				.dispclk_mhz = 1284.0,
+				.dppclk_mhz = 1284.0,
+				.phyclk_mhz = 810.0,
+				.socclk_mhz = 1200.0,
+				.dscclk_mhz = 428.0,
+				.dram_speed_mts = 16000.0,
+			},
+		},
+	.num_states = 5,
+	.sr_exit_time_us = 8.6,
+	.sr_enter_plus_exit_time_us = 10.9,
+	.urgent_latency_us = 4.0,
+	.urgent_latency_pixel_data_only_us = 4.0,
+	.urgent_latency_pixel_mixed_with_vm_data_us = 4.0,
+	.urgent_latency_vm_data_only_us = 4.0,
+	.urgent_out_of_order_return_per_channel_pixel_only_bytes = 4096,
+	.urgent_out_of_order_return_per_channel_pixel_and_vm_bytes = 4096,
+	.urgent_out_of_order_return_per_channel_vm_only_bytes = 4096,
+	.pct_ideal_dram_sdp_bw_after_urgent_pixel_only = 40.0,
+	.pct_ideal_dram_sdp_bw_after_urgent_pixel_and_vm = 40.0,
+	.pct_ideal_dram_sdp_bw_after_urgent_vm_only = 40.0,
+	.max_avg_sdp_bw_use_normal_percent = 40.0,
+	.max_avg_dram_bw_use_normal_percent = 40.0,
+	.writeback_latency_us = 12.0,
+	.ideal_dram_bw_after_urgent_percent = 40.0,
+	.max_request_size_bytes = 256,
+	.dram_channel_width_bytes = 2,
+	.fabric_datapath_to_dcn_data_return_bytes = 64,
+	.dcn_downspread_percent = 0.5,
+	.downspread_percent = 0.38,
+	.dram_page_open_time_ns = 50.0,
+	.dram_rw_turnaround_time_ns = 17.5,
+	.dram_return_buffer_per_channel_bytes = 8192,
+	.round_trip_ping_latency_dcfclk_cycles = 131,
+	.urgent_out_of_order_return_per_channel_bytes = 256,
+	.channel_interleave_bytes = 256,
+	.num_banks = 8,
+	.num_chans = 16,
+	.vmm_page_size_bytes = 4096,
+	.dram_clock_change_latency_us = 404.0,
+	.dummy_pstate_latency_us = 5.0,
+	.writeback_dram_clock_change_latency_us = 23.0,
+	.return_bus_width_bytes = 64,
+	.dispclk_dppclk_vco_speed_mhz = 3850,
+	.xfc_bus_transport_time_us = 20,
+	.xfc_xbuf_latency_tolerance_us = 4,
+	.use_urgent_burst_bw = 0
+};
 
 
 #ifndef mmDP0_DP_DPHY_INTERNAL_CTRL
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] drm/amd/display: Support uclk switching for DCN2
       [not found] ` <20190730135733.14563-1-nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org>
@ 2019-07-30 13:57   ` Nicholas Kazlauskas
       [not found]     ` <20190730135733.14563-2-nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org>
  2019-07-30 14:21   ` [PATCH 1/2] drm/amd/display: Embed DCN2 SOC bounding box Ernst Sjöstrand
  1 sibling, 1 reply; 5+ messages in thread
From: Nicholas Kazlauskas @ 2019-07-30 13:57 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Leo Li, Harry Wentland, Nicholas Kazlauskas

[Why]
We were previously forcing the uclk for every state to max and reducing
the switch time to prevent uclk switching from occuring. This workaround
was previously needed in order to avoid hangs + underflow under certain
display configurations.

Now that DC has the proper fix complete we can drop the hacks and
improve power for most display configurations.

[How]
We still need the function pointers hooked up to grab the real uclk
states from pplib. The rest of the prior hack can be reverted.

The key requirements here are really just DC support, updated firmware,
and support for disabling p-state support when needed in pplib/smu.

When these requirements are met uclk switching works without underflow
or hangs.

Fixes: 02316e963a5a ("drm/amd/display: Force uclk to max for every state")

Cc: Leo Li <sunpeng.li@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
index ff30f5cc4981..42d3666f2037 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
@@ -2817,9 +2817,6 @@ static void cap_soc_clocks(
 						&& max_clocks.uClockInKhz != 0)
 			bb->clock_limits[i].dram_speed_mts = (max_clocks.uClockInKhz / 1000) * 16;
 
-		// HACK: Force every uclk to max for now to "disable" uclk switching.
-		bb->clock_limits[i].dram_speed_mts = (max_clocks.uClockInKhz / 1000) * 16;
-
 		if ((bb->clock_limits[i].fabricclk_mhz > (max_clocks.fabricClockInKhz / 1000))
 						&& max_clocks.fabricClockInKhz != 0)
 			bb->clock_limits[i].fabricclk_mhz = (max_clocks.fabricClockInKhz / 1000);
@@ -3035,8 +3032,6 @@ static bool init_soc_bounding_box(struct dc *dc,
 				le32_to_cpu(bb->vmm_page_size_bytes);
 		dcn2_0_soc.dram_clock_change_latency_us =
 				fixed16_to_double_to_cpu(bb->dram_clock_change_latency_us);
-		// HACK!! Lower uclock latency switch time so we don't switch
-		dcn2_0_soc.dram_clock_change_latency_us = 10;
 		dcn2_0_soc.writeback_dram_clock_change_latency_us =
 				fixed16_to_double_to_cpu(bb->writeback_dram_clock_change_latency_us);
 		dcn2_0_soc.return_bus_width_bytes =
@@ -3078,7 +3073,6 @@ static bool init_soc_bounding_box(struct dc *dc,
 		struct pp_smu_nv_clock_table max_clocks = {0};
 		unsigned int uclk_states[8] = {0};
 		unsigned int num_states = 0;
-		int i;
 		enum pp_smu_status status;
 		bool clock_limits_available = false;
 		bool uclk_states_available = false;
@@ -3100,10 +3094,6 @@ static bool init_soc_bounding_box(struct dc *dc,
 			clock_limits_available = (status == PP_SMU_RESULT_OK);
 		}
 
-		// HACK: Use the max uclk_states value for all elements.
-		for (i = 0; i < num_states; i++)
-			uclk_states[i] = uclk_states[num_states - 1];
-
 		if (clock_limits_available && uclk_states_available && num_states)
 			update_bounding_box(dc, &dcn2_0_soc, &max_clocks, uclk_states, num_states);
 		else if (clock_limits_available)
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] drm/amd/display: Support uclk switching for DCN2
       [not found]     ` <20190730135733.14563-2-nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org>
@ 2019-07-30 14:00       ` Alex Deucher
  2019-07-30 14:18       ` Harry Wentland
  1 sibling, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2019-07-30 14:00 UTC (permalink / raw)
  To: Nicholas Kazlauskas; +Cc: Leo Li, Harry Wentland, amd-gfx list

Series is:
Acked-by: Alex Deucher <alexander.deucher@amd.com>

On Tue, Jul 30, 2019 at 9:58 AM Nicholas Kazlauskas
<nicholas.kazlauskas@amd.com> wrote:
>
> [Why]
> We were previously forcing the uclk for every state to max and reducing
> the switch time to prevent uclk switching from occuring. This workaround
> was previously needed in order to avoid hangs + underflow under certain
> display configurations.
>
> Now that DC has the proper fix complete we can drop the hacks and
> improve power for most display configurations.
>
> [How]
> We still need the function pointers hooked up to grab the real uclk
> states from pplib. The rest of the prior hack can be reverted.
>
> The key requirements here are really just DC support, updated firmware,
> and support for disabling p-state support when needed in pplib/smu.
>
> When these requirements are met uclk switching works without underflow
> or hangs.
>
> Fixes: 02316e963a5a ("drm/amd/display: Force uclk to max for every state")
>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
> ---
>  drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 10 ----------
>  1 file changed, 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> index ff30f5cc4981..42d3666f2037 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> @@ -2817,9 +2817,6 @@ static void cap_soc_clocks(
>                                                 && max_clocks.uClockInKhz != 0)
>                         bb->clock_limits[i].dram_speed_mts = (max_clocks.uClockInKhz / 1000) * 16;
>
> -               // HACK: Force every uclk to max for now to "disable" uclk switching.
> -               bb->clock_limits[i].dram_speed_mts = (max_clocks.uClockInKhz / 1000) * 16;
> -
>                 if ((bb->clock_limits[i].fabricclk_mhz > (max_clocks.fabricClockInKhz / 1000))
>                                                 && max_clocks.fabricClockInKhz != 0)
>                         bb->clock_limits[i].fabricclk_mhz = (max_clocks.fabricClockInKhz / 1000);
> @@ -3035,8 +3032,6 @@ static bool init_soc_bounding_box(struct dc *dc,
>                                 le32_to_cpu(bb->vmm_page_size_bytes);
>                 dcn2_0_soc.dram_clock_change_latency_us =
>                                 fixed16_to_double_to_cpu(bb->dram_clock_change_latency_us);
> -               // HACK!! Lower uclock latency switch time so we don't switch
> -               dcn2_0_soc.dram_clock_change_latency_us = 10;
>                 dcn2_0_soc.writeback_dram_clock_change_latency_us =
>                                 fixed16_to_double_to_cpu(bb->writeback_dram_clock_change_latency_us);
>                 dcn2_0_soc.return_bus_width_bytes =
> @@ -3078,7 +3073,6 @@ static bool init_soc_bounding_box(struct dc *dc,
>                 struct pp_smu_nv_clock_table max_clocks = {0};
>                 unsigned int uclk_states[8] = {0};
>                 unsigned int num_states = 0;
> -               int i;
>                 enum pp_smu_status status;
>                 bool clock_limits_available = false;
>                 bool uclk_states_available = false;
> @@ -3100,10 +3094,6 @@ static bool init_soc_bounding_box(struct dc *dc,
>                         clock_limits_available = (status == PP_SMU_RESULT_OK);
>                 }
>
> -               // HACK: Use the max uclk_states value for all elements.
> -               for (i = 0; i < num_states; i++)
> -                       uclk_states[i] = uclk_states[num_states - 1];
> -
>                 if (clock_limits_available && uclk_states_available && num_states)
>                         update_bounding_box(dc, &dcn2_0_soc, &max_clocks, uclk_states, num_states);
>                 else if (clock_limits_available)
> --
> 2.17.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] drm/amd/display: Support uclk switching for DCN2
       [not found]     ` <20190730135733.14563-2-nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org>
  2019-07-30 14:00       ` Alex Deucher
@ 2019-07-30 14:18       ` Harry Wentland
  1 sibling, 0 replies; 5+ messages in thread
From: Harry Wentland @ 2019-07-30 14:18 UTC (permalink / raw)
  To: Kazlauskas, Nicholas, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Li, Sun peng (Leo), Wentland, Harry

On 2019-07-30 9:57 a.m., Nicholas Kazlauskas wrote:
> [Why]
> We were previously forcing the uclk for every state to max and reducing
> the switch time to prevent uclk switching from occuring. This workaround
> was previously needed in order to avoid hangs + underflow under certain
> display configurations.
> 
> Now that DC has the proper fix complete we can drop the hacks and
> improve power for most display configurations.
> 
> [How]
> We still need the function pointers hooked up to grab the real uclk
> states from pplib. The rest of the prior hack can be reverted.
> 
> The key requirements here are really just DC support, updated firmware,
> and support for disabling p-state support when needed in pplib/smu.
> 
> When these requirements are met uclk switching works without underflow
> or hangs.
> 
> Fixes: 02316e963a5a ("drm/amd/display: Force uclk to max for every state")
> 
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

Series is
Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> index ff30f5cc4981..42d3666f2037 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> @@ -2817,9 +2817,6 @@ static void cap_soc_clocks(
>  						&& max_clocks.uClockInKhz != 0)
>  			bb->clock_limits[i].dram_speed_mts = (max_clocks.uClockInKhz / 1000) * 16;
>  
> -		// HACK: Force every uclk to max for now to "disable" uclk switching.
> -		bb->clock_limits[i].dram_speed_mts = (max_clocks.uClockInKhz / 1000) * 16;
> -
>  		if ((bb->clock_limits[i].fabricclk_mhz > (max_clocks.fabricClockInKhz / 1000))
>  						&& max_clocks.fabricClockInKhz != 0)
>  			bb->clock_limits[i].fabricclk_mhz = (max_clocks.fabricClockInKhz / 1000);
> @@ -3035,8 +3032,6 @@ static bool init_soc_bounding_box(struct dc *dc,
>  				le32_to_cpu(bb->vmm_page_size_bytes);
>  		dcn2_0_soc.dram_clock_change_latency_us =
>  				fixed16_to_double_to_cpu(bb->dram_clock_change_latency_us);
> -		// HACK!! Lower uclock latency switch time so we don't switch
> -		dcn2_0_soc.dram_clock_change_latency_us = 10;
>  		dcn2_0_soc.writeback_dram_clock_change_latency_us =
>  				fixed16_to_double_to_cpu(bb->writeback_dram_clock_change_latency_us);
>  		dcn2_0_soc.return_bus_width_bytes =
> @@ -3078,7 +3073,6 @@ static bool init_soc_bounding_box(struct dc *dc,
>  		struct pp_smu_nv_clock_table max_clocks = {0};
>  		unsigned int uclk_states[8] = {0};
>  		unsigned int num_states = 0;
> -		int i;
>  		enum pp_smu_status status;
>  		bool clock_limits_available = false;
>  		bool uclk_states_available = false;
> @@ -3100,10 +3094,6 @@ static bool init_soc_bounding_box(struct dc *dc,
>  			clock_limits_available = (status == PP_SMU_RESULT_OK);
>  		}
>  
> -		// HACK: Use the max uclk_states value for all elements.
> -		for (i = 0; i < num_states; i++)
> -			uclk_states[i] = uclk_states[num_states - 1];
> -
>  		if (clock_limits_available && uclk_states_available && num_states)
>  			update_bounding_box(dc, &dcn2_0_soc, &max_clocks, uclk_states, num_states);
>  		else if (clock_limits_available)
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] drm/amd/display: Embed DCN2 SOC bounding box
       [not found] ` <20190730135733.14563-1-nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org>
  2019-07-30 13:57   ` [PATCH 2/2] drm/amd/display: Support uclk switching for DCN2 Nicholas Kazlauskas
@ 2019-07-30 14:21   ` Ernst Sjöstrand
  1 sibling, 0 replies; 5+ messages in thread
From: Ernst Sjöstrand @ 2019-07-30 14:21 UTC (permalink / raw)
  To: Nicholas Kazlauskas; +Cc: Alex Deucher, Harry Wentland, amd-gfx mailing list

Isn't NV10 a family of chips in Nouveau?

Regards
//Ernst

Den tis 30 juli 2019 kl 15:57 skrev Nicholas Kazlauskas
<nicholas.kazlauskas@amd.com>:
>
> [Why]
> In order to support uclk switching on NV10 the SOC bounding box
> needs to be updated.
>
> [How]
> We currently read the constants from the gpu info FW, but supporting
> workarounds in DC for different versions of the FW adds additional
> complexity to the codebase.
>
> NV10 has been released so it's cleanest to keep the bounding box and
> source code in sync by embedding the bounding box like we do for
> other ASICs.
>
> Fixes: 02316e963a5a ("drm/amd/display: Force uclk to max for every state")
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
> ---
>  .../drm/amd/display/dc/dcn20/dcn20_resource.c | 114 +++++++++++++++++-
>  1 file changed, 112 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> index 44537651f0a1..ff30f5cc4981 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> @@ -80,7 +80,7 @@
>
>  #include "amdgpu_socbb.h"
>
> -#define SOC_BOUNDING_BOX_VALID false
> +#define SOC_BOUNDING_BOX_VALID true
>  #define DC_LOGGER_INIT(logger)
>
>  struct _vcs_dpi_ip_params_st dcn2_0_ip = {
> @@ -154,7 +154,117 @@ struct _vcs_dpi_ip_params_st dcn2_0_ip = {
>         .xfc_fill_constant_bytes = 0,
>  };
>
> -struct _vcs_dpi_soc_bounding_box_st dcn2_0_soc = { 0 };
> +struct _vcs_dpi_soc_bounding_box_st dcn2_0_soc = {
> +       /* Defaults that get patched on driver load from firmware. */
> +       .clock_limits = {
> +                       {
> +                               .state = 0,
> +                               .dcfclk_mhz = 560.0,
> +                               .fabricclk_mhz = 560.0,
> +                               .dispclk_mhz = 513.0,
> +                               .dppclk_mhz = 513.0,
> +                               .phyclk_mhz = 540.0,
> +                               .socclk_mhz = 560.0,
> +                               .dscclk_mhz = 171.0,
> +                               .dram_speed_mts = 8960.0,
> +                       },
> +                       {
> +                               .state = 1,
> +                               .dcfclk_mhz = 694.0,
> +                               .fabricclk_mhz = 694.0,
> +                               .dispclk_mhz = 642.0,
> +                               .dppclk_mhz = 642.0,
> +                               .phyclk_mhz = 600.0,
> +                               .socclk_mhz = 694.0,
> +                               .dscclk_mhz = 214.0,
> +                               .dram_speed_mts = 11104.0,
> +                       },
> +                       {
> +                               .state = 2,
> +                               .dcfclk_mhz = 875.0,
> +                               .fabricclk_mhz = 875.0,
> +                               .dispclk_mhz = 734.0,
> +                               .dppclk_mhz = 734.0,
> +                               .phyclk_mhz = 810.0,
> +                               .socclk_mhz = 875.0,
> +                               .dscclk_mhz = 245.0,
> +                               .dram_speed_mts = 14000.0,
> +                       },
> +                       {
> +                               .state = 3,
> +                               .dcfclk_mhz = 1000.0,
> +                               .fabricclk_mhz = 1000.0,
> +                               .dispclk_mhz = 1100.0,
> +                               .dppclk_mhz = 1100.0,
> +                               .phyclk_mhz = 810.0,
> +                               .socclk_mhz = 1000.0,
> +                               .dscclk_mhz = 367.0,
> +                               .dram_speed_mts = 16000.0,
> +                       },
> +                       {
> +                               .state = 4,
> +                               .dcfclk_mhz = 1200.0,
> +                               .fabricclk_mhz = 1200.0,
> +                               .dispclk_mhz = 1284.0,
> +                               .dppclk_mhz = 1284.0,
> +                               .phyclk_mhz = 810.0,
> +                               .socclk_mhz = 1200.0,
> +                               .dscclk_mhz = 428.0,
> +                               .dram_speed_mts = 16000.0,
> +                       },
> +                       /*Extra state, no dispclk ramping*/
> +                       {
> +                               .state = 5,
> +                               .dcfclk_mhz = 1200.0,
> +                               .fabricclk_mhz = 1200.0,
> +                               .dispclk_mhz = 1284.0,
> +                               .dppclk_mhz = 1284.0,
> +                               .phyclk_mhz = 810.0,
> +                               .socclk_mhz = 1200.0,
> +                               .dscclk_mhz = 428.0,
> +                               .dram_speed_mts = 16000.0,
> +                       },
> +               },
> +       .num_states = 5,
> +       .sr_exit_time_us = 8.6,
> +       .sr_enter_plus_exit_time_us = 10.9,
> +       .urgent_latency_us = 4.0,
> +       .urgent_latency_pixel_data_only_us = 4.0,
> +       .urgent_latency_pixel_mixed_with_vm_data_us = 4.0,
> +       .urgent_latency_vm_data_only_us = 4.0,
> +       .urgent_out_of_order_return_per_channel_pixel_only_bytes = 4096,
> +       .urgent_out_of_order_return_per_channel_pixel_and_vm_bytes = 4096,
> +       .urgent_out_of_order_return_per_channel_vm_only_bytes = 4096,
> +       .pct_ideal_dram_sdp_bw_after_urgent_pixel_only = 40.0,
> +       .pct_ideal_dram_sdp_bw_after_urgent_pixel_and_vm = 40.0,
> +       .pct_ideal_dram_sdp_bw_after_urgent_vm_only = 40.0,
> +       .max_avg_sdp_bw_use_normal_percent = 40.0,
> +       .max_avg_dram_bw_use_normal_percent = 40.0,
> +       .writeback_latency_us = 12.0,
> +       .ideal_dram_bw_after_urgent_percent = 40.0,
> +       .max_request_size_bytes = 256,
> +       .dram_channel_width_bytes = 2,
> +       .fabric_datapath_to_dcn_data_return_bytes = 64,
> +       .dcn_downspread_percent = 0.5,
> +       .downspread_percent = 0.38,
> +       .dram_page_open_time_ns = 50.0,
> +       .dram_rw_turnaround_time_ns = 17.5,
> +       .dram_return_buffer_per_channel_bytes = 8192,
> +       .round_trip_ping_latency_dcfclk_cycles = 131,
> +       .urgent_out_of_order_return_per_channel_bytes = 256,
> +       .channel_interleave_bytes = 256,
> +       .num_banks = 8,
> +       .num_chans = 16,
> +       .vmm_page_size_bytes = 4096,
> +       .dram_clock_change_latency_us = 404.0,
> +       .dummy_pstate_latency_us = 5.0,
> +       .writeback_dram_clock_change_latency_us = 23.0,
> +       .return_bus_width_bytes = 64,
> +       .dispclk_dppclk_vco_speed_mhz = 3850,
> +       .xfc_bus_transport_time_us = 20,
> +       .xfc_xbuf_latency_tolerance_us = 4,
> +       .use_urgent_burst_bw = 0
> +};
>
>
>  #ifndef mmDP0_DP_DPHY_INTERNAL_CTRL
> --
> 2.17.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-07-30 14:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-30 13:57 [PATCH 1/2] drm/amd/display: Embed DCN2 SOC bounding box Nicholas Kazlauskas
     [not found] ` <20190730135733.14563-1-nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org>
2019-07-30 13:57   ` [PATCH 2/2] drm/amd/display: Support uclk switching for DCN2 Nicholas Kazlauskas
     [not found]     ` <20190730135733.14563-2-nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org>
2019-07-30 14:00       ` Alex Deucher
2019-07-30 14:18       ` Harry Wentland
2019-07-30 14:21   ` [PATCH 1/2] drm/amd/display: Embed DCN2 SOC bounding box Ernst Sjöstrand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.