Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329651
b: refs/heads/master
c: 0c5b8ce
h: refs/heads/master
i:
  329649: 73f5894
  329647: 44854bf
v: v3
  • Loading branch information
Ben Skeggs committed Oct 3, 2012
1 parent fc4d2e0 commit fd917dd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3acec63aee5d082f86218973912e682e84ec2a05
refs/heads/master: 0c5b8cecf34d6b25e577475cc5e8c7169d63ba92
16 changes: 16 additions & 0 deletions trunk/drivers/gpu/drm/nouveau/core/engine/fifo/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,21 @@ _nouveau_fifo_channel_wr32(struct nouveau_object *object, u32 addr, u32 data)
iowrite32_native(data, chan->user + addr);
}

int
nouveau_fifo_chid(struct nouveau_fifo *priv, struct nouveau_object *object)
{
int engidx = nv_hclass(priv) & 0xff;

while (object && object->parent) {
if ( nv_iclass(object->parent, NV_ENGCTX_CLASS) &&
(nv_hclass(object->parent) & 0xff) == engidx)
return nouveau_fifo_chan(object)->chid;
object = object->parent;
}

return -1;
}

void
nouveau_fifo_destroy(struct nouveau_fifo *priv)
{
Expand Down Expand Up @@ -160,6 +175,7 @@ nouveau_fifo_create_(struct nouveau_object *parent,
if (!priv->channel)
return -ENOMEM;

priv->chid = nouveau_fifo_chid;
spin_lock_init(&priv->lock);
return 0;
}
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/nouveau/core/include/engine/fifo.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ struct nouveau_fifo {
u16 min;
u16 max;

int (*chid)(struct nouveau_fifo *, struct nouveau_object *);
void (*pause)(struct nouveau_fifo *, unsigned long *);
void (*start)(struct nouveau_fifo *, unsigned long *);
};
Expand Down

0 comments on commit fd917dd

Please sign in to comment.