提交 4fb1a35c 编写于 作者: M Michel Dänzer 提交者: Dave Airlie

drm/radeon: Explicitly print GTT/VRAM offsets on test failure.

Otherwise these would need to be painstakingly calculated looking at the source
code.
Signed-off-by: NMichel Dänzer <michel.daenzer@amd.com>
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 24cae9e7
...@@ -136,9 +136,15 @@ void radeon_test_moves(struct radeon_device *rdev) ...@@ -136,9 +136,15 @@ void radeon_test_moves(struct radeon_device *rdev)
gtt_start++, vram_start++) { gtt_start++, vram_start++) {
if (*vram_start != gtt_start) { if (*vram_start != gtt_start) {
DRM_ERROR("Incorrect GTT->VRAM copy %d: Got 0x%p, " DRM_ERROR("Incorrect GTT->VRAM copy %d: Got 0x%p, "
"expected 0x%p (GTT map 0x%p-0x%p)\n", "expected 0x%p (GTT/VRAM offset "
i, *vram_start, gtt_start, gtt_map, "0x%16llx/0x%16llx)\n",
gtt_end); i, *vram_start, gtt_start,
(unsigned long long)
(gtt_addr - rdev->mc.gtt_start +
(void*)gtt_start - gtt_map),
(unsigned long long)
(vram_addr - rdev->mc.vram_start +
(void*)gtt_start - gtt_map));
radeon_bo_kunmap(vram_obj); radeon_bo_kunmap(vram_obj);
goto out_cleanup; goto out_cleanup;
} }
...@@ -179,9 +185,15 @@ void radeon_test_moves(struct radeon_device *rdev) ...@@ -179,9 +185,15 @@ void radeon_test_moves(struct radeon_device *rdev)
gtt_start++, vram_start++) { gtt_start++, vram_start++) {
if (*gtt_start != vram_start) { if (*gtt_start != vram_start) {
DRM_ERROR("Incorrect VRAM->GTT copy %d: Got 0x%p, " DRM_ERROR("Incorrect VRAM->GTT copy %d: Got 0x%p, "
"expected 0x%p (VRAM map 0x%p-0x%p)\n", "expected 0x%p (VRAM/GTT offset "
i, *gtt_start, vram_start, vram_map, "0x%16llx/0x%16llx)\n",
vram_end); i, *gtt_start, vram_start,
(unsigned long long)
(vram_addr - rdev->mc.vram_start +
(void*)vram_start - vram_map),
(unsigned long long)
(gtt_addr - rdev->mc.gtt_start +
(void*)vram_start - vram_map));
radeon_bo_kunmap(gtt_obj[i]); radeon_bo_kunmap(gtt_obj[i]);
goto out_cleanup; goto out_cleanup;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册