All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: Add stackdepot include for DRM_DEBUG_MM
@ 2016-11-08 11:56 Chris Wilson
  2016-11-08 12:45 ` Christian König
  2016-11-08 12:46 ` Daniel Vetter
  0 siblings, 2 replies; 6+ messages in thread
From: Chris Wilson @ 2016-11-08 11:56 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter

0day found that stackdepot.h doesn't get automatically included on all
architectures, so remember to add our #include.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Fixes: 5705670d0463 ("drm: Track drm_mm allocators and show leaks on shutdown")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_mm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 89b891a4847f..632473beb40c 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -105,6 +105,8 @@ static struct drm_mm_node *drm_mm_search_free_in_range_generic(const struct drm_
 						enum drm_mm_search_flags flags);
 
 #ifdef CONFIG_DRM_DEBUG_MM
+#include <linux/stackdepot.h>
+
 #define STACKDEPTH 32
 #define BUFSZ 4096
 
-- 
2.10.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm: Add stackdepot include for DRM_DEBUG_MM
  2016-11-08 11:56 [PATCH] drm: Add stackdepot include for DRM_DEBUG_MM Chris Wilson
@ 2016-11-08 12:45 ` Christian König
  2016-11-08 12:46 ` Daniel Vetter
  1 sibling, 0 replies; 6+ messages in thread
From: Christian König @ 2016-11-08 12:45 UTC (permalink / raw)
  To: Chris Wilson, dri-devel; +Cc: Daniel Vetter

Am 08.11.2016 um 12:56 schrieb Chris Wilson:
> 0day found that stackdepot.h doesn't get automatically included on all
> architectures, so remember to add our #include.
>
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Fixes: 5705670d0463 ("drm: Track drm_mm allocators and show leaks on shutdown")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>

Reviewed-by: Christian König <christian.koenig@amd.com>.

> ---
>   drivers/gpu/drm/drm_mm.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
> index 89b891a4847f..632473beb40c 100644
> --- a/drivers/gpu/drm/drm_mm.c
> +++ b/drivers/gpu/drm/drm_mm.c
> @@ -105,6 +105,8 @@ static struct drm_mm_node *drm_mm_search_free_in_range_generic(const struct drm_
>   						enum drm_mm_search_flags flags);
>   
>   #ifdef CONFIG_DRM_DEBUG_MM
> +#include <linux/stackdepot.h>
> +
>   #define STACKDEPTH 32
>   #define BUFSZ 4096
>   


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm: Add stackdepot include for DRM_DEBUG_MM
  2016-11-08 11:56 [PATCH] drm: Add stackdepot include for DRM_DEBUG_MM Chris Wilson
  2016-11-08 12:45 ` Christian König
@ 2016-11-08 12:46 ` Daniel Vetter
  2016-11-08 13:12   ` Chris Wilson
  1 sibling, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2016-11-08 12:46 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Daniel Vetter, dri-devel

On Tue, Nov 08, 2016 at 11:56:01AM +0000, Chris Wilson wrote:
> 0day found that stackdepot.h doesn't get automatically included on all
> architectures, so remember to add our #include.
> 
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Fixes: 5705670d0463 ("drm: Track drm_mm allocators and show leaks on shutdown")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>

Thx for the fast fixup, applied to drm-misc.
-Daniel
> ---
>  drivers/gpu/drm/drm_mm.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
> index 89b891a4847f..632473beb40c 100644
> --- a/drivers/gpu/drm/drm_mm.c
> +++ b/drivers/gpu/drm/drm_mm.c
> @@ -105,6 +105,8 @@ static struct drm_mm_node *drm_mm_search_free_in_range_generic(const struct drm_
>  						enum drm_mm_search_flags flags);
>  
>  #ifdef CONFIG_DRM_DEBUG_MM
> +#include <linux/stackdepot.h>
> +
>  #define STACKDEPTH 32
>  #define BUFSZ 4096
>  
> -- 
> 2.10.2
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm: Add stackdepot include for DRM_DEBUG_MM
  2016-11-08 12:46 ` Daniel Vetter
