Skip to contentSkip to conversation

drm/amd/pp: Fix function parameter not correct

PATCH In review Rex Zhu 3 participants 5 messages Mar 13, 2018 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/2 drm/amd/pp: Fix function parameter not correct

caused by "commit dcefb7668e5b4fb56099b16d1790cd3056322b03"

Change-Id I6ed04a5a5ddfedc64a143f12d6ef6a7b9f7f9760
---
 drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c +2 -2
index 15ae900..5d12d2e 100644
@@ -234,10 +234,10 @@ static int smu10_smu_fini(struct pp_hwmgr *hwmgr)
 		smu10_smc_disable_vcn(hwmgr);
 		amdgpu_bo_free_kernel(&priv->smu_tables.entry[SMU10_WMTABLE].handle,
 					&priv->smu_tables.entry[SMU10_WMTABLE].mc_addr,
-					priv->smu_tables.entry[SMU10_WMTABLE].table);
+					&priv->smu_tables.entry[SMU10_WMTABLE].table);
 		amdgpu_bo_free_kernel(&priv->smu_tables.entry[SMU10_CLOCKTABLE].handle,
 					&priv->smu_tables.entry[SMU10_CLOCKTABLE].mc_addr,
-					priv->smu_tables.entry[SMU10_CLOCKTABLE].table);
+					&priv->smu_tables.entry[SMU10_CLOCKTABLE].table);
 		kfree(hwmgr->smu_backend);
 		hwmgr->smu_backend = NULL;
 	}
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1520924450-3445-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

author
#2 lore raw

PATCH 2/2 drm/amdgpu: Fix suspend hang on RV

1. ip_block's index should not compared to type.
2. Add null function point check

Change-Id Idbef9e5c69beef631e1e18cbc6f8c40cfe44862c
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -1
index 62d2740..a5d6f6b 100644
@@ -1572,7 +1572,8 @@ int amdgpu_device_ip_suspend(struct amdgpu_device *adev)
 		if (!adev->ip_blocks[i].status.valid)
 			continue;
 		/* ungate blocks so that suspend can properly shut them down */
-		if (i != AMD_IP_BLOCK_TYPE_SMC) {
+		if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_SMC
+			&& adev->ip_blocks[i].version->funcs->set_clockgating_state) {
 			r = adev->ip_blocks[i].version->funcs->set_clockgating_state((void *)adev,
 										     AMD_CG_STATE_UNGATE);
 			if (r) {
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1520924450-3445-2-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

Reviewed-by Evan Quan
#4 lore raw

RE: [PATCH 2/2] drm/amdgpu: Fix suspend hang on RV

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Rex Zhu
Sent: Tuesday, March 13, 2018 3:01 PM
To: [email protected]
Cc: Zhu, Rex <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: Fix suspend hang on RV

1. ip_block's index should not compared to type.
2. Add null function point check

Change-Id Idbef9e5c69beef631e1e18cbc6f8c40cfe44862c
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -1
index 62d2740..a5d6f6b 100644
@@ -1572,7 +1572,8 @@ int amdgpu_device_ip_suspend(struct amdgpu_device *adev)
 		if (!adev->ip_blocks[i].status.valid)
 			continue;
 		/* ungate blocks so that suspend can properly shut them down */
-		if (i != AMD_IP_BLOCK_TYPE_SMC) {
+		if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_SMC
+			&& adev->ip_blocks[i].version->funcs->set_clockgating_state) {
 			r = adev->ip_blocks[i].version->funcs->set_clockgating_state((void *)adev,
 										     AMD_CG_STATE_UNGATE);
 			if (r) {
Signature · 10 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): DM5PR1201MB248912FB21978BF1ADFDD0FCE4D20-grEf7a3NxMAAZHT/xKzwlGrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/[email protected]

Reviewed-by Reviewed-by Evan Quan
#6 lore raw

Re: [PATCH 2/2] drm/amdgpu: Fix suspend hang on RV

Series is:

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Quan, Evan <[email protected]>
Sent: Tuesday, March 13, 2018 3:30:26 AM
To: Zhu, Rex; [email protected]
Cc: Zhu, Rex
Subject: RE: [PATCH 2/2] drm/amdgpu: Fix suspend hang on RV

-----Original Message-----
From: amd-gfx [mailto:amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org] On Behalf Of Rex Zhu
Sent: Tuesday, March 13, 2018 3:01 PM
To: [email protected]
Cc: Zhu, Rex <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: Fix suspend hang on RV

1. ip_block's index should not compared to type.
2. Add null function point check

Change-Id Idbef9e5c69beef631e1e18cbc6f8c40cfe44862c
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -1
index 62d2740..a5d6f6b 100644
@@ -1572,7 +1572,8 @@ int amdgpu_device_ip_suspend(struct amdgpu_device *adev)
                 if (!adev->ip_blocks[i].status.valid)
                         continue;
                 /* ungate blocks so that suspend can properly shut them down */
-               if (i != AMD_IP_BLOCK_TYPE_SMC) {
+               if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_SMC
+                       && adev->ip_blocks[i].version->funcs->set_clockgating_state) {
                         r = adev->ip_blocks[i].version->funcs->set_clockgating_state((void *)adev,
                                                                                      AMD_CG_STATE_UNGATE);
                         if (r) {

--
1.9.1

_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Evan Quan
#7 lore raw
In reply to a message not in the archive

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Rex Zhu
Sent: Tuesday, March 13, 2018 3:01 PM
To: [email protected]
Cc: Zhu, Rex <[email protected]>
Subject: [PATCH 1/2] drm/amd/pp: Fix function parameter not correct

caused by "commit dcefb7668e5b4fb56099b16d1790cd3056322b03"

Change-Id I6ed04a5a5ddfedc64a143f12d6ef6a7b9f7f9760
---
 drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c +2 -2
index 15ae900..5d12d2e 100644
@@ -234,10 +234,10 @@ static int smu10_smu_fini(struct pp_hwmgr *hwmgr)
 		smu10_smc_disable_vcn(hwmgr);
 		amdgpu_bo_free_kernel(&priv->smu_tables.entry[SMU10_WMTABLE].handle,
 					&priv->smu_tables.entry[SMU10_WMTABLE].mc_addr,
-					priv->smu_tables.entry[SMU10_WMTABLE].table);
+					&priv->smu_tables.entry[SMU10_WMTABLE].table);
 		amdgpu_bo_free_kernel(&priv->smu_tables.entry[SMU10_CLOCKTABLE].handle,
 					&priv->smu_tables.entry[SMU10_CLOCKTABLE].mc_addr,
-					priv->smu_tables.entry[SMU10_CLOCKTABLE].table);
+					&priv->smu_tables.entry[SMU10_CLOCKTABLE].table);
 		kfree(hwmgr->smu_backend);
 		hwmgr->smu_backend = NULL;
 	}
Signature · 10 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx