aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_debugfs.c
diff options
context:
space:
mode:
authorBen Widawsky <benjamin.widawsky@intel.com>2013-09-18 22:03:18 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-09-19 14:39:56 -0400
commit3ccfd19dea7c5c85aa4b1f929a97a02b026ab356 (patch)
tree35244a599b81e7887a6211b8a5afca2f2eb98ce1 /drivers/gpu/drm/i915/i915_debugfs.c
parenta33afea5ff6e5b87ac11c87fb60b3704b3ac0fcc (diff)
drm/i915: Do remaps for all contexts
On both Ivybridge and Haswell, row remapping information is saved and restored with context. This means, we never actually properly supported the l3 remapping because our sysfs interface is asynchronous (and not tied to any context), and the known faulty HW would be reused by the next context to run. Not that due to the asynchronous nature of the sysfs entry, there is no point modifying the registers for the existing context. Instead we set a flag for all contexts to load the correct remapping information on the next run. Interested clients can use debugfs to determine whether or not the row has been remapped. One could propose at this point that we just do the remapping in the kernel. I guess since we have to maintain the sysfs interface anyway, I'm not sure how useful it is, and I do like keeping the policy in userspace; (it wasn't my original decision to make the interface the way it is, so I'm not attached). v2: Force a context switch when we have a remap on the next switch. (Ville) Don't let userspace use the interface with disabled contexts. v3: Don't force a context switch, just let it nop Improper context slice remap initialization, 1<<1 instead of 1<<i, but I rewrote it to avoid a second round of confusion. Error print moved to error path (All Ville) Added a comment on why the slice remap initialization happens. CC: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_debugfs.c')
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index ada095023dad..80bed69fe5b7 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -145,6 +145,13 @@ describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
145 seq_printf(m, " (%s)", obj->ring->name); 145 seq_printf(m, " (%s)", obj->ring->name);
146} 146}
147 147
148static void describe_ctx(struct seq_file *m, struct i915_hw_context *ctx)
149{
150 seq_putc(m, ctx->is_initialized ? 'I' : 'i');
151 seq_putc(m, ctx->remap_slice ? 'R' : 'r');
152 seq_putc(m, ' ');
153}
154
148static int i915_gem_object_list_info(struct seq_file *m, void *data) 155static int i915_gem_object_list_info(struct seq_file *m, void *data)
149{ 156{
150 struct drm_info_node *node = (struct drm_info_node *) m->private; 157 struct drm_info_node *node = (struct drm_info_node *) m->private;
@@ -1463,6 +1470,7 @@ static int i915_context_status(struct seq_file *m, void *unused)
1463 1470
1464 list_for_each_entry(ctx, &dev_priv->context_list, link) { 1471 list_for_each_entry(ctx, &dev_priv->context_list, link) {
1465 seq_puts(m, "HW context "); 1472 seq_puts(m, "HW context ");
1473 describe_ctx(m, ctx);
1466 for_each_ring(ring, dev_priv, i) 1474 for_each_ring(ring, dev_priv, i)
1467 if (ring->default_context == ctx) 1475 if (ring->default_context == ctx)
1468 seq_printf(m, "(default context %s) ", ring->name); 1476 seq_printf(m, "(default context %s) ", ring->name);