[PATCH 22/27] drain_freed_objects ducktape
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Fri Oct 8 06:30:18 UTC 2021
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
index ec80b0ba061c..92d4c8cd5493 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -747,12 +747,15 @@ static int eb_reserve(struct i915_execbuffer *eb)
if (pass == 2) {
/* No point in defragmenting gtt if all is pinned */
- if (!unpinned)
+ if (!unpinned && !atomic_read(&eb->i915->mm.free_count))
return -ENOSPC;
- err = eb_evict_vm(eb);
- if (err)
- return err;
+ i915_gem_drain_freed_objects(eb->i915);
+ if (unpinned) {
+ err = eb_evict_vm(eb);
+ if (err)
+ return err;
+ }
}
list_for_each_entry(ev, &eb->unbound, bind_link) {
--
2.33.0
More information about the Intel-gfx-trybot
mailing list