diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-03-30 23:44:16 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-05-15 20:47:52 -0400 |
commit | 4ea52f8974392b39ffb192fd31de80dc65b52657 (patch) | |
tree | 594e2a1cc6649768ee23bcb9958b091f8c0ea0c3 /drivers/gpu/drm/nouveau/nouveau_state.c | |
parent | 475feffabe7d42d3333bf9a17167f38f3c467d11 (diff) |
drm/nouveau: move engine object creation into per-engine hooks
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_state.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_state.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index 4b4992824bb..fa81b9017b3 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c | |||
@@ -73,6 +73,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
73 | engine->graph.destroy_context = nv04_graph_destroy_context; | 73 | engine->graph.destroy_context = nv04_graph_destroy_context; |
74 | engine->graph.load_context = nv04_graph_load_context; | 74 | engine->graph.load_context = nv04_graph_load_context; |
75 | engine->graph.unload_context = nv04_graph_unload_context; | 75 | engine->graph.unload_context = nv04_graph_unload_context; |
76 | engine->graph.object_new = nv04_graph_object_new; | ||
76 | engine->fifo.channels = 16; | 77 | engine->fifo.channels = 16; |
77 | engine->fifo.init = nv04_fifo_init; | 78 | engine->fifo.init = nv04_fifo_init; |
78 | engine->fifo.takedown = nv04_fifo_fini; | 79 | engine->fifo.takedown = nv04_fifo_fini; |
@@ -131,6 +132,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
131 | engine->graph.fifo_access = nv04_graph_fifo_access; | 132 | engine->graph.fifo_access = nv04_graph_fifo_access; |
132 | engine->graph.load_context = nv10_graph_load_context; | 133 | engine->graph.load_context = nv10_graph_load_context; |
133 | engine->graph.unload_context = nv10_graph_unload_context; | 134 | engine->graph.unload_context = nv10_graph_unload_context; |
135 | engine->graph.object_new = nv04_graph_object_new; | ||
134 | engine->graph.set_tile_region = nv10_graph_set_tile_region; | 136 | engine->graph.set_tile_region = nv10_graph_set_tile_region; |
135 | engine->fifo.channels = 32; | 137 | engine->fifo.channels = 32; |
136 | engine->fifo.init = nv10_fifo_init; | 138 | engine->fifo.init = nv10_fifo_init; |
@@ -190,6 +192,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
190 | engine->graph.fifo_access = nv04_graph_fifo_access; | 192 | engine->graph.fifo_access = nv04_graph_fifo_access; |
191 | engine->graph.load_context = nv20_graph_load_context; | 193 | engine->graph.load_context = nv20_graph_load_context; |
192 | engine->graph.unload_context = nv20_graph_unload_context; | 194 | engine->graph.unload_context = nv20_graph_unload_context; |
195 | engine->graph.object_new = nv04_graph_object_new; | ||
193 | engine->graph.set_tile_region = nv20_graph_set_tile_region; | 196 | engine->graph.set_tile_region = nv20_graph_set_tile_region; |
194 | engine->fifo.channels = 32; | 197 | engine->fifo.channels = 32; |
195 | engine->fifo.init = nv10_fifo_init; | 198 | engine->fifo.init = nv10_fifo_init; |
@@ -249,6 +252,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
249 | engine->graph.destroy_context = nv20_graph_destroy_context; | 252 | engine->graph.destroy_context = nv20_graph_destroy_context; |
250 | engine->graph.load_context = nv20_graph_load_context; | 253 | engine->graph.load_context = nv20_graph_load_context; |
251 | engine->graph.unload_context = nv20_graph_unload_context; | 254 | engine->graph.unload_context = nv20_graph_unload_context; |
255 | engine->graph.object_new = nv04_graph_object_new; | ||
252 | engine->graph.set_tile_region = nv20_graph_set_tile_region; | 256 | engine->graph.set_tile_region = nv20_graph_set_tile_region; |
253 | engine->fifo.channels = 32; | 257 | engine->fifo.channels = 32; |
254 | engine->fifo.init = nv10_fifo_init; | 258 | engine->fifo.init = nv10_fifo_init; |
@@ -311,6 +315,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
311 | engine->graph.destroy_context = nv40_graph_destroy_context; | 315 | engine->graph.destroy_context = nv40_graph_destroy_context; |
312 | engine->graph.load_context = nv40_graph_load_context; | 316 | engine->graph.load_context = nv40_graph_load_context; |
313 | engine->graph.unload_context = nv40_graph_unload_context; | 317 | engine->graph.unload_context = nv40_graph_unload_context; |
318 | engine->graph.object_new = nv40_graph_object_new; | ||
314 | engine->graph.set_tile_region = nv40_graph_set_tile_region; | 319 | engine->graph.set_tile_region = nv40_graph_set_tile_region; |
315 | engine->fifo.channels = 32; | 320 | engine->fifo.channels = 32; |
316 | engine->fifo.init = nv40_fifo_init; | 321 | engine->fifo.init = nv40_fifo_init; |
@@ -376,6 +381,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
376 | engine->graph.destroy_context = nv50_graph_destroy_context; | 381 | engine->graph.destroy_context = nv50_graph_destroy_context; |
377 | engine->graph.load_context = nv50_graph_load_context; | 382 | engine->graph.load_context = nv50_graph_load_context; |
378 | engine->graph.unload_context = nv50_graph_unload_context; | 383 | engine->graph.unload_context = nv50_graph_unload_context; |
384 | engine->graph.object_new = nv50_graph_object_new; | ||
379 | if (dev_priv->chipset == 0x50 || | 385 | if (dev_priv->chipset == 0x50 || |
380 | dev_priv->chipset == 0xac) | 386 | dev_priv->chipset == 0xac) |
381 | engine->graph.tlb_flush = nv50_graph_tlb_flush; | 387 | engine->graph.tlb_flush = nv50_graph_tlb_flush; |
@@ -443,6 +449,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
443 | engine->crypt.takedown = nv84_crypt_fini; | 449 | engine->crypt.takedown = nv84_crypt_fini; |
444 | engine->crypt.create_context = nv84_crypt_create_context; | 450 | engine->crypt.create_context = nv84_crypt_create_context; |
445 | engine->crypt.destroy_context = nv84_crypt_destroy_context; | 451 | engine->crypt.destroy_context = nv84_crypt_destroy_context; |
452 | engine->crypt.object_new = nv84_crypt_object_new; | ||
446 | engine->crypt.tlb_flush = nv84_crypt_tlb_flush; | 453 | engine->crypt.tlb_flush = nv84_crypt_tlb_flush; |
447 | break; | 454 | break; |
448 | default: | 455 | default: |
@@ -480,6 +487,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
480 | engine->graph.destroy_context = nvc0_graph_destroy_context; | 487 | engine->graph.destroy_context = nvc0_graph_destroy_context; |
481 | engine->graph.load_context = nvc0_graph_load_context; | 488 | engine->graph.load_context = nvc0_graph_load_context; |
482 | engine->graph.unload_context = nvc0_graph_unload_context; | 489 | engine->graph.unload_context = nvc0_graph_unload_context; |
490 | engine->graph.object_new = nvc0_graph_object_new; | ||
483 | engine->fifo.channels = 128; | 491 | engine->fifo.channels = 128; |
484 | engine->fifo.init = nvc0_fifo_init; | 492 | engine->fifo.init = nvc0_fifo_init; |
485 | engine->fifo.takedown = nvc0_fifo_takedown; | 493 | engine->fifo.takedown = nvc0_fifo_takedown; |