diff options
author | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2023-11-07 10:18:04 +0000 |
---|---|---|
committer | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2023-11-10 11:49:02 +0000 |
commit | dc1a2775070f0618b661500310b2ea8643592ed1 (patch) | |
tree | 100a82374a6bfc56e2fa357176ada1a59834ee46 /drivers/gpu/drm/i915/i915_drm_client.c | |
parent | 978e1a52ca1f0228eccc51ad5ed3a118bac1ad1c (diff) | |
download | lwn-dc1a2775070f0618b661500310b2ea8643592ed1.tar.gz lwn-dc1a2775070f0618b661500310b2ea8643592ed1.zip |
drm/i915: Account ring buffer and context state storage
Account ring buffers and logical context space against the owning client
memory usage stats.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231107101806.608990-4-tvrtko.ursulin@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drm_client.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drm_client.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drm_client.c b/drivers/gpu/drm/i915/i915_drm_client.c index 2e5e69edc0f9..a61356012df8 100644 --- a/drivers/gpu/drm/i915/i915_drm_client.c +++ b/drivers/gpu/drm/i915/i915_drm_client.c @@ -144,4 +144,14 @@ bool i915_drm_client_remove_object(struct drm_i915_gem_object *obj) return true; } + +void i915_drm_client_add_context_objects(struct i915_drm_client *client, + struct intel_context *ce) +{ + if (ce->state) + i915_drm_client_add_object(client, ce->state->obj); + + if (ce->ring != ce->engine->legacy.ring && ce->ring->vma) + i915_drm_client_add_object(client, ce->ring->vma->obj); +} #endif |