Skip to contentSkip to conversation

drm/amdgpu: fix solid screen and hard hang when 2k + 4k display connected with DP

PATCH In review Huang Rui 3 participants 3 messages Jun 26, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Huang Rui

author
#0 lore raw

PATCH v2 1/1 drm/amdgpu: fix solid screen and hard hang when 2k + 4k display connected with DP

---

V1 -> V2:
- Add READ_ONCE to avoid complier might cause to read as previous fence value.

I will refine fence checking with fence interface at amdgpu_fence.c after S3 stress issue completed as Christian's suggestion.

Thanks,
Ray

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -1
index 5bed483..af3c87b 100644
@@ -130,7 +130,7 @@ psp_cmd_submit_buf(struct psp_context *psp,
 	ret = psp_cmd_submit(psp, ucode, cmd_buf_mc_addr,
 			     fence_mc_addr, index);
 
-	while (*((unsigned int *)psp->fence_buf) != index) {
+	while (READ_ONCE(*((unsigned int *)psp->fence_buf)) < index) {
 		msleep(1);
 	}
 
Signature · 6 lines
2.7.4

_______________________________________________
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): 1498479491-31585-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Am 26.06.2017 um 14:18 schrieb Huang Rui:

Quoted 1 line
Quoted 20 lines

---

V1 -> V2:
- Add READ_ONCE to avoid complier might cause to read as previous fence value.

I will refine fence checking with fence interface at amdgpu_fence.c after S3 stress issue completed as Christian's suggestion.

Thanks,
Ray

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0 -0
index 5bed483..af3c87b 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c psp_cmd_submit_buf(struct psp_context *psp, · line 136

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -1
@@ -130,7 +130,7 @@ psp_cmd_submit_buf(struct psp_context *psp,
  	ret = psp_cmd_submit(psp, ucode, cmd_buf_mc_addr,
  			     fence_mc_addr, index);
 
-	while (*((unsigned int *)psp->fence_buf) != index) {
+	while (READ_ONCE(*((unsigned int *)psp->fence_buf)) < index) {
  		msleep(1);
  	}
 

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

Acked-by Alex Deucher
#3 lore raw
In reply to a message not in the archive
Quoted 9 lines

-----Original Message-----
From: Huang Rui [mailto:[email protected]]
Sent: Monday, June 26, 2017 8:18 AM
To: [email protected]; Deucher, Alexander; Koenig, Christian
Cc: Wang, Ken; Qiao, Joe(Markham); Jiang, Sonny; Huan, Alvin; Huang, Ray
Subject: [PATCH v2] drm/amdgpu: fix solid screen and hard hang when 2k + 4k display connected with DP

Quoted 31 lines

---

V1 -> V2:
- Add READ_ONCE to avoid complier might cause to read as previous fence value.

I will refine fence checking with fence interface at amdgpu_fence.c after S3 stress issue completed as Christian's suggestion.

Thanks,
Ray

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -2
index 5bed483..af3c87b 100644
@@ -130,7 +130,7 @@ psp_cmd_submit_buf(struct psp_context *psp,
 	ret = psp_cmd_submit(psp, ucode, cmd_buf_mc_addr,
 			     fence_mc_addr, index);
 
-	while (*((unsigned int *)psp->fence_buf) != index) {
+	while (READ_ONCE(*((unsigned int *)psp->fence_buf)) < index) {
 		msleep(1);
 	}
 
--
Quoted 1 line

2.7.4

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