summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_channel.c
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2009-12-26 02:42:45 +0100
committerBen Skeggs <bskeggs@redhat.com>2010-01-11 00:06:37 +0100
commitf03a314b4671407c4ff69a2d85e72413e8064c48 (patch)
treebe9db286225f6bce82cdbe776e4c5444413157fa /drivers/gpu/drm/nouveau/nouveau_channel.c
parentdrm/nv50: make the blocksize depend on vram size (diff)
downloadlinux-f03a314b4671407c4ff69a2d85e72413e8064c48.tar.xz
linux-f03a314b4671407c4ff69a2d85e72413e8064c48.zip
drm/nouveau: Allocate a per-channel instance of NV_SW.
It will be useful for various synchronization purposes, mostly stolen from "[PATCH] drm/nv50: synchronize user channel after buffer object move on kernel channel" by Maarten Maathuis. Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_channel.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_channel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c
index 9aaa972f8822..4f378b68fe7b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_channel.c
+++ b/drivers/gpu/drm/nouveau/nouveau_channel.c
@@ -414,7 +414,9 @@ nouveau_ioctl_fifo_alloc(struct drm_device *dev, void *data,
init->subchan[0].grclass = 0x0039;
else
init->subchan[0].grclass = 0x5039;
- init->nr_subchan = 1;
+ init->subchan[1].handle = NvSw;
+ init->subchan[1].grclass = NV_SW;
+ init->nr_subchan = 2;
/* Named memory object area */
ret = drm_gem_handle_create(file_priv, chan->notifier_bo->gem,