From: John Harrison <John.C.Harrison@xxxxxxxxx> The i915_gem_object_flush_active() call used to do lots. Over time it has done less and less. Now all it does check the various associated requests to see if they can be retired. Hence this patch renames the function and updates the comments around it to match the current operation. For: VIZ-5115 Signed-off-by: John Harrison <John.C.Harrison@xxxxxxxxx> --- drivers/gpu/drm/i915/i915_gem.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index f825942..081cbbf 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2956,12 +2956,10 @@ i915_gem_idle_work_handler(struct work_struct *work) } /** - * Ensures that an object will eventually get non-busy by flushing any required - * write domains, emitting any outstanding lazy request and retiring and - * completed requests. + * Check an object to see if any of it's associated requests can be retired. */ static int -i915_gem_object_flush_active(struct drm_i915_gem_object *obj) +i915_gem_object_retire(struct drm_i915_gem_object *obj) { int i; @@ -3034,8 +3032,8 @@ i915_gem_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file) return -ENOENT; } - /* Need to make sure the object gets inactive eventually. */ - ret = i915_gem_object_flush_active(obj); + /* Check if the object is pending clean up. */ + ret = i915_gem_object_retire(obj); if (ret) goto out; @@ -4526,12 +4524,8 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data, goto unlock; } - /* Count all active objects as busy, even if they are currently not used - * by the gpu. Users of this interface expect objects to eventually - * become non-busy without any further actions, therefore emit any - * necessary flushes here. - */ - ret = i915_gem_object_flush_active(obj); + /* Check if the object is pending clean up. */ + ret = i915_gem_object_retire(obj); if (ret) goto unref; -- 1.7.9.5 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx