Lines 6597-6602
static int ironlake_setup_rc6(struct drm_device *dev)
Link Here
|
6597 |
return 0; |
6597 |
return 0; |
6598 |
} |
6598 |
} |
6599 |
|
6599 |
|
|
|
6600 |
#define ILK_RC_PIPECTL_ITERATIONS 1 |
6601 |
#define ILK_RC_FLUSH_DWORDS (4 * ILK_RC_PIPECTL_ITERATIONS) |
6602 |
|
6603 |
/* |
6604 |
* Jesse said I needed to do this multiple times. According to the comments in |
6605 |
* intel_ringbuffer.c, it's only needed for PIPE_NOTIFY. Since we're not using |
6606 |
* PIPE_NOTIFY anyway, I think we're safe only doing it once. |
6607 |
*/ |
6608 |
static void ironlake_rendercache_flush(struct drm_i915_private *dev_priv) |
6609 |
{ |
6610 |
for (i = 0; i < ILK_RC_PIPECTL_ITERATIONS; i++) { |
6611 |
OUT_RING(GFX_OP_PIPE_CONTROL | PIPE_CONTROL_NO_WRITE | |
6612 |
PIPE_CONTROL_WC_FLUSH); |
6613 |
OUT_RING(0); |
6614 |
OUT_RING(0); |
6615 |
OUT_RING(0); |
6616 |
} |
6617 |
} |
6618 |
|
6600 |
void ironlake_enable_rc6(struct drm_device *dev) |
6619 |
void ironlake_enable_rc6(struct drm_device *dev) |
6601 |
{ |
6620 |
{ |
6602 |
struct drm_i915_private *dev_priv = dev->dev_private; |
6621 |
struct drm_i915_private *dev_priv = dev->dev_private; |
Lines 6616-6622
void ironlake_enable_rc6(struct drm_device *dev)
Link Here
|
6616 |
* GPU can automatically power down the render unit if given a page |
6635 |
* GPU can automatically power down the render unit if given a page |
6617 |
* to save state. |
6636 |
* to save state. |
6618 |
*/ |
6637 |
*/ |
6619 |
ret = BEGIN_LP_RING(6); |
6638 |
ret = BEGIN_LP_RING(10 + ILK_RC_FLUSH_DWORDS); |
6620 |
if (ret) { |
6639 |
if (ret) { |
6621 |
ironlake_teardown_rc6(dev); |
6640 |
ironlake_teardown_rc6(dev); |
6622 |
return; |
6641 |
return; |
Lines 6632-6641
void ironlake_enable_rc6(struct drm_device *dev)
Link Here
|
6632 |
OUT_RING(MI_SUSPEND_FLUSH); |
6651 |
OUT_RING(MI_SUSPEND_FLUSH); |
6633 |
OUT_RING(MI_NOOP); |
6652 |
OUT_RING(MI_NOOP); |
6634 |
OUT_RING(MI_FLUSH); |
6653 |
OUT_RING(MI_FLUSH); |
|
|
6654 |
ironlake_rendercache_flush(dev_priv); |
6655 |
OUT_RING(MI_LOAD_REGISTER_IMM(1)); |
6656 |
OUT_RING(PWRCTXA); |
6657 |
OUT_RING(dev_priv->pwrctx->gtt_offset | PWRCTX_EN); |
6658 |
OUT_RING(MI_LOAD_REGISTER_IMM(1)); |
6659 |
OUT_RING(RSTDBYCTL); |
6660 |
OUT_RING(I915_READ(RSTDBYCTL) & ~RCX_SW_EXIT); |
6635 |
ADVANCE_LP_RING(); |
6661 |
ADVANCE_LP_RING(); |
6636 |
|
|
|
6637 |
I915_WRITE(PWRCTXA, dev_priv->pwrctx->gtt_offset | PWRCTX_EN); |
6638 |
I915_WRITE(RSTDBYCTL, I915_READ(RSTDBYCTL) & ~RCX_SW_EXIT); |
6639 |
} |
6662 |
} |
6640 |
|
6663 |
|
6641 |
|
6664 |
|
6642 |
- |
|
|