diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index c62c3dd4dcc6..7d3dc229fa47 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |||
@@ -780,6 +780,8 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data) | |||
780 | struct amdgpu_bo *bo = gem_to_amdgpu_bo(gobj); | 780 | struct amdgpu_bo *bo = gem_to_amdgpu_bo(gobj); |
781 | struct seq_file *m = data; | 781 | struct seq_file *m = data; |
782 | 782 | ||
783 | struct dma_buf_attachment *attachment; | ||
784 | struct dma_buf *dma_buf; | ||
783 | unsigned domain; | 785 | unsigned domain; |
784 | const char *placement; | 786 | const char *placement; |
785 | unsigned pin_count; | 787 | unsigned pin_count; |
@@ -808,6 +810,15 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data) | |||
808 | pin_count = READ_ONCE(bo->pin_count); | 810 | pin_count = READ_ONCE(bo->pin_count); |
809 | if (pin_count) | 811 | if (pin_count) |
810 | seq_printf(m, " pin count %d", pin_count); | 812 | seq_printf(m, " pin count %d", pin_count); |
813 | |||
814 | dma_buf = READ_ONCE(bo->gem_base.dma_buf); | ||
815 | attachment = READ_ONCE(bo->gem_base.import_attach); | ||
816 | |||
817 | if (attachment) | ||
818 | seq_printf(m, " imported from %p", dma_buf); | ||
819 | else if (dma_buf) | ||
820 | seq_printf(m, " exported as %p", dma_buf); | ||
821 | |||
811 | seq_printf(m, "\n"); | 822 | seq_printf(m, "\n"); |
812 | 823 | ||
813 | return 0; | 824 | return 0; |