Reviewed-by: Alex Deucher <alexander.deucher at amd.com> ________________________________ From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> on behalf of Christian König <ckoenig.leichtzumerken at gmail.com> Sent: Wednesday, April 18, 2018 6:13:09 AM To: amd-gfx at lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: print DMA-buf status in debugfs Ping? Could anybody review that? Thanks, Christian. Am 11.04.2018 um 15:09 schrieb Christian König: > Just note if a BO was imported/exported. > > Signed-off-by: Christian König <christian.koenig at amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c > index 28c2706e48d7..93d3f333444b 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c > @@ -765,6 +765,8 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data) > struct amdgpu_bo *bo = gem_to_amdgpu_bo(gobj); > struct seq_file *m = data; > > + struct dma_buf_attachment *attachment; > + struct dma_buf *dma_buf; > unsigned domain; > const char *placement; > unsigned pin_count; > @@ -793,6 +795,15 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data) > pin_count = READ_ONCE(bo->pin_count); > if (pin_count) > seq_printf(m, " pin count %d", pin_count); > + > + dma_buf = READ_ONCE(bo->gem_base.dma_buf); > + attachment = READ_ONCE(bo->gem_base.import_attach); > + > + if (attachment) > + seq_printf(m, " imported from %p", dma_buf); > + else if (dma_buf) > + seq_printf(m, " exported as %p", dma_buf); > + > seq_printf(m, "\n"); > > return 0; _______________________________________________ amd-gfx mailing list amd-gfx at lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20180418/bf52f918/attachment.html>