Skip to contentSkip to conversation

drm/amdgpu:Add error message when register failed to reach expected value

PATCH Superseded James Zhu 2 participants 3 messages Sep 10, 2018 – Sep 11, 2018 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

James Zhu

author
#0 lore raw

PATCH 1/1 drm/amdgpu:Add error message when register failed to reach expected value

Add error message when register failed to reach expected value, It will help discover potential issue.

---
 drivers/gpu/drm/amd/amdgpu/soc15_common.h | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/soc15_common.h +2 -0
index 0942f49..fe2af1b 100644
@@ -56,6 +56,8 @@
 			tmp_ = RREG32(adev->reg_offset[ip##_HWIP][inst][reg##_BASE_IDX] + reg); \
 			loop--;					\
 			if (!loop) {				\
+				DRM_ERROR("Register [%s](%d) failed to reach value 0x%08x != 0x%08x\n", \
+							inst, #reg, expected_value, (tmp_ & (mask))); \
 				ret = -ETIMEDOUT;		\
 				break;				\
 			}					\
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): 1536598718-20309-1-git-send-email-James.Zhu-5C7GfCeVMHo@public.gmane.org

author
#2 lore raw

PATCH v2 1/1 drm/amdgpu:Add error message when register failed to reach expected value

Add error message when register failed to reach expected value, It will help discover potential issue.

---
 drivers/gpu/drm/amd/amdgpu/soc15_common.h | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/soc15_common.h +2 -0
index 0942f49..f5d6025 100644
@@ -56,6 +56,8 @@
 			tmp_ = RREG32(adev->reg_offset[ip##_HWIP][inst][reg##_BASE_IDX] + reg); \
 			loop--;					\
 			if (!loop) {				\
+				DRM_ERROR("Register(%d) [%s] failed to reach value 0x%08x != 0x%08x\n", \
+							inst, #reg, expected_value, (tmp_ & (mask))); \
 				ret = -ETIMEDOUT;		\
 				break;				\
 			}					\
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): 1536599143-21213-1-git-send-email-James.Zhu-5C7GfCeVMHo@public.gmane.org

Acked-by
#4 lore raw
Quoted 2 lines · James Zhu
Quoted 23 lines

Add error message when register failed to reach expected value, It will help discover potential issue.

---
 drivers/gpu/drm/amd/amdgpu/soc15_common.h | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/soc15_common.h +2 -1
index 0942f49..f5d6025 100644
@@ -56,6 +56,8 @@
                        tmp_ = RREG32(adev->reg_offset[ip##_HWIP][inst][reg##_BASE_IDX] + reg); \
                        loop--;                                 \
                        if (!loop) {                            \
+                               DRM_ERROR("Register(%d) [%s] failed to reach value 0x%08x != 0x%08x\n", \
+                                                       inst, #reg, expected_value, (tmp_ & (mask))); \
                                ret = -ETIMEDOUT;               \
                                break;                          \
                        }                                       \
--

2.7.4

Quoted 4 lines

_______________________________________________
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