diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-12-17 17:42:11 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-12-18 07:25:29 -0500 |
commit | d8ccba866356e5b8989ff9081df66cf300b1f834 (patch) | |
tree | dc38dd10c6d94b908f12ef2b66535886c88eae0a | |
parent | 820c1980353808717f78a0c4ca2c734f0247dc0c (diff) |
drm/i915: grab a pages pin count for preallocate stolen
But only when we indeed set up a gtt mapping. We need this since the
vma also holds a pages_pin_count, on top of the unconditional
pages_pin_count we grab for all stolen objects (to avoid swap-out).
This should avoid a pages_pin_count underrun when cleaning up
framebuffers objects taken over from the BIOS.
Chris mentioned in his review that this bug even predates the vma
conversion.
Reported-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Ben Widawsky <benjamin.widawsky@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_stolen.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c index d284d892ed94..fed87ec17211 100644 --- a/drivers/gpu/drm/i915/i915_gem_stolen.c +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c | |||
@@ -420,6 +420,7 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_device *dev, | |||
420 | 420 | ||
421 | list_add_tail(&obj->global_list, &dev_priv->mm.bound_list); | 421 | list_add_tail(&obj->global_list, &dev_priv->mm.bound_list); |
422 | list_add_tail(&vma->mm_list, &ggtt->inactive_list); | 422 | list_add_tail(&vma->mm_list, &ggtt->inactive_list); |
423 | i915_gem_object_pin_pages(obj); | ||
423 | 424 | ||
424 | return obj; | 425 | return obj; |
425 | 426 | ||