From: Alex Deucher <alexander.deucher@amd.com>
To: <amd-gfx@lists.freedesktop.org>,
<dri-devel@lists.freedesktop.org>,
<intel-gfx@lists.freedesktop.org>,
<intel-xe@lists.freedesktop.org>,
<tvrtko.ursulin@linux.intel.com>, <daniel@ffwll.ch>
Cc: Alex Deucher <alexander.deucher@amd.com>
Subject: [PATCH 6/6] drm/xe: Update shared stats to use the new gem helper
Date: Mon, 12 Feb 2024 16:04:28 -0500 [thread overview]
Message-ID: <20240212210428.851952-7-alexander.deucher@amd.com> (raw)
In-Reply-To: <20240212210428.851952-1-alexander.deucher@amd.com>
Switch to using the new gem shared memory stats helper
rather than hand rolling it.
Link: https://lore.kernel.org/all/20231207180225.439482-1-alexander.deucher@amd.com/
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/xe/xe_drm_client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
index 82d1305e831f..ecf2eb67d310 100644
--- a/drivers/gpu/drm/xe/xe_drm_client.c
+++ b/drivers/gpu/drm/xe/xe_drm_client.c
@@ -113,7 +113,7 @@ static void bo_meminfo(struct xe_bo *bo,
else
mem_type = XE_PL_TT;
- if (bo->ttm.base.handle_count > 1)
+ if (drm_gem_object_is_shared_for_memory_stats(&bo->ttm.base))
stats[mem_type].shared += sz;
else
stats[mem_type].private += sz;
--
2.42.0
next prev parent reply other threads:[~2024-02-12 21:05 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-12 21:04 [PATCH 0/6 V4] fdinfo shared stats Alex Deucher
2024-02-12 21:04 ` [PATCH 1/6] Documentation/gpu: Update documentation on drm-shared-* Alex Deucher
2024-02-12 21:04 ` [PATCH 2/6] drm: add drm_gem_object_is_shared_for_memory_stats() helper Alex Deucher
2024-02-12 21:04 ` [PATCH 3/6] drm: update drm_show_memory_stats() for dma-bufs Alex Deucher
2024-02-12 21:04 ` [PATCH 4/6] drm/amdgpu: add shared fdinfo stats Alex Deucher
2024-02-12 21:04 ` [PATCH 5/6] drm/i915: Update shared stats to use the new gem helper Alex Deucher
2024-02-12 21:04 ` Alex Deucher [this message]
2024-02-13 5:29 ` ✓ CI.Patch_applied: success for fdinfo shared stats (rev3) Patchwork
2024-02-13 5:29 ` ✗ CI.checkpatch: warning " Patchwork
2024-02-13 5:30 ` ✓ CI.KUnit: success " Patchwork
2024-02-13 5:40 ` ✓ CI.Build: " Patchwork
2024-02-13 5:41 ` ✓ CI.Hooks: " Patchwork
2024-02-13 5:42 ` ✗ CI.checksparse: warning " Patchwork
2024-02-13 6:18 ` ✓ CI.BAT: success " Patchwork
2024-02-15 14:12 ` [PATCH 0/6 V4] fdinfo shared stats Christian König
2024-02-15 14:20 ` Alex Deucher
2024-02-16 12:45 ` Christian König
-- strict thread matches above, loose matches on Subject: below --
2024-01-30 16:12 [PATCH 0/6 V3] " Alex Deucher
2024-01-30 16:12 ` [PATCH 6/6] drm/xe: Update shared stats to use the new gem helper 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=20240212210428.851952-7-alexander.deucher@amd.com \
--to=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=tvrtko.ursulin@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox