* [PATCH] drm/powerplay: enable dpm under pass-through
@ 2018-08-20 3:39 Yintian Tao
[not found] ` <1534736393-23259-1-git-send-email-yttao-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Yintian Tao @ 2018-08-20 3:39 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Yintian Tao
Repeat enable dpm under pass-through because there is no actually
hardware-fini and real power-off when guest vm shutdown or reboot.
Otherwise, under pass-through it will be failed to populate populate
and upload SCLK MCLK DPM levels due to zero of pcie_speed_table.count.
Change-Id: I7cbc55c650867d00e19241ceea5d98f78b5ac3f5
Signed-off-by: Yintian Tao <yttao@amd.com>
---
drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
index 53207e7..6ef3c87 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
@@ -75,10 +75,12 @@ int phm_set_power_state(struct pp_hwmgr *hwmgr,
int phm_enable_dynamic_state_management(struct pp_hwmgr *hwmgr)
{
+ struct amdgpu_device *adev = NULL;
int ret = -EINVAL;;
PHM_FUNC_CHECK(hwmgr);
+ adev = hwmgr->adev;
- if (smum_is_dpm_running(hwmgr)) {
+ if (smum_is_dpm_running(hwmgr) && !amdgpu_passthrough(adev)) {
pr_info("dpm has been enabled\n");
return 0;
}
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/powerplay: enable dpm under pass-through
[not found] ` <1534736393-23259-1-git-send-email-yttao-5C7GfCeVMHo@public.gmane.org>
@ 2018-08-20 14:35 ` Deucher, Alexander
2018-08-21 1:38 ` Zhang, Jerry (Junwei)
1 sibling, 0 replies; 3+ messages in thread
From: Deucher, Alexander @ 2018-08-20 14:35 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org; +Cc: Tao, Yintian
[-- Attachment #1.1: Type: text/plain, Size: 1925 bytes --]
Acked-by: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Yintian Tao <yttao-5C7GfCeVMHo@public.gmane.org>
Sent: Sunday, August 19, 2018 11:39:53 PM
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Tao, Yintian
Subject: [PATCH] drm/powerplay: enable dpm under pass-through
Repeat enable dpm under pass-through because there is no actually
hardware-fini and real power-off when guest vm shutdown or reboot.
Otherwise, under pass-through it will be failed to populate populate
and upload SCLK MCLK DPM levels due to zero of pcie_speed_table.count.
Change-Id: I7cbc55c650867d00e19241ceea5d98f78b5ac3f5
Signed-off-by: Yintian Tao <yttao-5C7GfCeVMHo@public.gmane.org>
---
drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
index 53207e7..6ef3c87 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
@@ -75,10 +75,12 @@ int phm_set_power_state(struct pp_hwmgr *hwmgr,
int phm_enable_dynamic_state_management(struct pp_hwmgr *hwmgr)
{
+ struct amdgpu_device *adev = NULL;
int ret = -EINVAL;;
PHM_FUNC_CHECK(hwmgr);
+ adev = hwmgr->adev;
- if (smum_is_dpm_running(hwmgr)) {
+ if (smum_is_dpm_running(hwmgr) && !amdgpu_passthrough(adev)) {
pr_info("dpm has been enabled\n");
return 0;
}
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[-- Attachment #1.2: Type: text/html, Size: 3408 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/powerplay: enable dpm under pass-through
[not found] ` <1534736393-23259-1-git-send-email-yttao-5C7GfCeVMHo@public.gmane.org>
2018-08-20 14:35 ` Deucher, Alexander
@ 2018-08-21 1:38 ` Zhang, Jerry (Junwei)
1 sibling, 0 replies; 3+ messages in thread
From: Zhang, Jerry (Junwei) @ 2018-08-21 1:38 UTC (permalink / raw)
To: Yintian Tao, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On 08/20/2018 11:39 AM, Yintian Tao wrote:
> Repeat enable dpm under pass-through because there is no actually
> hardware-fini and real power-off when guest vm shutdown or reboot.
> Otherwise, under pass-through it will be failed to populate populate
duplicate "populate"
> and upload SCLK MCLK DPM levels due to zero of pcie_speed_table.count.
>
> Change-Id: I7cbc55c650867d00e19241ceea5d98f78b5ac3f5
> Signed-off-by: Yintian Tao <yttao@amd.com>
> ---
> drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
> index 53207e7..6ef3c87 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
> @@ -75,10 +75,12 @@ int phm_set_power_state(struct pp_hwmgr *hwmgr,
>
> int phm_enable_dynamic_state_management(struct pp_hwmgr *hwmgr)
> {
> + struct amdgpu_device *adev = NULL;
> int ret = -EINVAL;;
> PHM_FUNC_CHECK(hwmgr);
> + adev = hwmgr->adev;
It could be simplified as
struct amdgpu_device *adev = hwmgr->adev;
or use that directly
amdgpu_passthrough(hwmgr->adev)
apart from that,
Acked-by: Junwei Zhang <Jerry.Zhang@amd.com>
>
> - if (smum_is_dpm_running(hwmgr)) {
> + if (smum_is_dpm_running(hwmgr) && !amdgpu_passthrough(adev)) {
> pr_info("dpm has been enabled\n");
> return 0;
> }
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-21 1:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-20 3:39 [PATCH] drm/powerplay: enable dpm under pass-through Yintian Tao
[not found] ` <1534736393-23259-1-git-send-email-yttao-5C7GfCeVMHo@public.gmane.org>
2018-08-20 14:35 ` Deucher, Alexander
2018-08-21 1:38 ` Zhang, Jerry (Junwei)
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.