From: Imre Deak Date: Mon, 13 Dec 2010 17:40:00 +0000 (+0200) Subject: gpu: pvr: make debugfs available in release build too X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9304b97df4cfe056f08a3898379b1379d76cf944;p=sgx.git gpu: pvr: make debugfs available in release build too Signed-off-by: Imre Deak --- diff --git a/pvr/Makefile b/pvr/Makefile index 48e37d0..4b20e00 100644 --- a/pvr/Makefile +++ b/pvr/Makefile @@ -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) diff --git a/pvr/pvr_debug.c b/pvr/pvr_debug.c index e02d5dd..0f49175 100644 --- a/pvr/pvr_debug.c +++ b/pvr/pvr_debug.c @@ -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(); } diff --git a/pvr/pvr_debug.h b/pvr/pvr_debug.h index c8c7e75..4bad9c4 100644 --- a/pvr/pvr_debug.h +++ b/pvr/pvr_debug.h @@ -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