Ignore the previous patch thread I started. This is the correct one.<br><br><div class="gmail_quote">On Thu, Oct 8, 2009 at 4:26 PM, Matt Parnell <span dir="ltr"><span><<a href="mailto:parwok@gmail.com" class="linkifyplus">parwok@gmail.com</a>></span></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">From: Matt Parnell <<a href="mailto:mparnell@gmail.com">mparnell@gmail.com</a>><br>
<br>
Sometimes we have DEBUG_FS enabled, but don't want output from certain modules.<br>
Most modules make this an option, so I figured that Nouveau needed it too.<br>
<br>
Signed-off-by: Matt Parnell <<a href="mailto:mparnell@gmail.com">mparnell@gmail.com</a>><br>
---<br>
drivers/gpu/drm/Kconfig | 11 +++++++++++<br>
drivers/gpu/drm/nouveau/Makefile | 2 +-<br>
drivers/gpu/drm/nouveau/nouveau_debugfs.c | 2 --<br>
drivers/gpu/drm/nouveau/nouveau_drv.c | 2 +-<br>
drivers/gpu/drm/nouveau/nouveau_drv.h | 2 +-<br>
5 files changed, 14 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig<br>
index 7fe8a4c..62dd13c 100644<br>
--- a/drivers/gpu/drm/Kconfig<br>
+++ b/drivers/gpu/drm/Kconfig<br>
@@ -176,6 +176,9 @@ config DRM_NOUVEAU_KMS<br>
and you have a new enough userspace to support this. Running old<br>
userspaces with this enabled will cause pain.<br>
<br>
+ NOTICE: if you plan on using the text based console outside of X, enable<br>
+ FRAMEBUFFER_CONSOLE or else the console will be unusable.<br>
+<br>
config DRM_NOUVEAU_BACKLIGHT<br>
bool "Support for backlight control"<br>
depends on DRM_NOUVEAU<br>
@@ -184,6 +187,14 @@ config DRM_NOUVEAU_BACKLIGHT<br>
Say Y here if you want to control the backlight of your display<br>
(e.g. a laptop panel).<br>
<br>
+config DRM_NOUVEAU_DEBUG<br>
+ bool "Build in Nouveau's debugfs support"<br>
+ depends on DRM_NOUVEAU && DEBUG_FS<br>
+ default y<br>
+ help<br>
+ Say Y here if you want Nouveau to output debugging information<br>
+ via debugfs.<br>
+<br>
menu "I2C encoder or helper chips"<br>
depends on DRM<br>
<br>
diff --git a/drivers/gpu/drm/nouveau/Makefile b/drivers/gpu/drm/nouveau/Makefile<br>
index ab46e3a..e12b4ff 100644<br>
--- a/drivers/gpu/drm/nouveau/Makefile<br>
+++ b/drivers/gpu/drm/nouveau/Makefile<br>
@@ -9,7 +9,6 @@ nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \<br>
nouveau_bo.o nouveau_fence.o nouveau_gem.o nouveau_ttm.o \<br>
nouveau_hw.o nouveau_calc.o nouveau_bios.o nouveau_i2c.o \<br>
nouveau_display.o nouveau_connector.o nouveau_fbcon.o \<br>
- nouveau_debugfs.o \<br>
nv04_timer.o \<br>
nv04_mc.o nv40_mc.o nv50_mc.o \<br>
nv04_fb.o nv10_fb.o nv40_fb.o \<br>
@@ -22,6 +21,7 @@ nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \<br>
nv04_dac.o nv04_dfp.o nv04_tv.o nv17_tv.o nv17_tv_modes.o \<br>
nv04_crtc.o nv04_display.o nv04_cursor.o nv04_fbcon.o<br>
<br>
+nouveau-$(CONFIG_DRM_NOUVEAU_DEBUG) += nouveau_debugfs.o<br>
nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o<br>
nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o<br>
nouveau-$(CONFIG_ACPI) += nouveau_acpi.o<br>
diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c<br>
index 1ac871b..6ccafd3 100644<br>
--- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c<br>
+++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c<br>
@@ -33,7 +33,6 @@<br>
#include "drmP.h"<br>
#include "nouveau_drv.h"<br>
<br>
-#if defined(CONFIG_DEBUG_FS)<br>
static int<br>
nouveau_debugfs_channel_info(struct seq_file *m, void *data)<br>
{<br>
@@ -154,4 +153,3 @@ nouveau_debugfs_takedown(struct drm_minor *minor)<br>
drm_debugfs_remove_files(nouveau_debugfs_list, NOUVEAU_DEBUGFS_ENTRIES,<br>
minor);<br>
}<br>
-#endif<br>
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c<br>
index 327f01a..5e9d38a 100644<br>
--- a/drivers/gpu/drm/nouveau/nouveau_drv.c<br>
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.c<br>
@@ -325,7 +325,7 @@ static struct drm_driver driver = {<br>
.lastclose = nouveau_lastclose,<br>
.unload = nouveau_unload,<br>
.preclose = nouveau_preclose,<br>
-#if defined(CONFIG_DEBUG_FS)<br>
+#if defined(CONFIG_DRM_NOUVEAU_DEBUG)<br>
.debugfs_init = nouveau_debugfs_init,<br>
.debugfs_cleanup = nouveau_debugfs_takedown,<br>
#endif<br>
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h<br>
index 2ecfb25..46436ce 100644<br>
--- a/drivers/gpu/drm/nouveau/nouveau_drv.h<br>
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.h<br>
@@ -765,7 +765,7 @@ extern int nouveau_sgdma_get_page(struct drm_device *, uint32_t offset,<br>
extern struct ttm_backend *nouveau_sgdma_init_ttm(struct drm_device *);<br>
<br>
/* nouveau_debugfs.c */<br>
-#if defined(CONFIG_DEBUG_FS)<br>
+#if defined(CONFIG_DRM_NOUVEAU_DEBUG)<br>
extern int nouveau_debugfs_init(struct drm_minor *);<br>
extern void nouveau_debugfs_takedown(struct drm_minor *);<br>
extern int nouveau_debugfs_channel_init(struct nouveau_channel *);<br>
<font color="#888888">--<br>
1.6.4.4<br>
<br>
</font></blockquote></div><br>