diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-08-19 06:03:00 (GMT) |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-10-03 03:13:06 (GMT) |
commit | c97f8c922ea78195aa7d833d639d2963cc11af8e (patch) | |
tree | 51948f3b5374ed52746761720e6641b165ab2190 /drivers/gpu/drm/nouveau/nouveau_chan.c | |
parent | 1971f04e16172db79b8b0eed75fb2cb82adfbb83 (diff) | |
download | linux-c97f8c922ea78195aa7d833d639d2963cc11af8e.tar.xz |
drm/nouveau/fifo: use defines instead of hardcoded class ids
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_chan.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_chan.c | 12 |
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 e645184..55dc51c 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; |