* [PATCH] drm/i915: fix ppgtt dump code for DEBUG_FS=n
@ 2014-01-08 15:19 Daniel Vetter
2014-01-08 15:38 ` Chris Wilson
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2014-01-08 15:19 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter, Ben Widawsky
A regression in the topic/ppgtt branch introduce in
commit 87d60b63e0371529faaed0667d457e5022964010
Author: Ben Widawsky <ben@bwidawsk.net>
Date: Fri Dec 6 14:11:29 2013 -0800
drm/i915: Add PPGTT dumper
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reported-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/i915_drv.h | 2 ++
drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index aab400c04be0..730ff1e0ce63 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -678,7 +678,9 @@ struct i915_hw_ppgtt {
int (*switch_mm)(struct i915_hw_ppgtt *ppgtt,
struct intel_ring_buffer *ring,
bool synchronous);
+#if defined(CONFIG_DEBUG_FS)
void (*debug_dump)(struct i915_hw_ppgtt *ppgtt, struct seq_file *m);
+#endif
};
struct i915_ctx_hang_stats {
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 998f9a0b322a..0e55f9821bcc 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -460,6 +460,7 @@ err_out:
return ret;
}
+#if defined(CONFIG_DEBUG_FS)
static void gen6_dump_ppgtt(struct i915_hw_ppgtt *ppgtt, struct seq_file *m)
{
struct drm_i915_private *dev_priv = ppgtt->base.dev->dev_private;
@@ -515,6 +516,7 @@ static void gen6_dump_ppgtt(struct i915_hw_ppgtt *ppgtt, struct seq_file *m)
kunmap_atomic(pt_vaddr);
}
}
+#endif
static void gen6_write_pdes(struct i915_hw_ppgtt *ppgtt)
{
@@ -929,7 +931,9 @@ alloc:
ppgtt->base.clear_range(&ppgtt->base, 0,
ppgtt->num_pd_entries * I915_PPGTT_PT_ENTRIES, true);
+#if defined(CONFIG_DEBUG_FS)
ppgtt->debug_dump = gen6_dump_ppgtt;
+#endif
DRM_DEBUG_DRIVER("Allocated pde space (%ldM) at GTT entry: %lx\n",
ppgtt->node.size >> 20,
--
1.8.4.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: fix ppgtt dump code for DEBUG_FS=n
2014-01-08 15:19 [PATCH] drm/i915: fix ppgtt dump code for DEBUG_FS=n Daniel Vetter
@ 2014-01-08 15:38 ` Chris Wilson
2014-01-08 16:14 ` Daniel Vetter
0 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2014-01-08 15:38 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Intel Graphics Development, Ben Widawsky
On Wed, Jan 08, 2014 at 04:19:06PM +0100, Daniel Vetter wrote:
> A regression in the topic/ppgtt branch introduce in
>
> commit 87d60b63e0371529faaed0667d457e5022964010
> Author: Ben Widawsky <ben@bwidawsk.net>
> Date: Fri Dec 6 14:11:29 2013 -0800
>
> drm/i915: Add PPGTT dumper
I'm missing some context, what's the actual regression? Without debugfs
the code will not be called and it just wastes a small amount of kernel
memory, and seq_file should still be valid.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: fix ppgtt dump code for DEBUG_FS=n
2014-01-08 15:38 ` Chris Wilson
@ 2014-01-08 16:14 ` Daniel Vetter
2014-01-08 16:41 ` Chris Wilson
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2014-01-08 16:14 UTC (permalink / raw)
To: Chris Wilson, Daniel Vetter, Intel Graphics Development,
Ben Widawsky
On Wed, Jan 08, 2014 at 03:38:43PM +0000, Chris Wilson wrote:
> On Wed, Jan 08, 2014 at 04:19:06PM +0100, Daniel Vetter wrote:
> > A regression in the topic/ppgtt branch introduce in
> >
> > commit 87d60b63e0371529faaed0667d457e5022964010
> > Author: Ben Widawsky <ben@bwidawsk.net>
> > Date: Fri Dec 6 14:11:29 2013 -0800
> >
> > drm/i915: Add PPGTT dumper
>
> I'm missing some context, what's the actual regression? Without debugfs
> the code will not be called and it just wastes a small amount of kernel
> memory, and seq_file should still be valid.
We don't include the respective headers for seq_printf, so compilation
fails. Very sloppy commit message from my side, I'll amend when merging.
Not sure whether the #ifdef'ery is really worth it though ...
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: fix ppgtt dump code for DEBUG_FS=n
2014-01-08 16:14 ` Daniel Vetter
@ 2014-01-08 16:41 ` Chris Wilson
2014-01-08 20:27 ` Daniel Vetter
0 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2014-01-08 16:41 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, Ben Widawsky
On Wed, Jan 08, 2014 at 05:14:43PM +0100, Daniel Vetter wrote:
> On Wed, Jan 08, 2014 at 03:38:43PM +0000, Chris Wilson wrote:
> > On Wed, Jan 08, 2014 at 04:19:06PM +0100, Daniel Vetter wrote:
> > > A regression in the topic/ppgtt branch introduce in
> > >
> > > commit 87d60b63e0371529faaed0667d457e5022964010
> > > Author: Ben Widawsky <ben@bwidawsk.net>
> > > Date: Fri Dec 6 14:11:29 2013 -0800
> > >
> > > drm/i915: Add PPGTT dumper
> >
> > I'm missing some context, what's the actual regression? Without debugfs
> > the code will not be called and it just wastes a small amount of kernel
> > memory, and seq_file should still be valid.
>
> We don't include the respective headers for seq_printf, so compilation
> fails. Very sloppy commit message from my side, I'll amend when merging.
> Not sure whether the #ifdef'ery is really worth it though ...
I'd take an extra header include than ifdefs in the code any day.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] drm/i915: fix ppgtt dump code for DEBUG_FS=n
2014-01-08 16:41 ` Chris Wilson
@ 2014-01-08 20:27 ` Daniel Vetter
2014-01-09 23:40 ` Ben Widawsky
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2014-01-08 20:27 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter, Ben Widawsky
A regression in the topic/ppgtt branch introduce in
commit 87d60b63e0371529faaed0667d457e5022964010
Author: Ben Widawsky <ben@bwidawsk.net>
Date: Fri Dec 6 14:11:29 2013 -0800
drm/i915: Add PPGTT dumper
The issue is that we're missing the definitions for the seq_file
functions and hence compilation fails.
v2: Just include the right header instead of splattering #ifdefs all
over the place (Chris).
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reported-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/i915_gem_gtt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 998f9a0b322a..6e9e6219f093 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -22,6 +22,7 @@
*
*/
+#include <linux/seq_file.h>
#include <drm/drmP.h>
#include <drm/i915_drm.h>
#include "i915_drv.h"
--
1.8.4.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: fix ppgtt dump code for DEBUG_FS=n
2014-01-08 20:27 ` Daniel Vetter
@ 2014-01-09 23:40 ` Ben Widawsky
0 siblings, 0 replies; 6+ messages in thread
From: Ben Widawsky @ 2014-01-09 23:40 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Intel Graphics Development
On Wed, Jan 08, 2014 at 09:27:29PM +0100, Daniel Vetter wrote:
> A regression in the topic/ppgtt branch introduce in
>
> commit 87d60b63e0371529faaed0667d457e5022964010
> Author: Ben Widawsky <ben@bwidawsk.net>
> Date: Fri Dec 6 14:11:29 2013 -0800
>
> drm/i915: Add PPGTT dumper
>
> The issue is that we're missing the definitions for the seq_file
> functions and hence compilation fails.
>
> v2: Just include the right header instead of splattering #ifdefs all
> over the place (Chris).
>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Reported-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
> Cc: Ben Widawsky <ben@bwidawsk.net>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
> ---
> drivers/gpu/drm/i915/i915_gem_gtt.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 998f9a0b322a..6e9e6219f093 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -22,6 +22,7 @@
> *
> */
>
> +#include <linux/seq_file.h>
> #include <drm/drmP.h>
> #include <drm/i915_drm.h>
> #include "i915_drv.h"
> --
> 1.8.4.3
>
--
Ben Widawsky, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-01-09 23:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-08 15:19 [PATCH] drm/i915: fix ppgtt dump code for DEBUG_FS=n Daniel Vetter
2014-01-08 15:38 ` Chris Wilson
2014-01-08 16:14 ` Daniel Vetter
2014-01-08 16:41 ` Chris Wilson
2014-01-08 20:27 ` Daniel Vetter
2014-01-09 23:40 ` Ben Widawsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox