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 09/23] drm/i915: Remove debugfs/i915_ppgtt_info
Date: Tue,  4 Sep 2018 22:57:28 +0100	[thread overview]
Message-ID: <20180904215742.20276-9-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20180904215742.20276-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 03637da325ab..245d714b2bba 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2037,124 +2037,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;
@@ -4743,7 +4625,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.rc1

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

  parent reply	other threads:[~2018-09-04 21:59 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-04 21:57 [PATCH 01/23] drm/i915: Reduce context HW ID lifetime Chris Wilson
2018-09-04 21:57 ` [PATCH 02/23] drm/i915/execlists: Avoid kicking priority on the current context Chris Wilson
2018-09-04 21:57 ` [PATCH 03/23] drm/i915: Missed interrupt simulation is no more, tell the world Chris Wilson
2018-09-04 21:57 ` [PATCH 04/23] drm/i915/selftests: Basic stress test for rapid context switching Chris Wilson
2018-09-04 21:57 ` [PATCH 05/23] drm/i915/execlists: Delay updating ring register state after resume Chris Wilson
2018-09-04 21:57 ` [PATCH 06/23] drm/i915/execlists: Use coherent writes into the context image Chris Wilson
2018-09-04 21:57 ` [PATCH 07/23] drm/i915/execlists: Onion unwind for logical_ring_init() failure Chris Wilson
2018-09-04 21:57 ` [PATCH 08/23] drm/i915: Report the number of closed vma held by each context in debugfs Chris Wilson
2018-09-04 21:57 ` Chris Wilson [this message]
2018-09-04 21:57 ` [PATCH 10/23] drm/i915/execlists: Assert the queue is non-empty on unsubmitting Chris Wilson
2018-09-04 21:57 ` [PATCH 11/23] drm/i915: Handle incomplete Z_FINISH for compressed error states Chris Wilson
2018-09-04 21:57 ` [PATCH 12/23] drm/i915: Clear the error PTE just once on finish Chris Wilson
2018-09-04 21:57 ` [PATCH 13/23] drm/i915: Cache the error string Chris Wilson
2018-09-04 21:57 ` [PATCH 14/23] drm/i915: Attach the pci match data to the device upon creation Chris Wilson
2018-09-05 13:36   ` Michal Wajdeczko
2018-09-05 13:58     ` Chris Wilson
2018-09-04 21:57 ` [PATCH 15/23] drm/i915: Track all held rpm wakerefs Chris Wilson
2018-09-04 21:57 ` [PATCH 16/23] drm/i915: Markup paired operations on wakerefs Chris Wilson
2018-09-04 21:57 ` [PATCH 17/23] drm/i915: Syntatic sugar for using intel_runtime_pm Chris Wilson
2018-09-04 21:57 ` [PATCH 18/23] drm/i915: Markup paired operations on display power domains Chris Wilson
2018-09-04 21:57 ` [PATCH 19/23] drm/i915: Track the wakeref used to initialise " Chris Wilson
2018-09-04 21:57 ` [PATCH 20/23] drm/i915/dp: Markup pps lock power well Chris Wilson
2018-09-04 21:57 ` [PATCH 21/23] drm/i915: Complain if hsw_get_pipe_config acquires the same power well twice Chris Wilson
2018-09-04 21:57 ` [PATCH 22/23] drm/i915: Mark up Ironlake ips with rpm wakerefs Chris Wilson
2018-09-04 21:57 ` [PATCH 23/23] drm/i915: Serialise concurrent calls to i915_gem_set_wedged() Chris Wilson
2018-09-04 22:10 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/23] drm/i915: Reduce context HW ID lifetime Patchwork
2018-09-04 22:17 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-09-04 22:30 ` ✓ Fi.CI.BAT: success " Patchwork
2018-09-05  5:42 ` ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2018-08-16 21:07 [PATCH 01/23] drm/i915: Cache the error string Chris Wilson
2018-08-16 21:07 ` [PATCH 09/23] drm/i915: Remove debugfs/i915_ppgtt_info Chris Wilson

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=20180904215742.20276-9-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.