OSDN Git Service

[gem] Release GEM buffers from work task scheduled from IRQ.
authorEric Anholt <eric@anholt.net>
Wed, 14 May 2008 22:13:14 +0000 (15:13 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 23 May 2008 05:00:21 +0000 (22:00 -0700)
commit5e662f90d1143de53db866e2b8a94f1bfbe5fc51
tree07eff8ed2e6babe0af336b21c1da3b2e260e8bbd
parentd6f796857780fc54641047e2aa4e7091376928eb
[gem] Release GEM buffers from work task scheduled from IRQ.

There are now 3 lists.  Active is buffers currently in the ringbuffer.
Flushing is not in the ringbuffer, but needs a flush before unbinding.
Inactive is as before.  This prevents object_free → unbind →
wait_rendering → object_reference and a kernel oops about weird refcounting.

This also avoids an synchronous extra flush and wait when freeing a buffer
which had a write_domain set (such as a temporary rendered to and then from
using the 2d engine).  It will sit around on the flushing list until the
appropriate flush gets emitted, or we need the GTT space for another
operation.
linux-core/i915_gem.c
shared-core/i915_dma.c
shared-core/i915_drv.h
shared-core/i915_irq.c