Skip to contentSkip to conversation

drm/amd/amdgpu: fix Tonga S3 resume hang on rhel6.8

PATCH In review Jim Qu 3 participants 3 messages Mar 28, 2017 – Mar 29, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Jim Qu

author
#0 lore raw

PATCH 1/1 drm/amd/amdgpu: fix Tonga S3 resume hang on rhel6.8

1. security firmware loading has moved to sw init, so this code is useless.
2. it seems that driver could not call request_firmware on kernel 2.6, when S3 resume. for request firmware depends on userspace, at this time, userspace is freeze.

Change-Id I13977c60314ffe976924b1fdad1ab10df5d93c82
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +0 -3
index d6cbdbe..a1a2d44 100644
@@ -840,9 +840,6 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,
 		const struct common_firmware_header *header;
 		struct amdgpu_firmware_info *ucode = NULL;
 
-		if (CGS_UCODE_ID_SMU_SK == type)
-			amdgpu_cgs_rel_firmware(cgs_device, CGS_UCODE_ID_SMU);
-
 		if (!adev->pm.fw) {
 			switch (adev->asic_type) {
 			case CHIP_TOPAZ:
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): 1490693274-11017-1-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org

Acked-by
#2 lore raw
Quoted 8 lines · Jim Qu

1. security firmware loading has moved to sw init, so this code is useless.
2. it seems that driver could not call request_firmware on kernel 2.6, when S3 resume. for request firmware depends on userspace, at this time, userspace is freeze.

Change-Id I13977c60314ffe976924b1fdad1ab10df5d93c82

Yes, since smu_init is moved to sw_init, we won't meet to request firmware two times yet.

Quoted 25 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +0 -3
index d6cbdbe..a1a2d44 100644
@@ -840,9 +840,6 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,
 		const struct common_firmware_header *header;
 		struct amdgpu_firmware_info *ucode = NULL;
 
-		if (CGS_UCODE_ID_SMU_SK == type)
-			amdgpu_cgs_rel_firmware(cgs_device, CGS_UCODE_ID_SMU);
-
 		if (!adev->pm.fw) {
 			switch (adev->asic_type) {
 			case CHIP_TOPAZ:
Signature · 6 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

#3 lore raw
In reply to a message not in the archive
Quoted 5 lines · Jim Qu

1. security firmware loading has moved to sw init, so this code is useless.
2. it seems that driver could not call request_firmware on kernel 2.6, when S3 resume. for request firmware depends on userspace, at this time, userspace is freeze.

Just confirm this fix will still work well on other OS?

Jerry

Quoted 13 lines
Change-Id I13977c60314ffe976924b1fdad1ab10df5d93c82
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 3 ---
  1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +0 -0
index d6cbdbe..a1a2d44 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device, · line 845

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +0 -3
@@ -840,9 +840,6 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,
  		const struct common_firmware_header *header;
  		struct amdgpu_firmware_info *ucode = NULL;
 
-		if (CGS_UCODE_ID_SMU_SK == type)
-			amdgpu_cgs_rel_firmware(cgs_device, CGS_UCODE_ID_SMU);
-
  		if (!adev->pm.fw) {
  			switch (adev->asic_type) {
  			case CHIP_TOPAZ:

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