]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Pad ringbuffer with NOOPs before wrapping
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 5 Sep 2009 17:07:06 +0000 (18:07 +0100)
committerEric Anholt <eric@anholt.net>
Sun, 6 Sep 2009 18:29:06 +0000 (11:29 -0700)
commit2dc1deea7e725189bf4b1685c951579e09633bff
treefb34eee409dffa5bfef725b00d38d6d54b8d31c8
parent98562df60b0c3d8c79d695b2ac1b0c891d8048c5
drm/i915: Pad ringbuffer with NOOPs before wrapping

According to the docs, the ringbuffer is not allowed to wrap in the middle
of an instruction.

G45 PRM, Vol 1b, p101:
  While the “free space” wrap may allow commands to be wrapped around the
  end of the Ring Buffer, the wrap should only occur between commands.
  Padding (with NOP) may be required to follow this restriction.

Do as commanded.

[Having seen bug reports where there is evidence of split commands, but
apparently the GPU has continued on merrily before a bizarre and untimely
death, this may or may not fix a few random hangs.]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
CC: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c