drm: Add stackdepot include for DRM_DEBUG_MM
Subsystems (3)
PATCH 1/1 drm: Add stackdepot include for DRM_DEBUG_MM
0day found that stackdepot.h doesn't get automatically included on all architectures, so remember to add our #include.
--- drivers/gpu/drm/drm_mm.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/drm_mm.c +2 -0
@@ -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
Signature · 6 lines
2.10.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Am 08.11.2016 um 12:56 schrieb Chris Wilson:
Quoted 7 lines
0day found that
stackdepot.hdoesn't get automatically included on all architectures, so remember to add our #include.Reported-by kbuild test robot <[email protected]>Fixes 5705670d0463 ("drm: Track drm_mm allocators and show leaks on shutdown")Signed-off-by Chris Wilson <[email protected]>Cc Daniel Vetter <[email protected]>
Quoted 9 lines
--- drivers/gpu/drm/drm_mm.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/drm_mm.c +0
-0
drivers/gpu/drm/drm_mm.c static struct drm_mm_node *drm_mm_search_free_in_range_generic(const struct drm_ · line 112
Quoted 8 lines
drivers/gpu/drm/drm_mm.c +2
-0@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Chris Wilson
0day found that
stackdepot.hdoesn't get automatically included on all architectures, so remember to add our #include.Reported-by kbuild test robot <[email protected]>Fixes 5705670d0463 ("drm: Track drm_mm allocators and show leaks on shutdown")Signed-off-by Chris Wilson <[email protected]>Cc Daniel Vetter <[email protected]>
Thx for the fast fixup, applied to drm-misc.
-Daniel
Quoted 20 lines
--- drivers/gpu/drm/drm_mm.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/drm_mm.c +2
-0@@ -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 4096Signature · 1 line
2.10.2
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 10 lines · Daniel Vetter
Quoted 7 lines · Chris Wilson
0day found that
stackdepot.hdoesn't get automatically included on all architectures, so remember to add our #include.Reported-by kbuild test robot <[email protected]>Fixes 5705670d0463 ("drm: Track drm_mm allocators and show leaks on shutdown")Signed-off-by Chris Wilson <[email protected]>Cc Daniel Vetter <[email protected]>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
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/2 drm/i915: Restrict DRM_DEBUG_MM automatic selection
DRM_DEBUG_MM is only valid if the DRM.ko is builtin as currently depot_save_stack is not exported.
--- drivers/gpu/drm/i915/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/Kconfig.debug +1 -1
@@ -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
Signature · 6 lines
2.10.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/2 drm: Restrict stackdepot usage to builtin drm.ko
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
--- drivers/gpu/drm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/Kconfig +1 -1
@@ -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
Signature · 6 lines
2.10.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel