aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/pvr/pdump/hostfunc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/pvr/pdump/hostfunc.c')
-rw-r--r--drivers/gpu/pvr/pdump/hostfunc.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/gpu/pvr/pdump/hostfunc.c b/drivers/gpu/pvr/pdump/hostfunc.c
index 64b20cc37b8..5eb8e1cc91a 100644
--- a/drivers/gpu/pvr/pdump/hostfunc.c
+++ b/drivers/gpu/pvr/pdump/hostfunc.c
@@ -1,6 +1,6 @@
1/********************************************************************** 1/**********************************************************************
2 * 2 *
3 * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved. 3 * Copyright (C) Imagination Technologies Ltd. All rights reserved.
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify it 5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License, 6 * under the terms and conditions of the GNU General Public License,
@@ -29,13 +29,17 @@
29#include <linux/module.h> 29#include <linux/module.h>
30#include <linux/fs.h> 30#include <linux/fs.h>
31#include <linux/kernel.h> 31#include <linux/kernel.h>
32#include <linux/slab.h>
32#include <linux/mm.h> 33#include <linux/mm.h>
33#include <linux/string.h> 34#include <linux/string.h>
34#include <asm/page.h> 35#include <asm/page.h>
35#include <linux/vmalloc.h> 36#include <linux/vmalloc.h>
37#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15))
36#include <linux/mutex.h> 38#include <linux/mutex.h>
39#else
40#include <asm/semaphore.h>
41#endif
37#include <linux/hardirq.h> 42#include <linux/hardirq.h>
38#include <linux/slab.h>
39 43
40#if defined(SUPPORT_DBGDRV_EVENT_OBJECTS) 44#if defined(SUPPORT_DBGDRV_EVENT_OBJECTS)
41#include <linux/sched.h> 45#include <linux/sched.h>
@@ -51,13 +55,13 @@
51#include "hostfunc.h" 55#include "hostfunc.h"
52#include "dbgdriv.h" 56#include "dbgdriv.h"
53 57
54#if defined(DEBUG) && !defined(SUPPORT_DRI_DRM) 58#if defined(MODULE) && defined(DEBUG) && !defined(SUPPORT_DRI_DRM)
55IMG_UINT32 gPVRDumpDebugLevel = (DBGPRIV_FATAL | DBGPRIV_ERROR | DBGPRIV_WARNING); 59IMG_UINT32 gPVRDebugLevel = (DBGPRIV_FATAL | DBGPRIV_ERROR | DBGPRIV_WARNING);
56 60
57#define PVR_STRING_TERMINATOR '\0' 61#define PVR_STRING_TERMINATOR '\0'
58#define PVR_IS_FILE_SEPARATOR(character) ( ((character) == '\\') || ((character) == '/') ) 62#define PVR_IS_FILE_SEPARATOR(character) ( ((character) == '\\') || ((character) == '/') )
59 63
60void PVRSRVDumpDebugPrintf ( 64void PVRSRVDebugPrintf (
61 IMG_UINT32 ui32DebugLevel, 65 IMG_UINT32 ui32DebugLevel,
62 const IMG_CHAR* pszFileName, 66 const IMG_CHAR* pszFileName,
63 IMG_UINT32 ui32Line, 67 IMG_UINT32 ui32Line,
@@ -79,7 +83,7 @@ void PVRSRVDumpDebugPrintf (
79 83
80 bTrace = (IMG_BOOL)(ui32DebugLevel & DBGPRIV_CALLTRACE) ? IMG_TRUE : IMG_FALSE; 84 bTrace = (IMG_BOOL)(ui32DebugLevel & DBGPRIV_CALLTRACE) ? IMG_TRUE : IMG_FALSE;
81 85
82 if (gPVRDumpDebugLevel & ui32DebugLevel) 86 if (gPVRDebugLevel & ui32DebugLevel)
83 { 87 {
84 va_list vaArgs; 88 va_list vaArgs;
85 static char szBuffer[256]; 89 static char szBuffer[256];
@@ -131,7 +135,7 @@ void PVRSRVDumpDebugPrintf (
131 vsprintf (&szBuffer[strlen(szBuffer)], pszFormat, vaArgs); 135 vsprintf (&szBuffer[strlen(szBuffer)], pszFormat, vaArgs);
132 136
133 137
134 if (bTrace == IMG_FALSE) 138 if (bTrace == IMG_FALSE)
135 { 139 {
136 sprintf (&szBuffer[strlen(szBuffer)], " [%d, %s]", (int)ui32Line, pszFileName); 140 sprintf (&szBuffer[strlen(szBuffer)], " [%d, %s]", (int)ui32Line, pszFileName);
137 } 141 }