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_fence.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_fence.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_fence.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c index a91d6e85988..9775458aff4 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fence.c +++ b/drivers/gpu/drm/nouveau/nouveau_fence.c @@ -62,8 +62,9 @@ void nouveau_fence_update(struct nouveau_channel *chan) { struct drm_device *dev = chan->dev; - struct nouveau_fence_priv *priv = nv_engine(dev, NVOBJ_ENGINE_FENCE); - struct nouveau_fence_chan *fctx = chan->engctx[NVOBJ_ENGINE_FENCE]; + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_fence_priv *priv = dev_priv->fence.func; + struct nouveau_fence_chan *fctx = chan->fence; struct nouveau_fence *fence, *fnext; spin_lock(&fctx->lock); @@ -84,8 +85,9 @@ int nouveau_fence_emit(struct nouveau_fence *fence, struct nouveau_channel *chan) { struct drm_device *dev = chan->dev; - struct nouveau_fence_priv *priv = nv_engine(dev, NVOBJ_ENGINE_FENCE); - struct nouveau_fence_chan *fctx = chan->engctx[NVOBJ_ENGINE_FENCE]; + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_fence_priv *priv = dev_priv->fence.func; + struct nouveau_fence_chan *fctx = chan->fence; int ret; fence->channel = chan; @@ -148,7 +150,8 @@ int nouveau_fence_sync(struct nouveau_fence *fence, struct nouveau_channel *chan) { struct drm_device *dev = chan->dev; - struct nouveau_fence_priv *priv = nv_engine(dev, NVOBJ_ENGINE_FENCE); + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_fence_priv *priv = dev_priv->fence.func; struct nouveau_channel *prev; int ret = 0; @@ -193,7 +196,7 @@ nouveau_fence_new(struct nouveau_channel *chan, struct nouveau_fence **pfence) struct nouveau_fence *fence; int ret = 0; - if (unlikely(!chan->engctx[NVOBJ_ENGINE_FENCE])) + if (unlikely(!chan->fence)) return -ENODEV; fence = kzalloc(sizeof(*fence), GFP_KERNEL); |