AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 1/3] drm/amdgpu/powerplay/smu7: enable mclk switching if monitors are synced
Date: Thu, 22 Aug 2019 10:36:43 -0500	[thread overview]
Message-ID: <20190822153645.3296-2-alexander.deucher@amd.com> (raw)
In-Reply-To: <20190822153645.3296-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>

If DC has synced the displays, we can enable mclk switching to
save power.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index 3c1084de5d59..34f95e0e3ea4 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -2956,9 +2956,10 @@ static int smu7_apply_state_adjust_rules(struct pp_hwmgr *hwmgr,
 	if (hwmgr->display_config->num_display == 0)
 		disable_mclk_switching = false;
 	else
-		disable_mclk_switching = ((1 < hwmgr->display_config->num_display) ||
-					  disable_mclk_switching_for_frame_lock ||
-					  smu7_vblank_too_short(hwmgr, hwmgr->display_config->min_vblank_time));
+		disable_mclk_switching = ((1 < hwmgr->display_config->num_display) &&
+					  !hwmgr->display_config->multi_monitor_in_sync) ||
+			disable_mclk_switching_for_frame_lock ||
+			smu7_vblank_too_short(hwmgr, hwmgr->display_config->min_vblank_time);
 
 	sclk = smu7_ps->performance_levels[0].engine_clock;
 	mclk = smu7_ps->performance_levels[0].memory_clock;
-- 
2.20.1

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

  parent reply	other threads:[~2019-08-22 15:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22 15:36 [PATCH 0/3] Support mclk switching when monitors are in sync Alex Deucher
     [not found] ` <20190822153645.3296-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2019-08-22 15:36   ` Alex Deucher [this message]
2019-08-22 15:36   ` [PATCH 2/3] drm/amdgpu/powerplay/vega10: enable mclk switching if monitors are synced Alex Deucher
2019-08-22 15:36   ` [PATCH 3/3] drm/amd/display: update bw_calcs to take pipe sync into account (v2) Alex Deucher
     [not found]     ` <20190822153645.3296-4-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2019-08-22 16:25       ` Kazlauskas, Nicholas
     [not found]         ` <6c011b85-27c8-4ff5-12b5-4d034878c916-5C7GfCeVMHo@public.gmane.org>
2019-08-22 16:31           ` Alex Deucher
     [not found]             ` <CADnq5_MmDXmchA=WoQpKzkFp0+WpVDSOoBMqqo8pppB9ky_AvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-08-22 16:35               ` Kazlauskas, Nicholas

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=20190822153645.3296-2-alexander.deucher@amd.com \
    --to=alexdeucher-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=alexander.deucher-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox