summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2013-09-05 14:18:38 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-10-10 23:30:25 +0200
commite8295cdb43ad4b3522b12fa82ba7a6ed54f21c34 (patch)
treed57863d6650c9d92c80ef9b407e0744f6241c60b
parent79befddc2bbb22d72ba1d713c62771f8786ec178 (diff)
drm/i915: Use only the default context for ILK
The ILK renderctx predates the generic i915 context code. With the patches before this, I believe I have properly eased the transition to simply using the regular default context instead of the special renderctx. This untangles the weirdness from the last commit, and finishes the transition. The powerctx is still needed since that is a special ILK only thing. VLV has a similar funkiness, so we could probably try to join those two, but I see no point. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Tested-by: Chris Wilson <chris@chris-wilson.co.uk> # X still works!
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c6
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h2
-rw-r--r--drivers/gpu/drm/i915/i915_gem_context.c5
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c40
4 files changed, 0 insertions, 53 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 3c7a5e18669c..6d5b70414edc 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1463,12 +1463,6 @@ static int i915_context_status(struct seq_file *m, void *unused)
seq_putc(m, '\n');
}
- if (dev_priv->ips.renderctx.obj) {
- seq_puts(m, "render context ");
- describe_obj(m, dev_priv->ips.renderctx.obj);
- seq_putc(m, '\n');
- }
-
list_for_each_entry(ctx, &dev_priv->context_list, link) {
seq_puts(m, "HW context ");
describe_ctx(m, ctx);
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 7b0628a18140..0ca04bc0c075 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -894,7 +894,6 @@ struct intel_ilk_power_mgmt {
int r_t;
struct drm_i915_gem_object *pwrctx;
- struct i915_hw_context renderctx;
};
/* Power well structure for haswell */
@@ -2119,7 +2118,6 @@ int i915_gem_context_create_ioctl(struct drm_device *dev, void *data,
struct drm_file *file);
int i915_gem_context_destroy_ioctl(struct drm_device *dev, void *data,
struct drm_file *file);
-int ironlake_setup_rc6_hw_context(struct drm_i915_private *dev_priv);
/* i915_gem_gtt.c */
void i915_gem_cleanup_aliasing_ppgtt(struct drm_device *dev);
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index 7c9cf606c139..111e8da898e5 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -595,8 +595,3 @@ int i915_gem_context_destroy_ioctl(struct drm_device *dev, void *data,
DRM_DEBUG_DRIVER("HW context %d destroyed\n", args->ctx_id);
return 0;
}
-
-int ironlake_setup_rc6_hw_context(struct drm_i915_private *dev_priv)
-{
- return do_switch(&dev_priv->ips.renderctx);
-}
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index f1c4694a3941..061dce690aa9 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3987,12 +3987,6 @@ void ironlake_teardown_rc6(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
- if (dev_priv->ips.renderctx.obj) {
- i915_gem_object_unpin(dev_priv->ips.renderctx.obj);
- drm_gem_object_unreference(&dev_priv->ips.renderctx.obj->base);
- dev_priv->ips.renderctx.obj = NULL;
- }
-
if (dev_priv->ips.pwrctx) {
i915_gem_object_unpin(dev_priv->ips.pwrctx);
drm_gem_object_unreference(&dev_priv->ips.pwrctx->base);
@@ -4022,15 +4016,6 @@ static int ironlake_setup_rc6(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
- if (dev_priv->ips.renderctx.obj == NULL)
- dev_priv->ips.renderctx.obj = intel_alloc_context_page(dev);
- if (!dev_priv->ips.renderctx.obj)
- return -ENOMEM;
- else {
- dev_priv->ips.renderctx.id = DEFAULT_CONTEXT_ID;
- dev_priv->ips.renderctx.ring = &dev_priv->ring[RCS];
- }
-
if (dev_priv->ips.pwrctx == NULL)
dev_priv->ips.pwrctx = intel_alloc_context_page(dev);
if (!dev_priv->ips.pwrctx) {
@@ -4044,8 +4029,6 @@ static int ironlake_setup_rc6(struct drm_device *dev)
static void ironlake_enable_rc6(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
- struct intel_ring_buffer *ring = &dev_priv->ring[RCS];
- bool was_interruptible;
int ret;
/* rc6 disabled by default due to repeated reports of hanging during
@@ -4060,29 +4043,6 @@ static void ironlake_enable_rc6(struct drm_device *dev)
if (ret)
return;
- was_interruptible = dev_priv->mm.interruptible;
- dev_priv->mm.interruptible = false;
-
- ret = ironlake_setup_rc6_hw_context(dev_priv);
- if (ret) {
- ironlake_teardown_rc6(dev);
- dev_priv->mm.interruptible = was_interruptible;
- return;
- }
-
- /*
- * Wait for the command parser to advance past MI_SET_CONTEXT. The HW
- * does an implicit flush, combined with MI_FLUSH above, it should be
- * safe to assume that renderctx is valid
- */
- ret = intel_ring_idle(ring);
- dev_priv->mm.interruptible = was_interruptible;
- if (ret) {
- DRM_ERROR("failed to enable ironlake power savings\n");
- ironlake_teardown_rc6(dev);
- return;
- }
-
I915_WRITE(PWRCTXA, i915_gem_obj_ggtt_offset(dev_priv->ips.pwrctx) | PWRCTX_EN);
I915_WRITE(RSTDBYCTL, I915_READ(RSTDBYCTL) & ~RCX_SW_EXIT);
}