All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 3/5] drm/amd/pp: Memory Latency is always 25us on Vega10
Date: Mon, 18 Jun 2018 19:18:03 +0800	[thread overview]
Message-ID: <1529320685-20342-3-git-send-email-Rex.Zhu@amd.com> (raw)
In-Reply-To: <1529320685-20342-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>

Also use the tolerable latency defined in Display
to find lowest MCLK frequency when disable mclk switch

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 24 ++--------------------
 1 file changed, 2 insertions(+), 22 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
index 6057b59..198c7ed 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
@@ -55,12 +55,6 @@
 
 static const uint32_t channel_number[] = {1, 2, 0, 4, 0, 8, 0, 16, 2};
 
-#define MEM_FREQ_LOW_LATENCY        25000
-#define MEM_FREQ_HIGH_LATENCY       80000
-#define MEM_LATENCY_HIGH            245
-#define MEM_LATENCY_LOW             35
-#define MEM_LATENCY_ERR             0xFFFF
-
 #define mmDF_CS_AON0_DramBaseAddress0                                                                  0x0044
 #define mmDF_CS_AON0_DramBaseAddress0_BASE_IDX                                                         0
 
@@ -3223,7 +3217,7 @@ static int vega10_apply_state_adjust_rules(struct pp_hwmgr *hwmgr,
 		/* Find the lowest MCLK frequency that is within
 		 * the tolerable latency defined in DAL
 		 */
-		latency = 0;
+		latency = hwmgr->display_config->dce_tolerable_mclk_in_active_latency;
 		for (i = 0; i < data->mclk_latency_table.count; i++) {
 			if ((data->mclk_latency_table.entries[i].latency <= latency) &&
 				(data->mclk_latency_table.entries[i].frequency >=
@@ -4074,18 +4068,6 @@ static void vega10_get_sclks(struct pp_hwmgr *hwmgr,
 
 }
 
-static uint32_t vega10_get_mem_latency(struct pp_hwmgr *hwmgr,
-		uint32_t clock)
-{
-	if (clock >= MEM_FREQ_LOW_LATENCY &&
-			clock < MEM_FREQ_HIGH_LATENCY)
-		return MEM_LATENCY_HIGH;
-	else if (clock >= MEM_FREQ_HIGH_LATENCY)
-		return MEM_LATENCY_LOW;
-	else
-		return MEM_LATENCY_ERR;
-}
-
 static void vega10_get_memclocks(struct pp_hwmgr *hwmgr,
 		struct pp_clock_levels_with_latency *clocks)
 {
@@ -4107,9 +4089,7 @@ static void vega10_get_memclocks(struct pp_hwmgr *hwmgr,
 					dep_table->entries[i].clk * 10;
 			clocks->data[clocks->num_levels].latency_in_us =
 			data->mclk_latency_table.entries
-			[data->mclk_latency_table.count].latency =
-					vega10_get_mem_latency(hwmgr,
-						dep_table->entries[i].clk);
+			[data->mclk_latency_table.count].latency = 25;
 			clocks->num_levels++;
 			data->mclk_latency_table.count++;
 		}
-- 
1.9.1

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

  parent reply	other threads:[~2018-06-18 11:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18 11:18 [PATCH 1/5] drm/amd/display: Implement dm_pp_get_clock_levels_by_type_with_latency Rex Zhu
     [not found] ` <1529320685-20342-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-06-18 11:18   ` [PATCH 2/5] drm/amd/pp: Fix wrong clock-unit exported to Display Rex Zhu
     [not found]     ` <1529320685-20342-2-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-06-18 19:50       ` Alex Deucher
2018-06-18 11:18   ` Rex Zhu [this message]
     [not found]     ` <1529320685-20342-3-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-06-18 19:49       ` [PATCH 3/5] drm/amd/pp: Memory Latency is always 25us on Vega10 Alex Deucher
2018-06-18 11:18   ` [PATCH 4/5] drm/amd/display: Delete old implementation of bw_calcs_data_update_from_pplib Rex Zhu
     [not found]     ` <1529320685-20342-4-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-06-18 19:50       ` Alex Deucher
2018-06-18 11:18   ` [PATCH 5/5] drm/amd/display: Refine the interface dm_pp_notify_wm_clock_changes Rex Zhu
     [not found]     ` <1529320685-20342-5-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-06-18 19:52       ` Alex Deucher
2018-06-18 19:46   ` [PATCH 1/5] drm/amd/display: Implement dm_pp_get_clock_levels_by_type_with_latency Alex Deucher
2018-06-18 23:53   ` Harry Wentland
2018-06-19 21:17 [PATCH 0/5] Rex's pplib/dc changes rebased on latest DC Harry Wentland
     [not found] ` <20180619211732.10012-1-harry.wentland-5C7GfCeVMHo@public.gmane.org>
2018-06-19 21:17   ` [PATCH 3/5] drm/amd/pp: Memory Latency is always 25us on Vega10 Harry Wentland

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=1529320685-20342-3-git-send-email-Rex.Zhu@amd.com \
    --to=rex.zhu-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.