RE: [PATCH] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by user

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The code base is different.

And do you set ip_block_mask = 0xeff to diable vce?

 

Best Regards

Rex

 

From: S, Shirish
Sent: Wednesday, October 17, 2018 1:25 AM
To: Zhu, Rex <Rex.Zhu@xxxxxxx>; Deucher, Alexander <Alexander.Deucher@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Subject: RE: [PATCH] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by user

 

Nope, I have just cherry-picked this patch.

Is there any dependency?

 

Regards,

Shirish S

 

From: Zhu, Rex
Sent: Tuesday, October 16, 2018 12:15 PM
To: S, Shirish <Shirish.S@xxxxxxx>; Deucher, Alexander <Alexander.Deucher@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Subject: RE: [PATCH] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by user

 

Do you test based on drm-next branch?

 

Best Regards

Rex

 

From: S, Shirish
Sent: Wednesday, October 17, 2018 1:12 AM
To: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Zhu, Rex <Rex.Zhu@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Subject: RE: [PATCH] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by user

 

This patch fails on the very first resume as below:

[   53.632732] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!

[   54.653212] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!

[   55.673692] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!

[   56.694203] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!

[   57.714683] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!

[   58.735164] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!

[   59.755643] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!

[   60.776124] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!

[   61.796608] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!

[   62.817092] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!

[   62.837108] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, giving up!!!

[   62.837112] Power gating vce_v3_0 failed

[   62.837118] [drm:amdgpu_device_ip_suspend_phase1] *ERROR* set_powergating_state(gate) of IP block <vce_v3_0> failed -110

 

I believe there is some more work left to be done with it.

 

Regards,

Shirish S

 

From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Deucher, Alexander
Sent: Tuesday, October 16, 2018 9:44 AM
To: Zhu, Rex <Rex.Zhu@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [PATCH] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by user

 

Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx>


From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> on behalf of Rex Zhu <Rex.Zhu@xxxxxxx>
Sent: Tuesday, October 16, 2018 1:33:46 AM
To:
amd-gfx@xxxxxxxxxxxxxxxxxxxxx; Deucher, Alexander
Cc: Zhu, Rex
Subject: [PATCH] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by user

 

If user disable uvd/vce/vcn/acp blocks via module
parameter ip_block_mask,
driver power off thoser blocks to save power.

Signed-off-by: Rex Zhu <Rex.Zhu@xxxxxxx>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 1e4dd09..3ffee08 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1774,6 +1774,24 @@ static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_power
 
         for (j = 0; j < adev->num_ip_blocks; j++) {
                 i = state == AMD_PG_STATE_GATE ? j : adev->num_ip_blocks - j - 1;
+
+               /* try to power off VCE/UVD/VCN/ACP if they were disabled by user */
+               if ((adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_UVD ||
+                   adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_VCE ||
+                   adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_VCN ||
+                   adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_ACP) &&
+                   adev->ip_blocks[i].version->funcs->set_powergating_state) {
+                       if (!adev->ip_blocks[i].status.valid) {
+                               r = adev->ip_blocks[i].version->funcs->set_powergating_state((void *)adev,
+                                                                                       state);
+                               if (r) {
+                                       DRM_ERROR("set_powergating_state(gate) of IP block <%s> failed %d\n",
+                                         adev->ip_blocks[i].version->funcs->name, r);
+                                       return r;
+                               }
+                       }
+               }
+
                 if (!adev->ip_blocks[i].status.late_initialized)
                         continue;
                 /* skip CG for VCE/UVD, it's handled specially */
@@ -1791,6 +1809,7 @@ static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_power
                         }
                 }
         }
+
         return 0;
 }
 
--
1.9.1

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

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

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux