diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-11 16:12:50 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-13 06:42:30 -0400 |
commit | 3535d9dd5a19c2f7b88caf67d650bdaa0750b06c (patch) | |
tree | 52127165bea695aaa053f4c7028e206364338b8d /drivers/gpu/drm/i915 | |
parent | 58fa3835874bc3466e84e3bba6057f43acd6eb18 (diff) |
drm/i915: dynamically set up blt ring functions and parameters
Just for consistency.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 683d1f0fcb33..5b11c53a8ee0 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -1350,26 +1350,6 @@ static int blt_ring_flush(struct intel_ring_buffer *ring, | |||
1350 | return 0; | 1350 | return 0; |
1351 | } | 1351 | } |
1352 | 1352 | ||
1353 | static const struct intel_ring_buffer gen6_blt_ring = { | ||
1354 | .name = "blt ring", | ||
1355 | .id = BCS, | ||
1356 | .mmio_base = BLT_RING_BASE, | ||
1357 | .init = init_ring_common, | ||
1358 | .write_tail = ring_write_tail, | ||
1359 | .flush = blt_ring_flush, | ||
1360 | .add_request = gen6_add_request, | ||
1361 | .get_seqno = gen6_ring_get_seqno, | ||
1362 | .irq_get = gen6_ring_get_irq, | ||
1363 | .irq_put = gen6_ring_put_irq, | ||
1364 | .irq_enable_mask = GEN6_BLITTER_USER_INTERRUPT, | ||
1365 | .dispatch_execbuffer = gen6_ring_dispatch_execbuffer, | ||
1366 | .sync_to = gen6_blt_ring_sync_to, | ||
1367 | .semaphore_register = {MI_SEMAPHORE_SYNC_BR, | ||
1368 | MI_SEMAPHORE_SYNC_BV, | ||
1369 | MI_SEMAPHORE_SYNC_INVALID}, | ||
1370 | .signal_mbox = {GEN6_RBSYNC, GEN6_VBSYNC}, | ||
1371 | }; | ||
1372 | |||
1373 | int intel_init_render_ring_buffer(struct drm_device *dev) | 1353 | int intel_init_render_ring_buffer(struct drm_device *dev) |
1374 | { | 1354 | { |
1375 | drm_i915_private_t *dev_priv = dev->dev_private; | 1355 | drm_i915_private_t *dev_priv = dev->dev_private; |
@@ -1534,7 +1514,25 @@ int intel_init_blt_ring_buffer(struct drm_device *dev) | |||
1534 | drm_i915_private_t *dev_priv = dev->dev_private; | 1514 | drm_i915_private_t *dev_priv = dev->dev_private; |
1535 | struct intel_ring_buffer *ring = &dev_priv->ring[BCS]; | 1515 | struct intel_ring_buffer *ring = &dev_priv->ring[BCS]; |
1536 | 1516 | ||
1537 | *ring = gen6_blt_ring; | 1517 | ring->name = "blitter ring"; |
1518 | ring->id = BCS; | ||
1519 | |||
1520 | ring->mmio_base = BLT_RING_BASE; | ||
1521 | ring->write_tail = ring_write_tail; | ||
1522 | ring->flush = blt_ring_flush; | ||
1523 | ring->add_request = gen6_add_request; | ||
1524 | ring->get_seqno = gen6_ring_get_seqno; | ||
1525 | ring->irq_enable_mask = GEN6_BLITTER_USER_INTERRUPT; | ||
1526 | ring->irq_get = gen6_ring_get_irq; | ||
1527 | ring->irq_put = gen6_ring_put_irq; | ||
1528 | ring->dispatch_execbuffer = gen6_ring_dispatch_execbuffer; | ||
1529 | ring->sync_to = gen6_blt_ring_sync_to; | ||
1530 | ring->semaphore_register[0] = MI_SEMAPHORE_SYNC_BR; | ||
1531 | ring->semaphore_register[1] = MI_SEMAPHORE_SYNC_BV; | ||
1532 | ring->semaphore_register[2] = MI_SEMAPHORE_SYNC_INVALID; | ||
1533 | ring->signal_mbox[0] = GEN6_RBSYNC; | ||
1534 | ring->signal_mbox[1] = GEN6_VBSYNC; | ||
1535 | ring->init = init_ring_common; | ||
1538 | 1536 | ||
1539 | return intel_init_ring_buffer(dev, ring); | 1537 | return intel_init_ring_buffer(dev, ring); |
1540 | } | 1538 | } |