]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau: add per-channel mutex, use to lock access to drm's channel
authorBen Skeggs <bskeggs@redhat.com>
Tue, 5 Oct 2010 06:53:48 +0000 (16:53 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 3 Dec 2010 05:05:10 +0000 (15:05 +1000)
commitb410179952cd0dc5600e09adb58c04870fe3d707
tree5db28f577f0a7b15525aeef57d45a34ea4366bb8
parent264edbb98d83a2996389d0cc800ac08df7b67a59
drm/nouveau: add per-channel mutex, use to lock access to drm's channel

This fixes a race condition between fbcon acceleration and TTM buffer
moves.  To reproduce:

- start X
- switch to vt and "while (true); do dmesg; done"
- switch to another vt and "sleep 2 && cat /path/to/debugfs/dri/0/evict_vram"
- switch back to vt running dmesg

We don't make use of this on any other channel yet, they're currently
protected by drm_global_mutex.  This will change in the near future.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_channel.c
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_fbcon.c