diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/4238-drm-amdgpu-print-DMA-buf-status-in-debugfs.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.14.71/4238-drm-amdgpu-print-DMA-buf-status-in-debugfs.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/4238-drm-amdgpu-print-DMA-buf-status-in-debugfs.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/4238-drm-amdgpu-print-DMA-buf-status-in-debugfs.patch new file mode 100644 index 00000000..b860d66f --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/4238-drm-amdgpu-print-DMA-buf-status-in-debugfs.patch @@ -0,0 +1,48 @@ +From 5b793f8d74f275ffcaebfacf53a4514486868004 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com> +Date: Sun, 25 Mar 2018 10:10:25 +0200 +Subject: [PATCH 4238/5725] drm/amdgpu: print DMA-buf status in debugfs +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Just note if a BO was imported/exported. + +Signed-off-by: Christian König <christian.koenig@amd.com> +Reviewed-by: Alex Deucher <alexander.deucher@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 88de5c1..3621ff0 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +@@ -931,6 +931,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; +@@ -965,6 +967,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; +-- +2.7.4 + |