summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv84_fence.c
diff options
context:
space:
mode:
authorBen Skeggs2014-08-09 20:10:22 +0200
committerBen Skeggs2014-08-09 21:13:13 +0200
commit967e7bde8739fe3b215f7537e8f1f39c044902af (patch)
tree5d96683b3b139da0b681ae038a8cd5f25ca32ef8 /drivers/gpu/drm/nouveau/nv84_fence.c
parentdrm/nouveau: kill nouveau_dev() + wrap register macros (diff)
downloadkernel-qcow2-linux-967e7bde8739fe3b215f7537e8f1f39c044902af.tar.gz
kernel-qcow2-linux-967e7bde8739fe3b215f7537e8f1f39c044902af.tar.xz
kernel-qcow2-linux-967e7bde8739fe3b215f7537e8f1f39c044902af.zip
drm/nouveau: initial pass at moving to struct nvif_device
This is an attempt at isolating some of the changes necessary to port to NVIF in a separate commit. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv84_fence.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv84_fence.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nv84_fence.c b/drivers/gpu/drm/nouveau/nv84_fence.c
index 7103a771aa87..94184a94a763 100644
--- a/drivers/gpu/drm/nouveau/nv84_fence.c
+++ b/drivers/gpu/drm/nouveau/nv84_fence.c
@@ -81,7 +81,7 @@ nv84_fence_emit(struct nouveau_fence *fence)
{
struct nouveau_channel *chan = fence->channel;
struct nv84_fence_chan *fctx = chan->fence;
- struct nouveau_fifo_chan *fifo = (void *)chan->object;
+ struct nouveau_fifo_chan *fifo = nvkm_fifo_chan(chan);
u64 addr = fifo->chid * 16;
if (fence->sysmem)
@@ -97,7 +97,7 @@ nv84_fence_sync(struct nouveau_fence *fence,
struct nouveau_channel *prev, struct nouveau_channel *chan)
{
struct nv84_fence_chan *fctx = chan->fence;
- struct nouveau_fifo_chan *fifo = (void *)prev->object;
+ struct nouveau_fifo_chan *fifo = nvkm_fifo_chan(prev);
u64 addr = fifo->chid * 16;
if (fence->sysmem)
@@ -111,7 +111,7 @@ nv84_fence_sync(struct nouveau_fence *fence,
static u32
nv84_fence_read(struct nouveau_channel *chan)
{
- struct nouveau_fifo_chan *fifo = (void *)chan->object;
+ struct nouveau_fifo_chan *fifo = nvkm_fifo_chan(chan);
struct nv84_fence_priv *priv = chan->drm->fence;
return nouveau_bo_rd32(priv->bo, fifo->chid * 16/4);
}
@@ -139,7 +139,7 @@ nv84_fence_context_del(struct nouveau_channel *chan)
int
nv84_fence_context_new(struct nouveau_channel *chan)
{
- struct nouveau_fifo_chan *fifo = (void *)chan->object;
+ struct nouveau_fifo_chan *fifo = nvkm_fifo_chan(chan);
struct nouveau_cli *cli = chan->cli;
struct nv84_fence_priv *priv = chan->drm->fence;
struct nv84_fence_chan *fctx;
@@ -178,7 +178,7 @@ nv84_fence_context_new(struct nouveau_channel *chan)
static bool
nv84_fence_suspend(struct nouveau_drm *drm)
{
- struct nouveau_fifo *pfifo = nouveau_fifo(drm->device);
+ struct nouveau_fifo *pfifo = nvkm_fifo(&drm->device);
struct nv84_fence_priv *priv = drm->fence;
int i;
@@ -194,7 +194,7 @@ nv84_fence_suspend(struct nouveau_drm *drm)
static void
nv84_fence_resume(struct nouveau_drm *drm)
{
- struct nouveau_fifo *pfifo = nouveau_fifo(drm->device);
+ struct nouveau_fifo *pfifo = nvkm_fifo(&drm->device);
struct nv84_fence_priv *priv = drm->fence;
int i;
@@ -225,7 +225,7 @@ nv84_fence_destroy(struct nouveau_drm *drm)
int
nv84_fence_create(struct nouveau_drm *drm)
{
- struct nouveau_fifo *pfifo = nouveau_fifo(drm->device);
+ struct nouveau_fifo *pfifo = nvkm_fifo(&drm->device);
struct nv84_fence_priv *priv;
int ret;