All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Kuehling <felix.kuehling@amd.com>
To: Alex Deucher <alexander.deucher@amd.com>,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm: update drm_show_memory_stats() for dma-bufs
Date: Wed, 13 Dec 2023 16:28:44 -0500	[thread overview]
Message-ID: <83dc5d87-6374-4558-83c1-202c0b1add5f@amd.com> (raw)
In-Reply-To: <20231207180225.439482-2-alexander.deucher@amd.com>

On 2023-12-07 13:02, Alex Deucher wrote:
> Show buffers as shared if they are shared via dma-buf as well
> (e.g., shared with v4l or some other subsystem).

You can add KFD to that list. With the in-progress CUDA11 VM changes and 
improved interop between KFD and render nodes, sharing DMABufs between 
KFD and render nodes will become much more common.

Regards,
   Felix


>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: Rob Clark <robdclark@gmail.com>
> ---
>   drivers/gpu/drm/drm_file.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c
> index 5ddaffd32586..5d5f93b9c263 100644
> --- a/drivers/gpu/drm/drm_file.c
> +++ b/drivers/gpu/drm/drm_file.c
> @@ -973,7 +973,7 @@ void drm_show_memory_stats(struct drm_printer *p, struct drm_file *file)
>   					DRM_GEM_OBJECT_PURGEABLE;
>   		}
>   
> -		if (obj->handle_count > 1) {
> +		if ((obj->handle_count > 1) || obj->dma_buf) {
>   			status.shared += obj->size;
>   		} else {
>   			status.private += obj->size;

  reply	other threads:[~2023-12-13 21:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07 18:02 [PATCH 0/2] fdinfo shared stats Alex Deucher
2023-12-07 18:02 ` [PATCH 1/2] drm: update drm_show_memory_stats() for dma-bufs Alex Deucher
2023-12-07 18:02   ` Alex Deucher
2023-12-13 21:28   ` Felix Kuehling [this message]
2024-01-08 17:29   ` Rob Clark
2023-12-07 18:02 ` [PATCH 2/2] drm/amdgpu: add shared fdinfo stats Alex Deucher
2023-12-07 18:02   ` Alex Deucher
2024-01-08 21:27   ` Alex Deucher
2024-01-09  7:56   ` Christian König
2024-01-09  7:56     ` Christian König
2024-01-09  9:30     ` Tvrtko Ursulin
2024-01-09 12:54       ` Daniel Vetter
2024-01-09 12:54         ` Daniel Vetter
2024-01-09 13:25         ` Tvrtko Ursulin
2024-01-09 13:25           ` Tvrtko Ursulin
2024-01-09 14:26           ` Daniel Vetter
2024-01-09 14:26             ` Daniel Vetter
2024-01-09 14:57             ` Christian König
2024-01-09 14:57               ` Christian König
2024-01-09 15:09               ` Tvrtko Ursulin
2024-01-09 15:09                 ` Tvrtko Ursulin
2023-12-13 21:13 ` [PATCH 0/2] fdinfo shared stats Alex Deucher
2024-01-05 21:03   ` Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83dc5d87-6374-4558-83c1-202c0b1add5f@amd.com \
    --to=felix.kuehling@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.