aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-09-14 11:50:28 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-09-17 17:43:31 -0400
commit31169714fc928aed4e945b959dca2bedd259b9c9 (patch)
tree3cd6aa12bd7da1e4202607597b3baf9a07f48290 /drivers/gpu/drm/i915/i915_drv.h
parent725ceaa08a98fcdb1ec1c302700e33b629aece4b (diff)
drm/i915: Register a shrinker to free inactive lists under memory pressure
This should help GEM handle memory pressure sitatuions more gracefully. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 07214694b14f..bbcf5fc72666 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -369,6 +369,15 @@ typedef struct drm_i915_private {
369 int gtt_mtrr; 369 int gtt_mtrr;
370 370
371 /** 371 /**
372 * Membership on list of all loaded devices, used to evict
373 * inactive buffers under memory pressure.
374 *
375 * Modifications should only be done whilst holding the
376 * shrink_list_lock spinlock.
377 */
378 struct list_head shrink_list;
379
380 /**
372 * List of objects currently involved in rendering from the 381 * List of objects currently involved in rendering from the
373 * ringbuffer. 382 * ringbuffer.
374 * 383 *
@@ -741,6 +750,9 @@ int i915_gem_object_get_pages(struct drm_gem_object *obj);
741void i915_gem_object_put_pages(struct drm_gem_object *obj); 750void i915_gem_object_put_pages(struct drm_gem_object *obj);
742void i915_gem_release(struct drm_device * dev, struct drm_file *file_priv); 751void i915_gem_release(struct drm_device * dev, struct drm_file *file_priv);
743 752
753void i915_gem_shrinker_init(void);
754void i915_gem_shrinker_exit(void);
755
744/* i915_gem_tiling.c */ 756/* i915_gem_tiling.c */
745void i915_gem_detect_bit_6_swizzle(struct drm_device *dev); 757void i915_gem_detect_bit_6_swizzle(struct drm_device *dev);
746void i915_gem_object_do_bit_17_swizzle(struct drm_gem_object *obj); 758void i915_gem_object_do_bit_17_swizzle(struct drm_gem_object *obj);