aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2011-08-19 11:24:17 -0400
committerDave Airlie <airlied@redhat.com>2011-08-22 04:54:52 -0400
commit4fb1a35c0185f8fa3e71b12de62b8752a9a9ed0f (patch)
tree060b3f9e608934918738bb16249de55b816a924c /drivers/gpu
parent24cae9e7c9537fd6a16bc2f5ec398ee4bef5d007 (diff)
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: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/radeon_test.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_test.c b/drivers/gpu/drm/radeon/radeon_test.c
index 1ebd0fe9c13e..602fa3541c45 100644
--- a/drivers/gpu/drm/radeon/radeon_test.c
+++ b/drivers/gpu/drm/radeon/radeon_test.c
@@ -136,9 +136,15 @@ void radeon_test_moves(struct radeon_device *rdev)
136 gtt_start++, vram_start++) { 136 gtt_start++, vram_start++) {
137 if (*vram_start != gtt_start) { 137 if (*vram_start != gtt_start) {
138 DRM_ERROR("Incorrect GTT->VRAM copy %d: Got 0x%p, " 138 DRM_ERROR("Incorrect GTT->VRAM copy %d: Got 0x%p, "
139 "expected 0x%p (GTT map 0x%p-0x%p)\n", 139 "expected 0x%p (GTT/VRAM offset "
140 i, *vram_start, gtt_start, gtt_map, 140 "0x%16llx/0x%16llx)\n",
141 gtt_end); 141 i, *vram_start, gtt_start,
142 (unsigned long long)
143 (gtt_addr - rdev->mc.gtt_start +
144 (void*)gtt_start - gtt_map),
145 (unsigned long long)
146 (vram_addr - rdev->mc.vram_start +
147 (void*)gtt_start - gtt_map));
142 radeon_bo_kunmap(vram_obj); 148 radeon_bo_kunmap(vram_obj);
143 goto out_cleanup; 149 goto out_cleanup;
144 } 150 }
@@ -179,9 +185,15 @@ void radeon_test_moves(struct radeon_device *rdev)
179 gtt_start++, vram_start++) { 185 gtt_start++, vram_start++) {
180 if (*gtt_start != vram_start) { 186 if (*gtt_start != vram_start) {
181 DRM_ERROR("Incorrect VRAM->GTT copy %d: Got 0x%p, " 187 DRM_ERROR("Incorrect VRAM->GTT copy %d: Got 0x%p, "
182 "expected 0x%p (VRAM map 0x%p-0x%p)\n", 188 "expected 0x%p (VRAM/GTT offset "
183 i, *gtt_start, vram_start, vram_map, 189 "0x%16llx/0x%16llx)\n",
184 vram_end); 190 i, *gtt_start, vram_start,
191 (unsigned long long)
192 (vram_addr - rdev->mc.vram_start +
193 (void*)vram_start - vram_map),
194 (unsigned long long)
195 (gtt_addr - rdev->mc.gtt_start +
196 (void*)vram_start - vram_map));
185 radeon_bo_kunmap(gtt_obj[i]); 197 radeon_bo_kunmap(gtt_obj[i]);
186 goto out_cleanup; 198 goto out_cleanup;
187 } 199 }