aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_chan.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-08-19 16:03:00 +1000
committerBen Skeggs <bskeggs@redhat.com>2012-10-03 13:13:06 +1000
commitc97f8c922ea78195aa7d833d639d2963cc11af8e (patch)
tree51948f3b5374ed52746761720e6641b165ab2190 /drivers/gpu/drm/nouveau/nouveau_chan.c
parentdrm/nouveau/dmaobj: reject unsupported parent types instead of half-succeeding (diff)
downloadlinux-dev-c97f8c922ea78195aa7d833d639d2963cc11af8e.tar.xz
linux-dev-c97f8c922ea78195aa7d833d639d2963cc11af8e.zip
drm/nouveau/fifo: use defines instead of hardcoded class ids
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_chan.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c b/drivers/gpu/drm/nouveau/nouveau_chan.c
index e6451847df4a..55dc51c1b92e 100644
--- a/drivers/gpu/drm/nouveau/nouveau_chan.c
+++ b/drivers/gpu/drm/nouveau/nouveau_chan.c
@@ -187,7 +187,11 @@ nouveau_channel_ind(struct nouveau_drm *drm, struct nouveau_cli *cli,
u32 parent, u32 handle, u32 engine,
struct nouveau_channel **pchan)
{
- static const u16 oclasses[] = { 0xa06f, 0x906f, 0x826f, 0x506f, 0 };
+ static const u16 oclasses[] = { NVE0_CHANNEL_IND_CLASS,
+ NVC0_CHANNEL_IND_CLASS,
+ NV84_CHANNEL_IND_CLASS,
+ NV50_CHANNEL_IND_CLASS,
+ 0 };
const u16 *oclass = oclasses;
struct nve0_channel_ind_class args;
struct nouveau_channel *chan;
@@ -221,7 +225,11 @@ static int
nouveau_channel_dma(struct nouveau_drm *drm, struct nouveau_cli *cli,
u32 parent, u32 handle, struct nouveau_channel **pchan)
{
- static const u16 oclasses[] = { 0x406e, 0x176e, 0x006e, 0x006b, 0 };
+ static const u16 oclasses[] = { NV40_CHANNEL_DMA_CLASS,
+ NV17_CHANNEL_DMA_CLASS,
+ NV10_CHANNEL_DMA_CLASS,
+ NV03_CHANNEL_DMA_CLASS,
+ 0 };
const u16 *oclass = oclasses;
struct nv03_channel_dma_class args;
struct nouveau_channel *chan;