<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Christian König <ckoenig.leichtzumerken@gmail.com><br>
<b>Sent:</b> Wednesday, April 18, 2018 6:13:09 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Subject:</b> Re: [PATCH] drm/amdgpu: print DMA-buf status in debugfs</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Ping? Could anybody review that?<br>
<br>
Thanks,<br>
Christian.<br>
<br>
Am 11.04.2018 um 15:09 schrieb Christian König:<br>
> Just note if a BO was imported/exported.<br>
><br>
> Signed-off-by: Christian König <christian.koenig@amd.com><br>
> ---<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++++++++++<br>
> 1 file changed, 11 insertions(+)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c<br>
> index 28c2706e48d7..93d3f333444b 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c<br>
> @@ -765,6 +765,8 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data)<br>
> struct amdgpu_bo *bo = gem_to_amdgpu_bo(gobj);<br>
> struct seq_file *m = data;<br>
> <br>
> + struct dma_buf_attachment *attachment;<br>
> + struct dma_buf *dma_buf;<br>
> unsigned domain;<br>
> const char *placement;<br>
> unsigned pin_count;<br>
> @@ -793,6 +795,15 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data)<br>
> pin_count = READ_ONCE(bo->pin_count);<br>
> if (pin_count)<br>
> seq_printf(m, " pin count %d", pin_count);<br>
> +<br>
> + dma_buf = READ_ONCE(bo->gem_base.dma_buf);<br>
> + attachment = READ_ONCE(bo->gem_base.import_attach);<br>
> +<br>
> + if (attachment)<br>
> + seq_printf(m, " imported from %p", dma_buf);<br>
> + else if (dma_buf)<br>
> + seq_printf(m, " exported as %p", dma_buf);<br>
> +<br>
> seq_printf(m, "\n");<br>
> <br>
> return 0;<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>