All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Wentland <hwentlan-5C7GfCeVMHo@public.gmane.org>
To: "Kazlauskas,
	Nicholas" <Nicholas.Kazlauskas-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Cc: "Li, Sun peng (Leo)" <Sunpeng.Li-5C7GfCeVMHo@public.gmane.org>,
	"Wentland, Harry" <Harry.Wentland-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [PATCH 2/2] drm/amd/display: Support uclk switching for DCN2
Date: Tue, 30 Jul 2019 14:18:48 +0000	[thread overview]
Message-ID: <10498bcb-2a67-b602-80ed-950aba237f61@amd.com> (raw)
In-Reply-To: <20190730135733.14563-2-nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org>

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

  parent reply	other threads:[~2019-07-30 14:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2019-07-30 14:21   ` [PATCH 1/2] drm/amd/display: Embed DCN2 SOC bounding box Ernst Sjöstrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10498bcb-2a67-b602-80ed-950aba237f61@amd.com \
    --to=hwentlan-5c7gfcevmho@public.gmane.org \
    --cc=Harry.Wentland-5C7GfCeVMHo@public.gmane.org \
    --cc=Nicholas.Kazlauskas-5C7GfCeVMHo@public.gmane.org \
    --cc=Sunpeng.Li-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.