diff options
author | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2023-11-07 10:18:03 +0000 |
---|---|---|
committer | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2023-11-10 11:48:59 +0000 |
commit | 978e1a52ca1f0228eccc51ad5ed3a118bac1ad1c (patch) | |
tree | 00fb085884785ea2e38eb5c1da4c9a303ca5fdae /drivers/gpu | |
parent | ca02a0119f814b792484cba0c148fba292327ed6 (diff) | |
download | lwn-978e1a52ca1f0228eccc51ad5ed3a118bac1ad1c.tar.gz lwn-978e1a52ca1f0228eccc51ad5ed3a118bac1ad1c.zip |
drm/i915: Track page table backing store usage
Account page table backing store 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-3-tvrtko.ursulin@linux.intel.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_gtt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.c b/drivers/gpu/drm/i915/gt/intel_gtt.c index 21719563a602..86f73fe558ca 100644 --- a/drivers/gpu/drm/i915/gt/intel_gtt.c +++ b/drivers/gpu/drm/i915/gt/intel_gtt.c @@ -63,6 +63,9 @@ struct drm_i915_gem_object *alloc_pt_lmem(struct i915_address_space *vm, int sz) if (!IS_ERR(obj)) { obj->base.resv = i915_vm_resv_get(vm); obj->shares_resv_from = vm; + + if (vm->fpriv) + i915_drm_client_add_object(vm->fpriv->client, obj); } return obj; @@ -84,6 +87,9 @@ struct drm_i915_gem_object *alloc_pt_dma(struct i915_address_space *vm, int sz) if (!IS_ERR(obj)) { obj->base.resv = i915_vm_resv_get(vm); obj->shares_resv_from = vm; + + if (vm->fpriv) + i915_drm_client_add_object(vm->fpriv->client, obj); } return obj; |