@ 2016-11-08 13:12   ` Chris Wilson
  2016-11-08 13:19     ` [PATCH 1/2] drm/i915: Restrict DRM_DEBUG_MM automatic selection Chris Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2016-11-08 13:12 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, dri-devel

On Tue, Nov 08, 2016 at 01:46:15PM +0100, Daniel Vetter wrote:
> On Tue, Nov 08, 2016 at 11:56:01AM +0000, Chris Wilson wrote:
> > 0day found that stackdepot.h doesn't get automatically included on all
> > architectures, so remember to add our #include.
> > 
> > Reported-by: kbuild test robot <fengguang.wu@intel.com>
> > Fixes: 5705670d0463 ("drm: Track drm_mm allocators and show leaks on shutdown")
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> Thx for the fast fixup, applied to drm-misc.

And I misread the kbuild result. Apparently we all build drm.ko as a
builtin and kbuild doesn't.

depot_save_stack is not exported :(

Is

-       depends on DRM
+       depends on DRM=y

a good temporary? Will have to munge i915 similarly. :(
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 1/2] drm/i915: Restrict DRM_DEBUG_MM automatic selection
  2016-11-08 13:12   ` Chris Wilson
@ 2016-11-08 13:19     ` Chris Wilson
  2016-11-08 13:19       ` [PATCH 2/2] drm: Restrict stackdepot usage to builtin drm.ko Chris Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2016-11-08 13:19 UTC (permalink / raw)
  To: dri-devel; +Cc: daniel.vetter

DRM_DEBUG_MM is only valid if the DRM.ko is builtin as currently
depot_save_stack is not exported.

Fixes: 5c7fcf2db027 ("drm/i915: Enable drm_mm debug when enabling DRM_I915_DEBUG")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug
index 69edf196ed03..51ba630a134b 100644
--- a/drivers/gpu/drm/i915/Kconfig.debug
+++ b/drivers/gpu/drm/i915/Kconfig.debug
@@ -21,7 +21,7 @@ config DRM_I915_DEBUG
         select PREEMPT_COUNT
         select X86_MSR # used by igt/pm_rpm
         select DRM_VGEM # used by igt/prime_vgem (dmabuf interop checks)
-        select DRM_DEBUG_MM
+        select DRM_DEBUG_MM if DRM=y
         default n
         help
           Choose this option to turn on extra driver debugging that may affect
-- 
2.10.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 2/2] drm: Restrict stackdepot usage to builtin drm.ko
  2016-11-08 13:19     ` [PATCH 1/2] drm/i915: Restrict DRM_DEBUG_MM automatic selection Chris Wilson
@ 2016-11-08 13:19       ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2016-11-08 13:19 UTC (permalink / raw)
  To: dri-devel; +Cc: daniel.vetter

I misread the kbuild result thinking that we had missed the include
(which we had for completeness anyway), what kbuild was actually warning
me about was that depot_save_stack was not exported.

Temporarily fix this by only selecting STACKDEPOT iff drm.ko is builtin

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Fixes: 5705670d0463 ("drm: Track drm_mm allocators and show leaks on shutdown")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 25e8e3793d29..d6ee0592b625 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -36,7 +36,7 @@ config DRM_DP_AUX_CHARDEV
 config DRM_DEBUG_MM
 	bool "Insert extra checks and debug info into the DRM range managers"
 	default n
-	depends on DRM
+	depends on DRM=y
 	select STACKDEPOT
 	help
 	  Enable allocation tracking of memory manager and leak detection on
-- 
2.10.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2016-11-08 13:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-08 11:56 [PATCH] drm: Add stackdepot include for DRM_DEBUG_MM Chris Wilson
2016-11-08 12:45 ` Christian König
2016-11-08 12:46 ` Daniel Vetter
2016-11-08 13:12   ` Chris Wilson
2016-11-08 13:19     ` [PATCH 1/2] drm/i915: Restrict DRM_DEBUG_MM automatic selection Chris Wilson
2016-11-08 13:19       ` [PATCH 2/2] drm: Restrict stackdepot usage to builtin drm.ko Chris Wilson

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.