diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-10-05 02:53:48 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-12-03 00:05:10 -0500 |
commit | 6a6b73f254123851f7f73ab5e57344a569d6a0ab (patch) | |
tree | 5db28f577f0a7b15525aeef57d45a34ea4366bb8 /drivers/gpu/drm/nouveau/nouveau_drv.h | |
parent | ceed5f30bf0f515b52246230e5faacf89983fd8f (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drv.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 1c7db64c03bf..04bc56cf4f1a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h | |||
@@ -166,6 +166,8 @@ struct nouveau_channel { | |||
166 | struct drm_device *dev; | 166 | struct drm_device *dev; |
167 | int id; | 167 | int id; |
168 | 168 | ||
169 | struct mutex mutex; | ||
170 | |||
169 | /* owner of this fifo */ | 171 | /* owner of this fifo */ |
170 | struct drm_file *file_priv; | 172 | struct drm_file *file_priv; |
171 | /* mapping of the fifo itself */ | 173 | /* mapping of the fifo itself */ |