diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-07-19 10:51:42 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-10-03 13:12:54 +1000 |
commit | e193b1d42c390bf1bff7fa02a5a1202b98e75601 (patch) | |
tree | c31143ea95c00e8b49c12571b10a1b9a200bd490 /drivers/gpu/drm/nouveau/nouveau_channel.c | |
parent | 66f247234d1c47da480f687b8104d8935d05b404 (diff) |
drm/nouveau/fence: un-port from nouveau_exec_engine interfaces
Still the same code, but not an "engine" anymore. The fence code is more of
a policy decision rather than exposing mechanisms, so it's not appropriate
to port it to the new engine subsystem.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_channel.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_channel.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c index fd4d9513585e..285fde8ed3e3 100644 --- a/drivers/gpu/drm/nouveau/nouveau_channel.c +++ b/drivers/gpu/drm/nouveau/nouveau_channel.c @@ -124,9 +124,9 @@ nouveau_channel_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret, struct drm_file *file_priv, uint32_t vram_handle, uint32_t gart_handle) { - struct nouveau_exec_engine *fence = nv_engine(dev, NVOBJ_ENGINE_FENCE); - struct nouveau_fifo_priv *pfifo = nv_engine(dev, NVOBJ_ENGINE_FIFO); struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_fifo_priv *pfifo = nv_engine(dev, NVOBJ_ENGINE_FIFO); + struct nouveau_fence_priv *fence = dev_priv->fence.func; struct nouveau_fpriv *fpriv = nouveau_fpriv(file_priv); struct nouveau_channel *chan; unsigned long flags; @@ -234,7 +234,7 @@ nouveau_channel_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret, FIRE_RING(chan); - ret = fence->context_new(chan, NVOBJ_ENGINE_FENCE); + ret = fence->context_new(chan); if (ret) { nouveau_channel_put(&chan); return ret; @@ -289,6 +289,7 @@ nouveau_channel_put_unlocked(struct nouveau_channel **pchan) struct nouveau_channel *chan = *pchan; struct drm_device *dev = chan->dev; struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_fence_priv *fence = dev_priv->fence.func; unsigned long flags; int i; @@ -311,6 +312,9 @@ nouveau_channel_put_unlocked(struct nouveau_channel **pchan) dev_priv->eng[i]->context_del(chan, i); } + if (chan->fence) + fence->context_del(chan); + /* aside from its resources, the channel should now be dead, * remove it from the channel list */ |