drm/i915: ensure lru ordering of fence_list
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 19 Feb 2010 10:51:59 +0000 (11:51 +0100)
committerEric Anholt <eric@anholt.net>
Fri, 26 Feb 2010 21:23:21 +0000 (13:23 -0800)
commit63560396536e9eb8858826fcbfc14d4015a41a95
treedad8f01fb791190a5361204f3ea98a54f941fcb7
parentae3db24aab398fb5f985696c12362eb12ef65812
drm/i915: ensure lru ordering of fence_list

The fence_list should be lru ordered for otherwise we might try
to steal a fence reg from an active object even though there are
fences from inactive objects available. lru ordering was obeyed
for gpu access everywhere save when moving dirty objects from
flushing_list to active_list.

Fixing this cause the code to indent way to much, so I've extracted
the flushing_list processing logic into its on function.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_gem.c