diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-08-19 02:03:00 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-10-02 23:13:06 -0400 |
commit | c97f8c922ea78195aa7d833d639d2963cc11af8e (patch) | |
tree | 51948f3b5374ed52746761720e6641b165ab2190 /drivers | |
parent | 1971f04e16172db79b8b0eed75fb2cb82adfbb83 (diff) |
drm/nouveau/fifo: use defines instead of hardcoded class ids
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nv04.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nv10.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nv17.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nv40.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_chan.c | 12 |
9 files changed, 20 insertions, 12 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nv04.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nv04.c index cc49284be181..ea76e3e8c9c2 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nv04.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nv04.c | |||
@@ -247,7 +247,7 @@ nv04_fifo_ofuncs = { | |||
247 | 247 | ||
248 | static struct nouveau_oclass | 248 | static struct nouveau_oclass |
249 | nv04_fifo_sclass[] = { | 249 | nv04_fifo_sclass[] = { |
250 | { 0x006b, &nv04_fifo_ofuncs }, | 250 | { NV03_CHANNEL_DMA_CLASS, &nv04_fifo_ofuncs }, |
251 | {} | 251 | {} |
252 | }; | 252 | }; |
253 | 253 | ||
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nv10.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nv10.c index c4c78d50b396..4ba75422b89d 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nv10.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nv10.c | |||
@@ -106,7 +106,7 @@ nv10_fifo_ofuncs = { | |||
106 | 106 | ||
107 | static struct nouveau_oclass | 107 | static struct nouveau_oclass |
108 | nv10_fifo_sclass[] = { | 108 | nv10_fifo_sclass[] = { |
109 | { 0x006e, &nv10_fifo_ofuncs }, | 109 | { NV10_CHANNEL_DMA_CLASS, &nv10_fifo_ofuncs }, |
110 | {} | 110 | {} |
111 | }; | 111 | }; |
112 | 112 | ||
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nv17.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nv17.c index 1733765e8bf2..b96e6b0ae2b1 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nv17.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nv17.c | |||
@@ -113,7 +113,7 @@ nv17_fifo_ofuncs = { | |||
113 | 113 | ||
114 | static struct nouveau_oclass | 114 | static struct nouveau_oclass |
115 | nv17_fifo_sclass[] = { | 115 | nv17_fifo_sclass[] = { |
116 | { 0x176e, &nv17_fifo_ofuncs }, | 116 | { NV17_CHANNEL_DMA_CLASS, &nv17_fifo_ofuncs }, |
117 | {} | 117 | {} |
118 | }; | 118 | }; |
119 | 119 | ||
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nv40.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nv40.c index aef8ca106ac0..559c3b4e1b86 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nv40.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nv40.c | |||
@@ -232,7 +232,7 @@ nv40_fifo_ofuncs = { | |||
232 | 232 | ||
233 | static struct nouveau_oclass | 233 | static struct nouveau_oclass |
234 | nv40_fifo_sclass[] = { | 234 | nv40_fifo_sclass[] = { |
235 | { 0x406e, &nv40_fifo_ofuncs }, | 235 | { NV40_CHANNEL_DMA_CLASS, &nv40_fifo_ofuncs }, |
236 | {} | 236 | {} |
237 | }; | 237 | }; |
238 | 238 | ||
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c index 44a0dce07e19..536e7634a00d 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c | |||
@@ -346,8 +346,8 @@ nv50_fifo_ofuncs_ind = { | |||
346 | 346 | ||
347 | static struct nouveau_oclass | 347 | static struct nouveau_oclass |
348 | nv50_fifo_sclass[] = { | 348 | nv50_fifo_sclass[] = { |
349 | { 0x506e, &nv50_fifo_ofuncs_dma }, | 349 | { NV50_CHANNEL_DMA_CLASS, &nv50_fifo_ofuncs_dma }, |
350 | { 0x506f, &nv50_fifo_ofuncs_ind }, | 350 | { NV50_CHANNEL_IND_CLASS, &nv50_fifo_ofuncs_ind }, |
351 | {} | 351 | {} |
352 | }; | 352 | }; |
353 | 353 | ||
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c index 88ca9e89a87a..55620fbd5c21 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c | |||
@@ -310,8 +310,8 @@ nv84_fifo_ofuncs_ind = { | |||
310 | 310 | ||
311 | static struct nouveau_oclass | 311 | static struct nouveau_oclass |
312 | nv84_fifo_sclass[] = { | 312 | nv84_fifo_sclass[] = { |
313 | { 0x826e, &nv84_fifo_ofuncs_dma }, | 313 | { NV84_CHANNEL_DMA_CLASS, &nv84_fifo_ofuncs_dma }, |
314 | { 0x826f, &nv84_fifo_ofuncs_ind }, | 314 | { NV84_CHANNEL_IND_CLASS, &nv84_fifo_ofuncs_ind }, |
315 | {} | 315 | {} |
316 | }; | 316 | }; |
317 | 317 | ||
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c index d10dca237ca3..dda0a442453e 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c | |||
@@ -258,7 +258,7 @@ nvc0_fifo_ofuncs = { | |||
258 | 258 | ||
259 | static struct nouveau_oclass | 259 | static struct nouveau_oclass |
260 | nvc0_fifo_sclass[] = { | 260 | nvc0_fifo_sclass[] = { |
261 | { 0x906f, &nvc0_fifo_ofuncs }, | 261 | { NVC0_CHANNEL_IND_CLASS, &nvc0_fifo_ofuncs }, |
262 | {} | 262 | {} |
263 | }; | 263 | }; |
264 | 264 | ||
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c index 042afadbdf2e..f4803239c5f9 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c | |||
@@ -303,7 +303,7 @@ nve0_fifo_ofuncs = { | |||
303 | 303 | ||
304 | static struct nouveau_oclass | 304 | static struct nouveau_oclass |
305 | nve0_fifo_sclass[] = { | 305 | nve0_fifo_sclass[] = { |
306 | { 0xa06f, &nve0_fifo_ofuncs }, | 306 | { NVE0_CHANNEL_IND_CLASS, &nve0_fifo_ofuncs }, |
307 | {} | 307 | {} |
308 | }; | 308 | }; |
309 | 309 | ||
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, | |||
187 | u32 parent, u32 handle, u32 engine, | 187 | u32 parent, u32 handle, u32 engine, |
188 | struct nouveau_channel **pchan) | 188 | struct nouveau_channel **pchan) |
189 | { | 189 | { |
190 | static const u16 oclasses[] = { 0xa06f, 0x906f, 0x826f, 0x506f, 0 }; | 190 | static const u16 oclasses[] = { NVE0_CHANNEL_IND_CLASS, |
191 | NVC0_CHANNEL_IND_CLASS, | ||
192 | NV84_CHANNEL_IND_CLASS, | ||
193 | NV50_CHANNEL_IND_CLASS, | ||
194 | 0 }; | ||
191 | const u16 *oclass = oclasses; | 195 | const u16 *oclass = oclasses; |
192 | struct nve0_channel_ind_class args; | 196 | struct nve0_channel_ind_class args; |
193 | struct nouveau_channel *chan; | 197 | struct nouveau_channel *chan; |
@@ -221,7 +225,11 @@ static int | |||
221 | nouveau_channel_dma(struct nouveau_drm *drm, struct nouveau_cli *cli, | 225 | nouveau_channel_dma(struct nouveau_drm *drm, struct nouveau_cli *cli, |
222 | u32 parent, u32 handle, struct nouveau_channel **pchan) | 226 | u32 parent, u32 handle, struct nouveau_channel **pchan) |
223 | { | 227 | { |
224 | static const u16 oclasses[] = { 0x406e, 0x176e, 0x006e, 0x006b, 0 }; | 228 | static const u16 oclasses[] = { NV40_CHANNEL_DMA_CLASS, |
229 | NV17_CHANNEL_DMA_CLASS, | ||
230 | NV10_CHANNEL_DMA_CLASS, | ||
231 | NV03_CHANNEL_DMA_CLASS, | ||
232 | 0 }; | ||
225 | const u16 *oclass = oclasses; | 233 | const u16 *oclass = oclasses; |
226 | struct nv03_channel_dma_class args; | 234 | struct nv03_channel_dma_class args; |
227 | struct nouveau_channel *chan; | 235 | struct nouveau_channel *chan; |