]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau: Evict buffers in VRAM before freeing sgdma
authorLuca Barbieri <luca@luca-barbieri.com>
Sat, 16 Jan 2010 14:30:15 +0000 (15:30 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Sun, 17 Jan 2010 23:56:13 +0000 (09:56 +1000)
commit3d1d95b5e38012f086887af21b8193af4888fe02
treec10a83f9dcb7fbeb52ac4fd7fc2b8374f128ebc2
parentf7c9d1f8ed2c69080b3ce32114f6bcbb2b4145df
drm/nouveau: Evict buffers in VRAM before freeing sgdma

Currently, we take down the sgdma engine without evicting all buffers
from VRAM.

The TTM device release will try to evict anything in VRAM to GART
memory, but this will fail since sgdma has already been taken down.

This causes an infinite loop in kernel mode on module unload.
It usually doesn't happen because there aren't any buffer on close.
However, if the GPU is locked up, this condition is easily triggered.

This patch fixes it in the simplest way possible by cleaning VRAM
right before cleaning SGDMA memory.

Signed-off-by: Luca Barbieri <luca@luca-barbieri.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_mem.c
drivers/gpu/drm/nouveau/nouveau_state.c