summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_ringbuffer.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-09-04 10:45:52 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-09-05 12:03:53 +0200
commit3c0e234c847318304c12f9e7fffac7e1cf3db3ff (patch)
tree11f5b83d1a88a9aa1683a28356ac617845862999 /drivers/gpu/drm/i915/intel_ringbuffer.h
parent1823521d2b2fa614e7ad95fdc8a0f59e571f37ce (diff)
downloadtalos-obmc-linux-3c0e234c847318304c12f9e7fffac7e1cf3db3ff.tar.gz
talos-obmc-linux-3c0e234c847318304c12f9e7fffac7e1cf3db3ff.zip
drm/i915; Preallocate the lazy request
It is possible for us to be forced to perform an allocation for the lazy request whilst running the shrinker. This allocation may fail, leaving us unable to reclaim any memory leading to premature OOM. A neat solution to the problem is to preallocate the request at the same time as acquiring the seqno for the ring transaction. This means that we can report ENOMEM prior to touching the rings. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.h')
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index c6aa2b3c8c26..ad2dd65c63f8 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -140,6 +140,7 @@ struct intel_ring_buffer {
/**
* Do we have some not yet emitted requests outstanding?
*/
+ struct drm_i915_gem_request *preallocated_lazy_request;
u32 outstanding_lazy_seqno;
bool gpu_caches_dirty;
bool fbc_dirty;
OpenPOWER on IntegriCloud