]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Don't let a device flush to prepare buffers clear new write_domains.
authorEric Anholt <eric@anholt.net>
Thu, 19 Feb 2009 22:54:51 +0000 (14:54 -0800)
committerDave Airlie <airlied@redhat.com>
Mon, 23 Feb 2009 00:06:19 +0000 (10:06 +1000)
commit1d5e1be7ee61762c2cb5d4528cda4fa799e29ee0
tree0b087388f9fd5ba506c1d985f53dd820ff73583a
parent8fa7a2cb74d0b574d4ed137f9bcd0da5a283cb46
drm/i915: Don't let a device flush to prepare buffers clear new write_domains.

The problem was that object_set_to_gpu_domain would set the new write_domains
that are getting set by this batchbuffer, then the accumulated flushes required
for all the objects in preparation for this batchbuffer were posted, and the
brand new write domain would get cleared by the flush being posted.  Instead,
hang on to the new (or old if we're not changing it) value and set it after
the flush is queued.

Results from this noticably included conformance test failures from reads
shortly after writes (where the new write domain had been lost and thus not
flushed and waited on), but is a suspected cause of hangs in some apps when
a write domain is lost on a buffer that gets reused for instruction or
commmand state.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/i915/i915_gem.c