]> git.openpandora.org Git - sgx.git/commitdiff
gpu: pvr: add option for extra debugging information
authorImre Deak <imre.deak@nokia.com>
Thu, 1 Apr 2010 14:44:37 +0000 (17:44 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 20 May 2012 18:09:40 +0000 (21:09 +0300)
This is basically a sed -i 's/\<DEBUG\>/CONFIG_PVR_DEBUG_EXTRA' *.[ch] .

Currently a driver built in debug mode will only work together with the
relevant PVR/OGLES user space libraries being built in debug mode too.
This is becuase the ABI is different in debug and release build.

This is not very flexible when one wants to only debug the kernel driver
and not care about the user space part, let alone figuring out where to
get the sources for that and rebuild it in debug mode too.

Mark the current user space dependent debug code parts with a new
CONFIG_PVR_DEBUG_EXTRA option instead of DEBUG, so that later we can
selectively add back basic debugging facilities like debug traces and
mark them with CONFIG_PVR_DEBUG.

Signed-off-by: Imre Deak <imre.deak@nokia.com>
CC: Mark Underwood <mark.underwood@imgtec.com>
CC: Mark Riding <mark.riding@imgtec.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@nokia.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@nokia.com>
21 files changed:
pvr/Kconfig
pvr/bridged_pvr_bridge.c
pvr/bridged_pvr_bridge.h
pvr/bufferclass_example_linux.c
pvr/event.c
pvr/handle.c
pvr/mm.h
pvr/mmap.c
pvr/module.c
pvr/omaplfb.h
pvr/osfunc.c
pvr/pb.c
pvr/proc.c
pvr/pvr_debug.h
pvr/pvrconfig.h
pvr/ra.c
pvr/resman.c
pvr/sgx_options.h
pvr/sgxutils.c
pvr/syslocal.h
pvr/sysutils.c

index 2021d3162699a333a0728ffab04110ea09b5c0e3..949911c86f18334bd75d07bec8c979590f818b5d 100644 (file)
@@ -15,6 +15,15 @@ config PVR_TIMING
        bool "Timing"
 endchoice
 
+config PVR_DEBUG_EXTRA
+       bool "Extra debugging info"
+       depends on PVR_DEBUG
+       help
+           This enables extra debugging facilities on top of what you
+           get with setting debug build type above. This effectively
+           changes the driver's ABI, so the user space clients using
+           the driver need to be built in debug mode as well.
+
 config PVR_DEBUG_PDUMP
        tristate "PDUMP debug support"
        depends on PVR
index fa1a3714f622bf566ed8ac74b18c12dd4ce0c4e1..2f20554abc72148c1fed381fbd30b52ce7605d0f 100644 (file)
@@ -2464,7 +2464,7 @@ static int MMU_GetPDDevPAddrBW(u32 ui32BridgeID,
 int DummyBW(u32 ui32BridgeID, void *psBridgeIn, void *psBridgeOut,
            struct PVRSRV_PER_PROCESS_DATA *psPerProc)
 {
-#if !defined(DEBUG)
+#if !defined(CONFIG_PVR_DEBUG_EXTRA)
        PVR_UNREFERENCED_PARAMETER(ui32BridgeID);
 #endif
        PVR_UNREFERENCED_PARAMETER(psBridgeIn);
@@ -2493,7 +2493,7 @@ void _SetDispatchTableEntry(u32 ui32Index, const char *pszIOCName,
                            const char *pszFunctionName)
 {
        static u32 ui32PrevIndex = ~0UL;
-#if !defined(DEBUG)
+#if !defined(CONFIG_PVR_DEBUG_EXTRA)
        PVR_UNREFERENCED_PARAMETER(pszIOCName);
 #endif
 #if !defined(DEBUG_BRIDGE_KM_DISPATCH_TABLE) && !defined(DEBUG_BRIDGE_KM)
index 724980271951d3a9b66fc017add0b73763c33541..1e35ff419c3cb31714a701a46803f27916029ddd 100644 (file)
@@ -133,7 +133,7 @@ void _SetDispatchTableEntry(u32 ui32Index,
 
 #define DISPATCH_TABLE_GAP_THRESHOLD 5
 
-#if defined(DEBUG)
+#if defined(CONFIG_PVR_DEBUG_EXTRA)
 #define PVRSRV_BRIDGE_ASSERT_CMD(X, Y) PVR_ASSERT(X == PVRSRV_GET_BRIDGE_ID(Y))
 #else
 #define PVRSRV_BRIDGE_ASSERT_CMD(X, Y) PVR_UNREFERENCED_PARAMETER(X)
index bfb6ab623d56ffa0aee31099012cac21be6e90b8..924a27ead183285e8a2ef440f202ce6006cc3873 100644 (file)
@@ -168,7 +168,7 @@ static int __init BC_Example_ModInit(void)
 
                goto ExitDisable;
        }
-#if defined(DEBUG)
+#if defined(CONFIG_PVR_DEBUG_EXTRA)
        printk(KERN_ERR DRVNAME ": BC_Example_ModInit: major device %d\n",
               AssignedMajorNumber);
 #endif
index 3dc4ab5394745e3be96a6b8d4ca0a36e8909c197..e1c2aee1e4219ff2612a03ecb85b7de62cef636b 100644 (file)
@@ -62,7 +62,7 @@ struct PVRSRV_LINUX_EVENT_OBJECT_LIST {
 struct PVRSRV_LINUX_EVENT_OBJECT {
        atomic_t sTimeStamp;
        u32 ui32TimeStampPrevious;
-#if defined(DEBUG)
+#if defined(CONFIG_PVR_DEBUG_EXTRA)
        unsigned ui32Stats;
 #endif
        wait_queue_head_t sWait;
@@ -118,7 +118,7 @@ enum PVRSRV_ERROR LinuxEventObjectDelete(void *hOSEventObjectList,
                if (hOSEventObject) {
                        struct PVRSRV_LINUX_EVENT_OBJECT *psLinuxEventObject =
                            (struct PVRSRV_LINUX_EVENT_OBJECT *)hOSEventObject;
-#if defined(DEBUG)
+#if defined(CONFIG_PVR_DEBUG_EXTRA)
                        PVR_DPF(PVR_DBG_MESSAGE,
                        "LinuxEventObjectListDelete: Event object waits: %lu",
                                 psLinuxEventObject->ui32Stats);
@@ -144,7 +144,7 @@ static enum PVRSRV_ERROR LinuxEventObjectDeleteCallback(void *pvParam,
        list_del(&psLinuxEventObject->sList);
        write_unlock_bh(&psLinuxEventObjectList->sLock);
 
-#if defined(DEBUG)
+#if defined(CONFIG_PVR_DEBUG_EXTRA)
        PVR_DPF(PVR_DBG_MESSAGE,
                 "LinuxEventObjectDeleteCallback: Event object waits: %lu",
                 psLinuxEventObject->ui32Stats);
@@ -186,7 +186,7 @@ enum PVRSRV_ERROR LinuxEventObjectAdd(void *hOSEventObjectList,
        atomic_set(&psLinuxEventObject->sTimeStamp, 0);
        psLinuxEventObject->ui32TimeStampPrevious = 0;
 
-#if defined(DEBUG)
+#if defined(CONFIG_PVR_DEBUG_EXTRA)
        psLinuxEventObject->ui32Stats = 0;
 #endif
        init_waitqueue_head(&psLinuxEventObject->sWait);
@@ -254,7 +254,7 @@ enum PVRSRV_ERROR LinuxEventObjectWait(void *hOSEventObject, u32 ui32MSTimeout)
                    (u32) schedule_timeout((s32) ui32TimeOutJiffies);
 
                pvr_lock();
-#if defined(DEBUG)
+#if defined(CONFIG_PVR_DEBUG_EXTRA)
                psLinuxEventObject->ui32Stats++;
 #endif
 
index 77e28fc264fb6e4daee79a59246b63aa3f95c9a3..3372c6a9908e5fc02784a4d542fc58fd0bec1fe7 100644 (file)
@@ -29,7 +29,7 @@
 #include "services_headers.h"
 #include "handle.h"
 
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
 #define        HANDLE_BLOCK_SIZE               1
 #else
 #define        HANDLE_BLOCK_SIZE               256
@@ -187,7 +187,7 @@ static inline IMG_BOOL HandleListIsEmpty(u32 ui32Index,
 
        bIsEmpty = (IMG_BOOL) (psList->ui32Next == ui32Index);
 
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
        {
                IMG_BOOL bIsEmpty2;
 
@@ -199,7 +199,7 @@ static inline IMG_BOOL HandleListIsEmpty(u32 ui32Index,
        return bIsEmpty;
 }
 
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
 static inline IMG_BOOL NoChildren(struct PVRSRV_HANDLE_BASE *psBase,
                                  struct sHandle *psHandle)
 {
@@ -1200,7 +1200,7 @@ static enum PVRSRV_ERROR PVRSRVHandleBatchCommitOrRelease(
                ui32IndexPlusOne = ui32NextIndexPlusOne;
        }
 
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
        if (psBase->ui32TotalHandCountPreBatch != psBase->ui32TotalHandCount) {
                u32 ui32Delta =
                    psBase->ui32TotalHandCount -
index 948436368f92b9bd5b504888530c317ac85b91b5..777c49c5d89b2eff7a2f07f2a12ecd40f66dda7d 100644 (file)
--- a/pvr/mm.h
+++ b/pvr/mm.h
@@ -260,7 +260,7 @@ static inline enum LINUX_MEM_AREA_TYPE LinuxMemAreaRootType(struct LinuxMemArea
 
 const char *LinuxMemAreaTypeToString(enum LINUX_MEM_AREA_TYPE eMemAreaType);
 
-#if defined(DEBUG) || defined(DEBUG_LINUX_MEM_AREAS)
+#if defined(CONFIG_PVR_DEBUG_EXTRA) || defined(DEBUG_LINUX_MEM_AREAS)
 const char *HAPFlagsToString(u32 ui32Flags);
 #endif
 
index 240d121da1e2f29add50be5c92470cd979f3fad3..6bc58e13a16129be3597fc0bfc3a019875da5e2c 100644 (file)
@@ -118,7 +118,7 @@ static struct KV_OFFSET_STRUCT *CreateOffsetStruct(struct LinuxMemArea
                                                   u32 ui32RealByteSize)
 {
        struct KV_OFFSET_STRUCT *psOffsetStruct;
-#if defined(DEBUG) || defined(DEBUG_LINUX_MMAP_AREAS)
+#if defined(CONFIG_PVR_DEBUG_EXTRA) || defined(DEBUG_LINUX_MMAP_AREAS)
        const char *pszName =
            LinuxMemAreaTypeToString(LinuxMemAreaRootType(psLinuxMemArea));
 #endif
@@ -714,7 +714,7 @@ unlock_and_return:
 enum PVRSRV_ERROR PVRMMapRegisterArea(struct LinuxMemArea *psLinuxMemArea)
 {
        enum PVRSRV_ERROR eError = PVRSRV_ERROR_GENERIC;
-#if defined(DEBUG) || defined(DEBUG_LINUX_MMAP_AREAS)
+#if defined(CONFIG_PVR_DEBUG_EXTRA) || defined(DEBUG_LINUX_MMAP_AREAS)
        const char *pszName =
            LinuxMemAreaTypeToString(LinuxMemAreaRootType(psLinuxMemArea));
 #endif
index 29062b277a9d4a6c0825abda2343b752af821779..3ba1aea605b5a6427f62f3a8ba26a89e4406c48f 100644 (file)
@@ -55,7 +55,7 @@
 
 #define DRVNAME                "pvrsrvkm"
 
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
 static int debug = DBGPRIV_WARNING;
 #include <linux/moduleparam.h>
 module_param(debug, int, 0);
@@ -218,7 +218,7 @@ static int __init pvr_init(void)
 
        pvr_init_lock();
 
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
        PVRDebugSetLevel(debug);
 #endif
 
index fe4b2bb77110cbad68fc18928c59f7c812aa3335..34e7a6d8f164e82a31f244f4b82307d74d662bcb 100644 (file)
@@ -115,7 +115,7 @@ struct OMAPLFB_DEVINFO {
 
 #define        OMAPLFB_PAGE_ROUNDUP(x) (((x) + OMAPLFB_PAGE_MASK) & OMAPLFB_PAGE_TRUNC)
 
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
 #define        DEBUG_PRINTK(x) printk x
 #else
 #define        DEBUG_PRINTK(x)
index c0d0ba75e00b23386cb4d4a4edd9ca37f226b379..907ccc63dfd5dc366dc7597ff6d2b320ae5ed3ec 100644 (file)
@@ -1237,7 +1237,7 @@ struct sWrapMemInfo {
        struct IMG_SYS_PHYADDR *psPhysAddr;
        int iPageOffset;
        int iContiguous;
-#if defined(DEBUG)
+#if defined(CONFIG_PVR_DEBUG_EXTRA)
        u32 ulStartAddr;
        u32 ulBeyondEndAddr;
        struct vm_area_struct *psVMArea;
@@ -1384,7 +1384,7 @@ enum PVRSRV_ERROR OSAcquirePhysPageAddr(void *pvCPUVAddr, u32 ui32Bytes,
        }
        memset(psInfo, 0, sizeof(*psInfo));
 
-#if defined(DEBUG)
+#if defined(CONFIG_PVR_DEBUG_EXTRA)
        psInfo->ulStartAddr = ulStartAddrOrig;
        psInfo->ulBeyondEndAddr = ulBeyondEndAddrOrig;
 #endif
@@ -1462,7 +1462,7 @@ enum PVRSRV_ERROR OSAcquirePhysPageAddr(void *pvCPUVAddr, u32 ui32Bytes,
 
                goto error_release_mmap_sem;
        }
-#if defined(DEBUG)
+#if defined(CONFIG_PVR_DEBUG_EXTRA)
        psInfo->psVMArea = psVMArea;
 #endif
 
index a61406906f827258afa1d3f294cb004defd4bc1c..ffd8f69eecf7ff7e0193b9d44b6640636481622d 100644 (file)
--- a/pvr/pb.c
+++ b/pvr/pb.c
@@ -232,7 +232,7 @@ static enum PVRSRV_ERROR SGXCleanupSharedPBDescCallback(void *pvParam,
 static enum PVRSRV_ERROR SGXCleanupSharedPBDescCreateLockCallback(void *pvParam,
                                                             u32 ui32Param)
 {
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
        struct PVRSRV_PER_PROCESS_DATA *psPerProc =
            (struct PVRSRV_PER_PROCESS_DATA *)pvParam;
        PVR_ASSERT(psPerProc == psPerProcCreateSharedPB);
index 0ade0b9fcacb0a882cfce23035d16d820801f8f4..613d3decab68a1b043b9ecd099f2097c63160b2b 100644 (file)
@@ -241,7 +241,7 @@ int CreateProcEntries(void)
 
                return -ENOMEM;
        }
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
        if (CreateProcEntry
            ("debug_level", PVRDebugProcGetLevel, PVRDebugProcSetLevel, NULL)) {
                PVR_DPF(PVR_DBG_ERROR,
@@ -301,7 +301,7 @@ void RemovePerProcessProcDir(struct PVRSRV_ENV_PER_PROCESS_DATA *psPerProc)
 
 void RemoveProcEntries(void)
 {
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
        RemoveProcEntry("debug_level");
 #endif
        RemoveProcEntry("queue");
index a47d718cb451d697f4e9aeaf33e08b2276d532eb..23ebe65c30d7e1b4c7566bcc30c543c9e3c5ce00 100644 (file)
@@ -52,7 +52,7 @@
 #define PVR_DBG_CALLTRACE              DBGPRIV_CALLTRACE
 #define PVR_DBG_ALLOC                  DBGPRIV_ALLOC
 
-#if defined(DEBUG)
+#if defined(CONFIG_PVR_DEBUG_EXTRA)
 
 #define PVR_ASSERT(EXPR)                                                    \
        do {                                                                 \
index 54f854906082d86f84fd7c8137e8938d82d49166..eeaa95e7ee393a6d0e4b4c99e5835a8f1e5eba15 100644 (file)
@@ -17,7 +17,7 @@
 # define NO_HARDWARE                   1
 #endif
 
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
 # define DEBUG_LINUX_MEMORY_ALLOCATIONS        1
 # define DEBUG_LINUX_MEM_AREAS         1
 # define DEBUG_LINUX_MMAP_AREAS                1
index 4d002a6e4ad47fe1a2a19bd8f19ca72b975a421f..4c71af18839d3849cbbc0852bc588aa3c6a437ea 100644 (file)
--- a/pvr/ra.c
+++ b/pvr/ra.c
@@ -73,7 +73,7 @@ struct RA_ARENA {
 #ifdef RA_STATS
        struct RA_STATISTICS sStatistics;
 #endif
-#if defined(CONFIG_PROC_FS) && defined(DEBUG)
+#if defined(CONFIG_PROC_FS) && defined(CONFIG_PVR_DEBUG_EXTRA)
 #define PROC_NAME_SIZE         32
        char szProcInfoName[PROC_NAME_SIZE];
        char szProcSegsName[PROC_NAME_SIZE];
@@ -81,14 +81,14 @@ struct RA_ARENA {
 #endif
 };
 
-#if defined(CONFIG_PROC_FS) && defined(DEBUG)
+#if defined(CONFIG_PROC_FS) && defined(CONFIG_PVR_DEBUG_EXTRA)
 static int RA_DumpSegs(char *page, char **start, off_t off, int count, int *eof,
                       void *data);
 static int RA_DumpInfo(char *page, char **start, off_t off, int count, int *eof,
                       void *data);
 #endif
 
-#if defined(CONFIG_PROC_FS) && defined(DEBUG)
+#if defined(CONFIG_PROC_FS) && defined(CONFIG_PVR_DEBUG_EXTRA)
 static char *ReplaceSpaces(char *const pS)
 {
        char *pT;
@@ -641,7 +641,7 @@ struct RA_ARENA *RA_Create(char *name, u32 base, size_t uSize,
        pArena->sStatistics.uExportCount = 0;
 #endif
 
-#if defined(CONFIG_PROC_FS) && defined(DEBUG)
+#if defined(CONFIG_PROC_FS) && defined(CONFIG_PVR_DEBUG_EXTRA)
        if (strcmp(pArena->name, "") != 0) {
                int ret;
                int (*pfnCreateProcEntry) (const char *, read_proc_t,
@@ -732,7 +732,7 @@ void RA_Delete(struct RA_ARENA *pArena)
                pArena->sStatistics.uSpanCount--;
 #endif
        }
-#if defined(CONFIG_PROC_FS) && defined(DEBUG)
+#if defined(CONFIG_PROC_FS) && defined(CONFIG_PVR_DEBUG_EXTRA)
        {
                void (*pfnRemoveProcEntry) (const char *);
 
@@ -924,7 +924,8 @@ IMG_BOOL RA_GetNextLiveSegment(void *hArena,
        return IMG_FALSE;
 }
 
-#if (defined(CONFIG_PROC_FS) && defined(DEBUG)) || defined(RA_STATS)
+#if (defined(CONFIG_PROC_FS) && defined(CONFIG_PVR_DEBUG_EXTRA)) || \
+     defined(RA_STATS)
 static char *_BTType(int eType)
 {
        switch (eType) {
@@ -968,7 +969,7 @@ void RA_Dump(struct RA_ARENA *pArena)
 }
 #endif
 
-#if defined(CONFIG_PROC_FS) && defined(DEBUG)
+#if defined(CONFIG_PROC_FS) && defined(CONFIG_PVR_DEBUG_EXTRA)
 static int RA_DumpSegs(char *page, char **start, off_t off, int count, int *eof,
                       void *data)
 {
index ccb1664cfbf1550fc6df35229b7b135cbc625c51..59e8a17bf5bdd1ef6efb654d2d9276cea9d4a5aa 100644 (file)
@@ -48,7 +48,7 @@ static DEFINE_SEMAPHORE(lock);
 #define RESMAN_SIGNATURE 0x12345678
 
 struct RESMAN_ITEM {
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
        u32 ui32Signature;
 #endif
        struct RESMAN_ITEM **ppsThis;
@@ -64,7 +64,7 @@ struct RESMAN_ITEM {
 };
 
 struct RESMAN_CONTEXT {
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
        u32 ui32Signature;
 #endif
        struct RESMAN_CONTEXT **ppsThis;
@@ -91,7 +91,7 @@ static int FreeResourceByCriteria(struct RESMAN_CONTEXT *psContext,
                                           u32 ui32Param,
                                           IMG_BOOL bExecuteCallback);
 
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
 static void ValidateResList(struct RESMAN_LIST *psResList);
 #define VALIDATERESLIST() ValidateResList(gpsResList)
 #else
@@ -144,7 +144,7 @@ enum PVRSRV_ERROR PVRSRVResManConnect(void *hPerProc,
 
                return eError;
        }
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
        psResManContext->ui32Signature = RESMAN_SIGNATURE;
 #endif
        psResManContext->psResItemList = NULL;
@@ -274,7 +274,7 @@ struct RESMAN_ITEM *ResManRegisterRes(struct RESMAN_CONTEXT *psResManContext,
                return (struct RESMAN_ITEM *)NULL;
        }
 
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
        psNewResItem->ui32Signature = RESMAN_SIGNATURE;
 #endif
        psNewResItem->ui32ResType = ui32ResType;
@@ -349,7 +349,7 @@ enum PVRSRV_ERROR ResManDissociateRes(struct RESMAN_ITEM *psResItem,
                PVR_DBG_BREAK;
                return PVRSRV_ERROR_INVALID_PARAMS;
        }
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
        PVR_ASSERT(psResItem->ui32Signature == RESMAN_SIGNATURE);
 #endif
 
@@ -385,7 +385,7 @@ enum PVRSRV_ERROR ResManFindResourceByPtr(
                PVR_DBG_BREAK;
                return PVRSRV_ERROR_INVALID_PARAMS;
        }
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
        PVR_ASSERT(psItem->ui32Signature == RESMAN_SIGNATURE);
 #endif
 
@@ -517,7 +517,7 @@ static int FreeResourceByCriteria(struct RESMAN_CONTEXT *psResManContext,
        return freed;
 }
 
-#ifdef DEBUG
+#ifdef CONFIG_PVR_DEBUG_EXTRA
 static void ValidateResList(struct RESMAN_LIST *psResList)
 {
        struct RESMAN_ITEM *psCurItem, **ppsThisItem;
index ce59e49fe2daaa58b6a122ff2d7b98511d85374d..67402fecd3146fd762a6cc8c5b89a989d00795e1 100644 (file)
@@ -24,7 +24,7 @@
  *
  ******************************************************************************/
 
-#if defined(DEBUG) || defined(INTERNAL_TEST)
+#if defined(CONFIG_PVR_DEBUG_EXTRA) || defined(INTERNAL_TEST)
 #define DEBUG_SET_OFFSET                               OPTIONS_BIT0
 #define OPTIONS_BIT0                                   0x1
 #else
index feb350415b9c2967f0cb564fba2245f87143490a..5b04f046a1fef40bbbe182e03cf6c932518252c9 100644 (file)
@@ -703,7 +703,7 @@ enum PVRSRV_ERROR SGX2DQueryBlitsCompleteKM(
        PVR_DPF(PVR_DBG_ERROR,
                 "SGX2DQueryBlitsCompleteKM: Timed out. Ops pending.");
 
-#if defined(DEBUG)
+#if defined(CONFIG_PVR_DEBUG_EXTRA)
        {
                struct PVRSRV_SYNC_DATA *psSyncData = psSyncInfo->psSyncData;
 
index de31046f1c28a2e013e666f35ddbaa76a41a7188..0cda586c1142877fc1269c763ff5334d7d1db90d 100644 (file)
@@ -85,7 +85,7 @@ struct SYS_SPECIFIC_DATA {
        struct clk *psSGX_FCK;
        struct clk *psSGX_ICK;
        struct clk *psMPU_CK;
-#if defined(DEBUG) || defined(TIMING)
+#if defined(CONFIG_PVR_DEBUG_EXTRA) || defined(TIMING)
        struct clk *psGPT11_FCK;
        struct clk *psGPT11_ICK;
        void __iomem *gpt_base;
index 5729b5ade2ec0a9d3cd9fca45c66d19427cf23dd..52c2584807f561e291f6cac1be2125a8dd52fb4f 100644 (file)
@@ -90,7 +90,7 @@ static int vdd2_post_func(struct notifier_block *n, unsigned long event,
 
        if (atomic_read(&gpsSysSpecificData->sSGXClocksEnabled) != 0 &&
            gpsSysSpecificData->bSGXInitComplete) {
-#if defined(DEBUG)
+#if defined(CONFIG_PVR_DEBUG_EXTRA)
                unsigned long rate;
 
                rate = clk_get_rate(gpsSysSpecificData->psSGX_FCK);
@@ -520,7 +520,7 @@ static void CleanupSgxClocks(struct SYS_DATA *psSysData)
        }
 }
 
-#if defined(DEBUG) || defined(TIMING)
+#if defined(CONFIG_PVR_DEBUG_EXTRA) || defined(TIMING)
 static inline u32 gpt_read_reg(struct SYS_DATA *psSysData, u32 reg)
 {
        struct SYS_SPECIFIC_DATA *psSysSpecData = psSysData->pvSysSpecificData;