public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: remove the i915_batchbuffer_info debugfs file
@ 2011-11-29 23:17 Daniel Vetter
  2011-11-29 23:58 ` Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Daniel Vetter @ 2011-11-29 23:17 UTC (permalink / raw)
  To: intel-gfx; +Cc: Daniel Vetter

With the error_state facility in place, this has outlived it's
usefulness. It also oopses with the lates llc-reloc patches because
it directly access objects through the gtt without any checks.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/i915_debugfs.c |   40 -----------------------------------
 1 files changed, 0 insertions(+), 40 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 919f072..84c7295 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -562,45 +562,6 @@ static int i915_hws_info(struct seq_file *m, void *data)
 	return 0;
 }
 
-static void i915_dump_object(struct seq_file *m,
-			     struct io_mapping *mapping,
-			     struct drm_i915_gem_object *obj)
-{
-	int page, page_count, i;
-
-	page_count = obj->base.size / PAGE_SIZE;
-	for (page = 0; page < page_count; page++) {
-		u32 *mem = io_mapping_map_wc(mapping,
-					     obj->gtt_offset + page * PAGE_SIZE);
-		for (i = 0; i < PAGE_SIZE; i += 4)
-			seq_printf(m, "%08x :  %08x\n", i, mem[i / 4]);
-		io_mapping_unmap(mem);
-	}
-}
-
-static int i915_batchbuffer_info(struct seq_file *m, void *data)
-{
-	struct drm_info_node *node = (struct drm_info_node *) m->private;
-	struct drm_device *dev = node->minor->dev;
-	drm_i915_private_t *dev_priv = dev->dev_private;
-	struct drm_i915_gem_object *obj;
-	int ret;
-
-	ret = mutex_lock_interruptible(&dev->struct_mutex);
-	if (ret)
-		return ret;
-
-	list_for_each_entry(obj, &dev_priv->mm.active_list, mm_list) {
-		if (obj->base.read_domains & I915_GEM_DOMAIN_COMMAND) {
-		    seq_printf(m, "--- gtt_offset = 0x%08x\n", obj->gtt_offset);
-		    i915_dump_object(m, dev_priv->mm.gtt_mapping, obj);
-		}
-	}
-
-	mutex_unlock(&dev->struct_mutex);
-	return 0;
-}
-
 static int i915_ringbuffer_data(struct seq_file *m, void *data)
 {
 	struct drm_info_node *node = (struct drm_info_node *) m->private;
@@ -1823,7 +1784,6 @@ static struct drm_info_list i915_debugfs_list[] = {
 	{"i915_bsd_ringbuffer_info", i915_ringbuffer_info, 0, (void *)VCS},
 	{"i915_blt_ringbuffer_data", i915_ringbuffer_data, 0, (void *)BCS},
 	{"i915_blt_ringbuffer_info", i915_ringbuffer_info, 0, (void *)BCS},
-	{"i915_batchbuffers", i915_batchbuffer_info, 0},
 	{"i915_error_state", i915_error_state, 0},
 	{"i915_rstdby_delays", i915_rstdby_delays, 0},
 	{"i915_cur_delayinfo", i915_cur_delayinfo, 0},
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: remove the i915_batchbuffer_info debugfs file
  2011-11-29 23:17 [PATCH] drm/i915: remove the i915_batchbuffer_info debugfs file Daniel Vetter
@ 2011-11-29 23:58 ` Chris Wilson
  2011-11-30  0:15 ` Eugeni Dodonov
  2011-11-30  4:04 ` Ben Widawsky
  2 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2011-11-29 23:58 UTC (permalink / raw)
  To: intel-gfx; +Cc: Daniel Vetter

On Wed, 30 Nov 2011 00:17:45 +0100, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> With the error_state facility in place, this has outlived it's
> usefulness. It also oopses with the lates llc-reloc patches because
> it directly access objects through the gtt without any checks.

