All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 17/26] drm/i915: Remove debugfs/i915_ppgtt_info
Date: Tue, 11 Sep 2018 12:58:01 +0100	[thread overview]
Message-ID: <20180911115810.8917-17-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20180911115810.8917-1-chris@chris-wilson.co.uk>

The information presented here is not relevant to current development.
We can either use the context information, but more often we want to
inspect the active gpu state.

The ulterior motive is to eradicate dev->filelist.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 119 ----------------------------
 1 file changed, 119 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 6b5cc30f3e09..39f319c49def 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2035,124 +2035,6 @@ static int i915_swizzle_info(struct seq_file *m, void *data)
 	return 0;
 }
 
-static int per_file_ctx(int id, void *ptr, void *data)
-{
-	struct i915_gem_context *ctx = ptr;
-	struct seq_file *m = data;
-	struct i915_hw_ppgtt *ppgtt = ctx->ppgtt;
-
-	if (!ppgtt) {
-		seq_printf(m, "  no ppgtt for context %d\n",
-			   ctx->user_handle);
-		return 0;
-	}
-
-	if (i915_gem_context_is_default(ctx))
-		seq_puts(m, "  default context:\n");
-	else
-		seq_printf(m, "  context %d:\n", ctx->user_handle);
-	ppgtt->debug_dump(ppgtt, m);
-
-	return 0;
-}
-
-static void gen8_ppgtt_info(struct seq_file *m,
-			    struct drm_i915_private *dev_priv)
-{
-	struct i915_hw_ppgtt *ppgtt = dev_priv->mm.aliasing_ppgtt;
-	struct intel_engine_cs *engine;
-	enum intel_engine_id id;
-	int i;
-
-	if (!ppgtt)
-		return;
-
-	for_each_engine(engine, dev_priv, id) {
-		seq_printf(m, "%s\n", engine->name);
-		for (i = 0; i < 4; i++) {
-			u64 pdp = I915_READ(GEN8_RING_PDP_UDW(engine, i));
-			pdp <<= 32;
-			pdp |= I915_READ(GEN8_RING_PDP_LDW(engine, i));
-			seq_printf(m, "\tPDP%d 0x%016llx\n", i, pdp);
-		}
-	}
-}
-
-static void gen6_ppgtt_info(struct seq_file *m,
-			    struct drm_i915_private *dev_priv)
-{
-	struct intel_engine_cs *engine;
-	enum intel_engine_id id;
-
-	if (IS_GEN6(dev_priv))
-		seq_printf(m, "GFX_MODE: 0x%08x\n", I915_READ(GFX_MODE));
-
-	for_each_engine(engine, dev_priv, id) {
-		seq_printf(m, "%s\n", engine->name);
-		if (IS_GEN7(dev_priv))
-			seq_printf(m, "GFX_MODE: 0x%08x\n",
-				   I915_READ(RING_MODE_GEN7(engine)));
-		seq_printf(m, "PP_DIR_BASE: 0x%08x\n",
-			   I915_READ(RING_PP_DIR_BASE(engine)));
-		seq_printf(m, "PP_DIR_BASE_READ: 0x%08x\n",
-			   I915_READ(RING_PP_DIR_BASE_READ(engine)));
-		seq_printf(m, "PP_DIR_DCLV: 0x%08x\n",
-			   I915_READ(RING_PP_DIR_DCLV(engine)));
-	}
-	if (dev_priv->mm.aliasing_ppgtt) {
-		struct i915_hw_ppgtt *ppgtt = dev_priv->mm.aliasing_ppgtt;
-
-		seq_puts(m, "aliasing PPGTT:\n");
-		seq_printf(m, "pd gtt offset: 0x%08x\n", ppgtt->pd.base.ggtt_offset);
-
-		ppgtt->debug_dump(ppgtt, m);
-	}
-
-	seq_printf(m, "ECOCHK: 0x%08x\n", I915_READ(GAM_ECOCHK));
-}
-
-static int i915_ppgtt_info(struct seq_file *m, void *data)
-{
-	struct drm_i915_private *dev_priv = node_to_i915(m->private);
-	struct drm_device *dev = &dev_priv->drm;
-	struct drm_file *file;
-	int ret;
-
-	mutex_lock(&dev->filelist_mutex);
-	ret = mutex_lock_interruptible(&dev->struct_mutex);
-	if (ret)
-		goto out_unlock;
-
-	intel_runtime_pm_get(dev_priv);
-
-	if (INTEL_GEN(dev_priv) >= 8)
-		gen8_ppgtt_info(m, dev_priv);
-	else if (INTEL_GEN(dev_priv) >= 6)
-		gen6_ppgtt_info(m, dev_priv);
-
-	list_for_each_entry_reverse(file, &dev->filelist, lhead) {
-		struct drm_i915_file_private *file_priv = file->driver_priv;
-		struct task_struct *task;
-
-		task = get_pid_task(file->pid, PIDTYPE_PID);
-		if (!task) {
-			ret = -ESRCH;
-			goto out_rpm;
-		}
-		seq_printf(m, "\nproc: %s\n", task->comm);
-		put_task_struct(task);
-		idr_for_each(&file_priv->context_idr, per_file_ctx,
-			     (void *)(unsigned long)m);
-	}
-
-out_rpm:
-	intel_runtime_pm_put(dev_priv);
-	mutex_unlock(&dev->struct_mutex);
-out_unlock:
-	mutex_unlock(&dev->filelist_mutex);
-	return ret;
-}
-
 static int count_irq_waiters(struct drm_i915_private *i915)
 {
 	struct intel_engine_cs *engine;
@@ -4741,7 +4623,6 @@ static const struct drm_info_list i915_debugfs_list[] = {
 	{"i915_context_status", i915_context_status, 0},
 	{"i915_forcewake_domains", i915_forcewake_domains, 0},
 	{"i915_swizzle_info", i915_swizzle_info, 0},
-	{"i915_ppgtt_info", i915_ppgtt_info, 0},
 	{"i915_llc", i915_llc, 0},
 	{"i915_edp_psr_status", i915_edp_psr_status, 0},
 	{"i915_energy_uJ", i915_energy_uJ, 0},
-- 
2.19.0.rc2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-09-11 12:00 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11 11:57 [PATCH 01/26] drm/i915/ringbuffer: Reload PDs harder on byt/bcs Chris Wilson
2018-09-11 11:57 ` [PATCH 02/26] drm/i915: Reorder execobject[] to insert non-48b objects into the low 4G Chris Wilson
2018-09-12  9:49   ` Joonas Lahtinen
2018-09-11 11:57 ` [PATCH 03/26] drm/i915: Limit number of capture objects Chris Wilson
2018-09-11 11:57 ` [PATCH 04/26] drm/i915: Handle incomplete Z_FINISH for compressed error states Chris Wilson
2018-09-11 11:57 ` [PATCH 05/26] drm/i915: Clear the error PTE just once on finish Chris Wilson
2018-09-11 11:57 ` [PATCH 06/26] drm/i915: Cache the error string Chris Wilson
2018-09-11 11:57 ` [PATCH 07/26] drm/i915/overlay: Allocate physical registers from stolen Chris Wilson
2018-09-11 11:57 ` [PATCH 08/26] drm/i915/overlay: Use the ioctl parameters directly Chris Wilson
2018-09-11 11:57 ` [PATCH 09/26] drm/i915/execlists: Reset CSB pointers on canceling requests (wedging) Chris Wilson
2018-09-11 11:57 ` [PATCH 10/26] drm/i915/execlists: Avoid kicking priority on the current context Chris Wilson
2018-09-11 11:57 ` [PATCH 11/26] drm/i915/selftests: Basic stress test for rapid context switching Chris Wilson
2018-09-11 11:57 ` [PATCH 12/26] drm/i915/execlists: Delay updating ring register state after resume Chris Wilson
2018-09-11 11:57 ` [PATCH 13/26] drm/i915/execlists: Use coherent writes into the context image Chris Wilson
2018-09-11 11:57 ` [PATCH 14/26] drm/i915/execlists: Onion unwind for logical_ring_init() failure Chris Wilson
2018-09-11 11:57 ` [PATCH 15/26] drm/i915/execlists: Assert the queue is non-empty on unsubmitting Chris Wilson
2018-09-11 11:58 ` [PATCH 16/26] drm/i915: Report the number of closed vma held by each context in debugfs Chris Wilson
2018-09-11 11:58 ` Chris Wilson [this message]
2018-09-11 11:58 ` [PATCH 18/26] drm/i915: Track all held rpm wakerefs Chris Wilson
2018-09-11 11:58 ` [PATCH 19/26] drm/i915: Markup paired operations on wakerefs Chris Wilson
2018-09-11 11:58 ` [PATCH 20/26] drm/i915: Syntatic sugar for using intel_runtime_pm Chris Wilson
2018-09-11 11:58 ` [PATCH 21/26] drm/i915: Markup paired operations on display power domains Chris Wilson
2018-09-11 11:58 ` [PATCH 22/26] drm/i915: Track the wakeref used to initialise " Chris Wilson
2018-09-11 11:58 ` [PATCH 23/26] drm/i915/dp: Markup pps lock power well Chris Wilson
2018-09-11 11:58 ` [PATCH 24/26] drm/i915: Complain if hsw_get_pipe_config acquires the same power well twice Chris Wilson
2018-09-11 11:58 ` [PATCH 25/26] drm/i915: Mark up Ironlake ips with rpm wakerefs Chris Wilson
2018-09-11 11:58 ` [PATCH 26/26] drm/i915: Serialise concurrent calls to i915_gem_set_wedged() Chris Wilson
2018-09-11 13:50 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/26] drm/i915/ringbuffer: Reload PDs harder on byt/bcs Patchwork
2018-09-11 13:57 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-09-11 14:06 ` ✓ Fi.CI.BAT: success " Patchwork
2018-09-11 14:56 ` ✓ Fi.CI.IGT: " Patchwork
2018-09-12  9:44 ` [PATCH 01/26] " Joonas Lahtinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180911115810.8917-17-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.