[Intel-gfx] [PATCH 11/19] drm/i915/execlists: Reduce list_for_each_safe+list_safe_reset_next
Michał Winiarski
michal.winiarski at intel.com
Wed Jan 3 11:12:00 UTC 2018
On Tue, Jan 02, 2018 at 03:12:27PM +0000, Chris Wilson wrote:
> After staring at the list_for_each_safe macros for a bit, our current
> invocation of list_safe_reset_next in execlists_schedule() simply
> reduces to list_for_each.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Michał Winiarski <michal.winiarski at intel.com>
-Michał
> ---
> drivers/gpu/drm/i915/intel_lrc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 8c9d6cef2482..ffc20d7b754e 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1024,7 +1024,7 @@ static void execlists_schedule(struct drm_i915_gem_request *request, int prio)
> * end result is a topological list of requests in reverse order, the
> * last element in the list is the request we must execute first.
> */
> - list_for_each_entry_safe(dep, p, &dfs, dfs_link) {
> + list_for_each_entry(dep, &dfs, dfs_link) {
> struct i915_priotree *pt = dep->signaler;
>
> /*
> @@ -1043,8 +1043,6 @@ static void execlists_schedule(struct drm_i915_gem_request *request, int prio)
> if (prio > READ_ONCE(p->signaler->priority))
> list_move_tail(&p->dfs_link, &dfs);
> }
> -
> - list_safe_reset_next(dep, p, dfs_link);
> }
>
> /*
> --
> 2.15.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list