This code has been useless for some time.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: remove the i915_batchbuffer_info debugfs file
  2011-11-29 23:17 [PATCH] drm/i915: remove the i915_batchbuffer_info debugfs file Daniel Vetter
  2011-11-29 23:58 ` Chris Wilson
@ 2011-11-30  0:15 ` Eugeni Dodonov
  2011-11-30  4:04 ` Ben Widawsky
  2 siblings, 0 replies; 4+ messages in thread
From: Eugeni Dodonov @ 2011-11-30  0:15 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 502 bytes --]

On Tue, Nov 29, 2011 at 21:17, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:

> With the error_state facility in place, this has outlived it's
> usefulness. It also oopses with the lates llc-reloc patches because
> it directly access objects through the gtt without any checks.
>
> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>

Yep, I think that error_state does the job just fine now.

Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>

-- 
Eugeni Dodonov
<http://eugeni.dodonov.net/>

[-- Attachment #1.2: Type: text/html, Size: 928 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: remove the i915_batchbuffer_info debugfs file
  2011-11-29 23:17 [PATCH] drm/i915: remove the i915_batchbuffer_info debugfs file Daniel Vetter
  2011-11-29 23:58 ` Chris Wilson
  2011-11-30  0:15 ` Eugeni Dodonov
@ 2011-11-30  4:04 ` Ben Widawsky
  2 siblings, 0 replies; 4+ messages in thread
From: Ben Widawsky @ 2011-11-30  4:04 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

On Wed, Nov 30, 2011 at 12:17:45AM +0100, Daniel Vetter wrote:
> With the error_state facility in place, this has outlived it's
> usefulness. It also oopses with the lates llc-reloc patches because
> it directly access objects through the gtt without any checks.
> 
> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c |   40 -----------------------------------
>  1 files changed, 0 insertions(+), 40 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 919f072..84c7295 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -562,45 +562,6 @@ static int i915_hws_info(struct seq_file *m, void *data)
>  	return 0;
>  }
>  
> -static void i915_dump_object(struct seq_file *m,
> -			     struct io_mapping *mapping,
> -			     struct drm_i915_gem_object *obj)
> -{
> -	int page, page_count, i;
> -
> -	page_count = obj->base.size / PAGE_SIZE;
> -	for (page = 0; page < page_count; page++) {
> -		u32 *mem = io_mapping_map_wc(mapping,
> -					     obj->gtt_offset + page * PAGE_SIZE);
> -		for (i = 0; i < PAGE_SIZE; i += 4)
> -			seq_printf(m, "%08x :  %08x\n", i, mem[i / 4]);
> -		io_mapping_unmap(mem);
> -	}
> -}

For some time I've wanted to turn this into a generic bo dumping debugfs entry.
I'd be sorry to see it go, but we can always resurrect it later.

The rest I don't care about.

> -
> -static int i915_batchbuffer_info(struct seq_file *m, void *data)
> -{
> -	struct drm_info_node *node = (struct drm_info_node *) m->private;
> -	struct drm_device *dev = node->minor->dev;
> -	drm_i915_private_t *dev_priv = dev->dev_private;
> -	struct drm_i915_gem_object *obj;
> -	int ret;
> -
> -	ret = mutex_lock_interruptible(&dev->struct_mutex);
> -	if (ret)
> -		return ret;
> -
> -	list_for_each_entry(obj, &dev_priv->mm.active_list, mm_list) {
> -		if (obj->base.read_domains & I915_GEM_DOMAIN_COMMAND) {
> -		    seq_printf(m, "--- gtt_offset = 0x%08x\n", obj->gtt_offset);
> -		    i915_dump_object(m, dev_priv->mm.gtt_mapping, obj);
> -		}
> -	}
> -
> -	mutex_unlock(&dev->struct_mutex);
> -	return 0;
> -}
> -
>  static int i915_ringbuffer_data(struct seq_file *m, void *data)
>  {
>  	struct drm_info_node *node = (struct drm_info_node *) m->private;
> @@ -1823,7 +1784,6 @@ static struct drm_info_list i915_debugfs_list[] = {
>  	{"i915_bsd_ringbuffer_info", i915_ringbuffer_info, 0, (void *)VCS},
>  	{"i915_blt_ringbuffer_data", i915_ringbuffer_data, 0, (void *)BCS},
>  	{"i915_blt_ringbuffer_info", i915_ringbuffer_info, 0, (void *)BCS},
> -	{"i915_batchbuffers", i915_batchbuffer_info, 0},
>  	{"i915_error_state", i915_error_state, 0},
>  	{"i915_rstdby_delays", i915_rstdby_delays, 0},
>  	{"i915_cur_delayinfo", i915_cur_delayinfo, 0},
> -- 
> 1.7.6.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-30  4:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-29 23:17 [PATCH] drm/i915: remove the i915_batchbuffer_info debugfs file Daniel Vetter
2011-11-29 23:58 ` Chris Wilson
2011-11-30  0:15 ` Eugeni Dodonov
2011-11-30  4:04 ` Ben Widawsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox