diff options
author | Christian König <christian.koenig@amd.com> | 2017-06-26 09:19:30 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-07-14 11:05:53 -0400 |
commit | b8e0e6e16e3ac130901111e2c503b3533f9719ee (patch) | |
tree | 502013ab5d5504ea581340aff11c5946b38b6cec /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
parent | 011d4bbea969268c013eaf6e39721d3181833711 (diff) |
drm/amdgpu: fix amdgpu_debugfs_gem_bo_info
Otherwise we trigger a bunch of WARN_ONs when this is called.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index 621f739103a6..96c4493ccf8f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |||
@@ -784,6 +784,7 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data) | |||
784 | unsigned domain; | 784 | unsigned domain; |
785 | const char *placement; | 785 | const char *placement; |
786 | unsigned pin_count; | 786 | unsigned pin_count; |
787 | uint64_t offset; | ||
787 | 788 | ||
788 | domain = amdgpu_mem_type_to_domain(bo->tbo.mem.mem_type); | 789 | domain = amdgpu_mem_type_to_domain(bo->tbo.mem.mem_type); |
789 | switch (domain) { | 790 | switch (domain) { |
@@ -798,9 +799,12 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data) | |||
798 | placement = " CPU"; | 799 | placement = " CPU"; |
799 | break; | 800 | break; |
800 | } | 801 | } |
801 | seq_printf(m, "\t0x%08x: %12ld byte %s @ 0x%010Lx", | 802 | seq_printf(m, "\t0x%08x: %12ld byte %s", |
802 | id, amdgpu_bo_size(bo), placement, | 803 | id, amdgpu_bo_size(bo), placement); |
803 | amdgpu_bo_gpu_offset(bo)); | 804 | |
805 | offset = ACCESS_ONCE(bo->tbo.mem.start); | ||
806 | if (offset != AMDGPU_BO_INVALID_OFFSET) | ||
807 | seq_printf(m, " @ 0x%010Lx", offset); | ||
804 | 808 | ||
805 | pin_count = ACCESS_ONCE(bo->pin_count); | 809 | pin_count = ACCESS_ONCE(bo->pin_count); |
806 | if (pin_count) | 810 | if (pin_count) |