aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-08-29 15:49:51 -0400
committerEric Anholt <eric@anholt.net>2009-08-29 20:37:21 -0400
commita09ba7faf75fa4b21980d81de8e5f3d5c0785ccf (patch)
treedd0e468fa4a1a287fc365dc5b4ce546b68234377 /drivers/gpu/drm/i915/i915_drv.h
parentf8aed700c6ec46ddade6570004ce25332283b306 (diff)
drm/i915: Fix CPU-spinning hangs related to fence usage by using an LRU.
The lack of a proper LRU was partially worked around by taking the fence from the object containing the oldest seqno. But if there are multiple objects inactive, then they don't have seqnos and the first fence reg among them would be chosen. If you were trying to copy data between two mappings, this could result in each page fault stealing the fence from the other argument, and your application hanging. https://bugs.freedesktop.org/show_bug.cgi?id=23566 https://bugs.freedesktop.org/show_bug.cgi?id=23220 https://bugs.freedesktop.org/show_bug.cgi?id=23253 https://bugs.freedesktop.org/show_bug.cgi?id=23366 Cc: Stable Team <stable@kernel.org> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 7537f57d8a8..11fc4b66c88 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -384,6 +384,9 @@ typedef struct drm_i915_private {
384 */ 384 */
385 struct list_head inactive_list; 385 struct list_head inactive_list;
386 386
387 /** LRU list of objects with fence regs on them. */
388 struct list_head fence_list;
389
387 /** 390 /**
388 * List of breadcrumbs associated with GPU requests currently 391 * List of breadcrumbs associated with GPU requests currently
389 * outstanding. 392 * outstanding.
@@ -451,6 +454,9 @@ struct drm_i915_gem_object {
451 /** This object's place on the active/flushing/inactive lists */ 454 /** This object's place on the active/flushing/inactive lists */
452 struct list_head list; 455 struct list_head list;
453 456
457 /** This object's place on the fenced object LRU */
458 struct list_head fence_list;
459
454 /** 460 /**
455 * This is set if the object is on the active or flushing lists 461 * This is set if the object is on the active or flushing lists
456 * (has pending rendering), and is not set if it's on inactive (ready 462 * (has pending rendering), and is not set if it's on inactive (ready