From: Alex Deucher <alexdeucher@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: Eric Huang <JinHuiEric.Huang@amd.com>
Subject: [PATCH 34/52] drm/amd/powerplay: add GFX per cu powergating for Baffin
Date: Wed, 23 Mar 2016 13:42:50 -0400 [thread overview]
Message-ID: <1458754988-16222-35-git-send-email-alexander.deucher@amd.com> (raw)
In-Reply-To: <1458754988-16222-1-git-send-email-alexander.deucher@amd.com>
From: Eric Huang <JinHuiEric.Huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
---
.../powerplay/hwmgr/ellesmere_clockpowergating.c | 28 ++++++++++++++++++++++
.../powerplay/hwmgr/ellesmere_clockpowergating.h | 1 +
.../gpu/drm/amd/powerplay/hwmgr/ellesmere_hwmgr.c | 5 ++++
3 files changed, 34 insertions(+)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/ellesmere_clockpowergating.c b/drivers/gpu/drm/amd/powerplay/hwmgr/ellesmere_clockpowergating.c
index a94f6a8..93db824 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/ellesmere_clockpowergating.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/ellesmere_clockpowergating.c
@@ -398,3 +398,31 @@ int ellesmere_phm_update_clock_gatings(struct pp_hwmgr *hwmgr,
return 0;
}
+
+/* This function is for Baffin only for now,
+ * Powerplay will only control the static per CU Power Gating.
+ * Dynamic per CU Power Gating will be done in gfx.
+ */
+int ellesmere_phm_enable_per_cu_power_gating(struct pp_hwmgr *hwmgr, bool enable)
+{
+ struct cgs_system_info sys_info = {0};
+ uint32_t active_cus;
+ int result;
+
+ sys_info.size = sizeof(struct cgs_system_info);
+ sys_info.info_id = CGS_SYSTEM_INFO_GFX_CU_INFO;
+
+ result = cgs_query_system_info(hwmgr->device, &sys_info);
+
+ if (result)
+ return -EINVAL;
+ else
+ active_cus = sys_info.value;
+
+ if (enable)
+ return smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
+ PPSMC_MSG_GFX_CU_PG_ENABLE, active_cus);
+ else
+ return smum_send_msg_to_smc(hwmgr->smumgr,
+ PPSMC_MSG_GFX_CU_PG_DISABLE);
+}
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/ellesmere_clockpowergating.h b/drivers/gpu/drm/amd/powerplay/hwmgr/ellesmere_clockpowergating.h
index a90577e..b403e11 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/ellesmere_clockpowergating.h
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/ellesmere_clockpowergating.h
@@ -35,5 +35,6 @@ int ellesmere_phm_powergate_acp(struct pp_hwmgr *hwmgr, bool bgate);
int ellesmere_phm_disable_clock_power_gating(struct pp_hwmgr *hwmgr);
int ellesmere_phm_update_clock_gatings(struct pp_hwmgr *hwmgr,
const uint32_t *msg_id);
+int ellesmere_phm_enable_per_cu_power_gating(struct pp_hwmgr *hwmgr, bool enable);
#endif /* _ELLESMERE_CLOCK_POWER_GATING_H_ */
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/ellesmere_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/ellesmere_hwmgr.c
index c87d5ef..152d77d 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/ellesmere_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/ellesmere_hwmgr.c
@@ -4687,6 +4687,11 @@ static const struct pp_hwmgr_func ellesmere_hwmgr_funcs = {
.register_internal_thermal_interrupt = ellesmere_register_internal_thermal_interrupt,
.check_smc_update_required_for_display_configuration = ellesmere_check_smc_update_required_for_display_configuration,
.check_states_equal = ellesmere_check_states_equal,
+ .get_pp_table = ellesmere_get_pp_table,
+ .set_pp_table = ellesmere_set_pp_table,
+ .force_clock_level = ellesmere_force_clock_level,
+ .print_clock_levels = ellesmere_print_clock_levels,
+ .enable_per_cu_power_gating = ellesmere_phm_enable_per_cu_power_gating,
};
int ellesemere_hwmgr_init(struct pp_hwmgr *hwmgr)
--
2.5.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-03-23 17:43 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 17:42 [PATCH 00/52] amdgpu Polaris support Alex Deucher
2016-03-23 17:42 ` [PATCH 02/52] drm/amdgpu: add ELM/BAF asic types Alex Deucher
2016-03-23 17:42 ` [PATCH 03/52] drm/amdgpu: add ELM/BAF DCE11 configs Alex Deucher
2016-03-23 17:42 ` [PATCH 04/52] drm/amdgpu: update atombios.h (v2) Alex Deucher
2016-03-23 17:42 ` [PATCH 05/52] drm/amdgpu/atom: add SetDCEClock helper Alex Deucher
2016-03-23 17:42 ` [PATCH 06/52] drm/amdgpu/atom: add support for new SetPixelClock table Alex Deucher
2016-03-23 17:42 ` [PATCH 07/52] drm/amdgpu/atom: add support for new DIGxEncoderControl cmd table Alex Deucher
2016-03-23 17:42 ` [PATCH 08/52] drm/amdgpu/atom: add support for new UNIPHYTransmitterContol " Alex Deucher
2016-03-23 17:42 ` [PATCH 09/52] drm/amdgpu: add ELM/BAF support to dce_v11_0_pick_pll Alex Deucher
2016-03-23 17:42 ` [PATCH 10/52] drm/amdgpu/dce11: update pll programming for ELM/BAF Alex Deucher
2016-03-23 17:42 ` [PATCH 11/52] drm/amdgpu/dce11: add dce clock setting " Alex Deucher
2016-03-23 17:42 ` [PATCH 12/52] drm/amdgpu: add GMC support " Alex Deucher
2016-03-23 17:42 ` [PATCH 13/52] drm/amdgpu: add DCE golden setting " Alex Deucher
2016-03-23 17:42 ` [PATCH 14/52] drm/amdgpu: add SDMA support " Alex Deucher
2016-03-23 17:42 ` [PATCH 15/52] drm/amdgpu: add an interface to get gfx constants from atombios Alex Deucher
2016-03-23 17:42 ` [PATCH 16/52] drm/amdgpu: add mmRLC_CGCG_CGLS_CTRL_3D & mmRLC_CGCG_RAMP_CTRL_3D Alex Deucher
2016-03-23 17:42 ` [PATCH 17/52] drm/amdgpu: add GFX support for ELM/BAF Alex Deucher
2016-03-23 17:42 ` [PATCH 18/52] drm/amdgpu: add UVD " Alex Deucher
2016-03-23 17:42 ` [PATCH 19/52] drm/amdgpu: add VCE support to ELM/BAF Alex Deucher
2016-03-23 17:42 ` [PATCH 20/52] drm/amd/powerplay: add header files for ellesmere smu manager Alex Deucher
2016-03-23 17:42 ` [PATCH 21/52] drm/amd/powerplay: add smu support for ellesmere/baffin Alex Deucher
2016-03-23 17:42 ` [PATCH 22/52] drm/amd/powerplay: enable dpm for baffin Alex Deucher
2016-03-24 1:03 ` Vasily Anonimov
2016-03-23 17:42 ` [PATCH 23/52] drm/amd/powerplay: init hwmgr for ELM/BAF Alex Deucher
2016-03-23 17:42 ` [PATCH 24/52] drm/amd/powerplay: enable powerplay for baffin Alex Deucher
2016-03-23 17:42 ` [PATCH 25/52] drm/amd/powerplay: add thermal control for elm/baf Alex Deucher
2016-03-23 17:42 ` [PATCH 26/52] drm/amd/powerplay: add UVD&VCE DPM and powergating support " Alex Deucher
2016-03-23 17:42 ` [PATCH 27/52] drm/amd/amdgpu: Add smc_sk firmware in baffin & ellesmere Alex Deucher
2016-03-23 17:42 ` [PATCH 28/52] drm/amd/powerplay: Add smc_sk firmware to " Alex Deucher
2016-03-23 17:42 ` [PATCH 29/52] drm/amd/powerplay: update baffin & ellesmere smc_sk firmware Alex Deucher
2016-03-23 17:42 ` [PATCH 30/52] drm/amd/powerplay: add all blocks clockgating support through SMU/powerplay Alex Deucher
2016-03-23 17:42 ` [PATCH 31/52] drm/amd/powerplay: add GFX/SYS clockgating support for ELM/BAF Alex Deucher
2016-03-23 17:42 ` [PATCH 32/52] drm/amd/amdgpu: add query GFX cu info in CGS query system info Alex Deucher
2016-03-23 17:42 ` [PATCH 33/52] drm/amd/powerplay: add GFX per cu powergating support through SMU/powerplay Alex Deucher
2016-03-23 17:42 ` Alex Deucher [this message]
2016-03-23 17:42 ` [PATCH 35/52] drm/amd/amdgpu: add medium grain powergating support for Baffin Alex Deucher
2016-03-23 17:42 ` [PATCH 36/52] drm/amd/powerplay: add default clockgating handling Alex Deucher
2016-03-23 17:42 ` [PATCH 37/52] drm/amd/amdgpu: add power gating initialization support for GFX8.0 Alex Deucher
2016-03-23 17:42 ` [PATCH 38/52] drm/amd/amdgpu: add power gating init for Baffin Alex Deucher
2016-03-23 17:42 ` [PATCH 39/52] drm/amdgpu: ungate SMC clockgating first before suspend Alex Deucher
2016-03-23 17:42 ` [PATCH 40/52] drm/amdgpu: update the core VI support for ELM/BAF Alex Deucher
2016-03-23 17:42 ` [PATCH 41/52] drm/amdgpu: add ELM/BAF pci ids Alex Deucher
2016-03-23 17:42 ` [PATCH 43/52] drm/amd/powerplay: print gpu loading and uvd/vce power gate enablement for polaris10/11 Alex Deucher
2016-03-23 17:43 ` [PATCH 44/52] drm/amd/powerplay: fix mclk in high clock for baffin Alex Deucher
2016-03-23 17:43 ` [PATCH 45/52] drm/amd/powrplay: fix issue that get wrong enable flag Alex Deucher
2016-03-23 17:43 ` [PATCH 46/52] drm/amd/powerplay: enable set lowest mclk clock on baffin Alex Deucher
2016-03-23 17:43 ` [PATCH 47/52] drm/amd/powerplay: Disable Spread Spectrum on DPM 0 on baffin as SPLL Shut Down feature is enabled Alex Deucher
2016-03-23 17:43 ` [PATCH 48/52] drm/amdgpu: add polaris10/11 smc fw declaration Alex Deucher
2016-03-23 17:43 ` [PATCH 49/52] drm/amd/dal: add core support for Polaris family (v2) Alex Deucher
2016-03-23 17:43 ` [PATCH 50/52] drm/amd/dal/dm: add polaris support Alex Deucher
2016-03-23 17:43 ` [PATCH 51/52] drm/amdgpu: add dal support for polaris Alex Deucher
2016-03-23 17:43 ` [PATCH 52/52] drm/amd/dal: Enable Polaris support in the Kconfig Alex Deucher
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=1458754988-16222-35-git-send-email-alexander.deucher@amd.com \
--to=alexdeucher@gmail.com \
--cc=JinHuiEric.Huang@amd.com \
--cc=dri-devel@lists.freedesktop.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