gpu: pvr: make debugfs available in release build too
authorImre Deak <imre.deak@nokia.com>
Mon, 13 Dec 2010 17:40:00 +0000 (19:40 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 20 May 2012 18:43:02 +0000 (21:43 +0300)
Signed-off-by: Imre Deak <imre.deak@nokia.com>
pvr/Makefile
pvr/pvr_debug.c
pvr/pvr_debug.h

index 48e37d0..4b20e00 100644 (file)
@@ -14,6 +14,7 @@ pvrsrvkm-objs         := osfunc.o mmap.o module.o pdump.o proc.o         \
                           pvr_events.o
 
 pvrsrvkm-objs-$(CONFIG_PVR_DEBUG) += pvr_debug.o
+pvrsrvkm-objs-$(CONFIG_DEBUG_FS) += pvr_debug.o
 pvrsrvkm-objs-$(CONFIG_PVR_TIMING) += pvr_debug.o
 
 pvrsrvkm-objs          += $(pvrsrvkm-objs-y) $(pvrsrvkm-objs-m)
index e02d5dd..0f49175 100644 (file)
@@ -42,6 +42,8 @@
 #include "sgxutils.h"
 #include "pvr_bridge_km.h"
 
+#ifdef CONFIG_PVR_DEBUG
+
 u32 gPVRDebugLevel = DBGPRIV_WARNING;
 
 #define        PVR_MAX_MSG_LEN PVR_MAX_DEBUG_MESSAGE_LEN
@@ -251,6 +253,8 @@ int PVRDebugProcGetLevel(char *page, char **start, off_t off, int count,
        return 0;
 }
 
+#endif
+
 #ifdef CONFIG_DEBUG_FS
 
 static struct dentry *debugfs_dir;
@@ -354,7 +358,9 @@ static void pvr_cleanup_debugfs(void) { }
 
 void pvr_dbg_init(void)
 {
+#if defined(CONFIG_PVR_DEBUG) || defined(TIMING)
        mutex_init(&gsDebugMutexNonIRQ);
+#endif
        pvr_init_debugfs();
 }
 
index c8c7e75..4bad9c4 100644 (file)
@@ -77,9 +77,6 @@ int PVRDebugProcGetLevel(char *page, char **start, off_t off, int count,
                         int *eof, void *data);
 void PVRDebugSetLevel(u32 uDebugLevel);
 
-void pvr_dbg_init(void);
-void pvr_dbg_cleanup(void);
-
 #define PVR_DBG_BREAK
 
 #else
@@ -101,10 +98,20 @@ void PVRSRVTrace(const char *pszFormat, ...);
 #define PVR_TRACE(fmt, ...)            do { } while (0)
 #define PVR_DBG_BREAK                  do { } while (0)
 
+#endif         /* TIMING */
+
+#endif         /* CONFIG_PVR_DEBUG */
+
+#if defined(CONFIG_PVR_DEBUG) || defined(TIMING) || defined(CONFIG_DEBUG_FS)
+
+void pvr_dbg_init(void);
+void pvr_dbg_cleanup(void);
+
+#else
+
 static inline void pvr_dbg_init(void) {};
 static inline void pvr_dbg_cleanup(void) {};
 
-#endif
 #endif
 
 #endif