diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-26 17:28:05 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-03 05:18:26 -0400 |
commit | 6d90c952cdd20158ec41a5c016c6fad73c9a8749 (patch) | |
tree | 21593af3ce72606e92b1bbb85d4eb453254f0e55 /drivers/gpu/drm/i915/intel_pm.c | |
parent | 64c43c332156261d72e50e929203de116b1129a7 (diff) |
drm/i915: remove LP_RING&friends from modeset code
The LP refers to 'low priority' as opposed to the high priority
ring on gen2/3. So lets constrain its use to the code of that era.
Unfortunately we can't yet completely remove the associated
macros from common headers and shove them into i915_dma.c to
the other dri1 legacy support code, a few cleanups are still
missing for that.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_pm.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index e66330cc0934..0a3699908fdf 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c | |||
@@ -2436,6 +2436,7 @@ static int ironlake_setup_rc6(struct drm_device *dev) | |||
2436 | void ironlake_enable_rc6(struct drm_device *dev) | 2436 | void ironlake_enable_rc6(struct drm_device *dev) |
2437 | { | 2437 | { |
2438 | struct drm_i915_private *dev_priv = dev->dev_private; | 2438 | struct drm_i915_private *dev_priv = dev->dev_private; |
2439 | struct intel_ring_buffer *ring = &dev_priv->ring[RCS]; | ||
2439 | int ret; | 2440 | int ret; |
2440 | 2441 | ||
2441 | /* rc6 disabled by default due to repeated reports of hanging during | 2442 | /* rc6 disabled by default due to repeated reports of hanging during |
@@ -2455,31 +2456,31 @@ void ironlake_enable_rc6(struct drm_device *dev) | |||
2455 | * GPU can automatically power down the render unit if given a page | 2456 | * GPU can automatically power down the render unit if given a page |
2456 | * to save state. | 2457 | * to save state. |
2457 | */ | 2458 | */ |
2458 | ret = BEGIN_LP_RING(6); | 2459 | ret = intel_ring_begin(ring, 6); |
2459 | if (ret) { | 2460 | if (ret) { |
2460 | ironlake_teardown_rc6(dev); | 2461 | ironlake_teardown_rc6(dev); |
2461 | mutex_unlock(&dev->struct_mutex); | 2462 | mutex_unlock(&dev->struct_mutex); |
2462 | return; | 2463 | return; |
2463 | } | 2464 | } |
2464 | 2465 | ||
2465 | OUT_RING(MI_SUSPEND_FLUSH | MI_SUSPEND_FLUSH_EN); | 2466 | intel_ring_emit(ring, MI_SUSPEND_FLUSH | MI_SUSPEND_FLUSH_EN); |
2466 | OUT_RING(MI_SET_CONTEXT); | 2467 | intel_ring_emit(ring, MI_SET_CONTEXT); |
2467 | OUT_RING(dev_priv->renderctx->gtt_offset | | 2468 | intel_ring_emit(ring, dev_priv->renderctx->gtt_offset | |
2468 | MI_MM_SPACE_GTT | | 2469 | MI_MM_SPACE_GTT | |
2469 | MI_SAVE_EXT_STATE_EN | | 2470 | MI_SAVE_EXT_STATE_EN | |
2470 | MI_RESTORE_EXT_STATE_EN | | 2471 | MI_RESTORE_EXT_STATE_EN | |
2471 | MI_RESTORE_INHIBIT); | 2472 | MI_RESTORE_INHIBIT); |
2472 | OUT_RING(MI_SUSPEND_FLUSH); | 2473 | intel_ring_emit(ring, MI_SUSPEND_FLUSH); |
2473 | OUT_RING(MI_NOOP); | 2474 | intel_ring_emit(ring, MI_NOOP); |
2474 | OUT_RING(MI_FLUSH); | 2475 | intel_ring_emit(ring, MI_FLUSH); |
2475 | ADVANCE_LP_RING(); | 2476 | intel_ring_advance(ring); |
2476 | 2477 | ||
2477 | /* | 2478 | /* |
2478 | * Wait for the command parser to advance past MI_SET_CONTEXT. The HW | 2479 | * Wait for the command parser to advance past MI_SET_CONTEXT. The HW |
2479 | * does an implicit flush, combined with MI_FLUSH above, it should be | 2480 | * does an implicit flush, combined with MI_FLUSH above, it should be |
2480 | * safe to assume that renderctx is valid | 2481 | * safe to assume that renderctx is valid |
2481 | */ | 2482 | */ |
2482 | ret = intel_wait_ring_idle(LP_RING(dev_priv)); | 2483 | ret = intel_wait_ring_idle(ring); |
2483 | if (ret) { | 2484 | if (ret) { |
2484 | DRM_ERROR("failed to enable ironlake power power savings\n"); | 2485 | DRM_ERROR("failed to enable ironlake power power savings\n"); |
2485 | ironlake_teardown_rc6(dev); | 2486 | ironlake_teardown_rc6(dev); |