diff options
Diffstat (limited to 'drivers/gpu/pvr/pdump')
-rw-r--r-- | drivers/gpu/pvr/pdump/dbgdriv.c | 8 | ||||
-rw-r--r-- | drivers/gpu/pvr/pdump/dbgdriv.h | 12 | ||||
-rw-r--r-- | drivers/gpu/pvr/pdump/dbgdriv_ioctl.h | 2 | ||||
-rw-r--r-- | drivers/gpu/pvr/pdump/handle.c | 4 | ||||
-rw-r--r-- | drivers/gpu/pvr/pdump/hostfunc.c | 18 | ||||
-rw-r--r-- | drivers/gpu/pvr/pdump/hostfunc.h | 2 | ||||
-rw-r--r-- | drivers/gpu/pvr/pdump/hotkey.c | 2 | ||||
-rw-r--r-- | drivers/gpu/pvr/pdump/hotkey.h | 2 | ||||
-rw-r--r-- | drivers/gpu/pvr/pdump/ioctl.c | 4 | ||||
-rw-r--r-- | drivers/gpu/pvr/pdump/linuxsrv.h | 4 | ||||
-rw-r--r-- | drivers/gpu/pvr/pdump/main.c | 13 |
11 files changed, 39 insertions, 32 deletions
diff --git a/drivers/gpu/pvr/pdump/dbgdriv.c b/drivers/gpu/pvr/pdump/dbgdriv.c index a1ca244f5f7..f8f635fd1e6 100644 --- a/drivers/gpu/pvr/pdump/dbgdriv.c +++ b/drivers/gpu/pvr/pdump/dbgdriv.c @@ -707,7 +707,7 @@ void MonoOut(IMG_CHAR * pszString,IMG_BOOL bNewLine) PVR_UNREFERENCED_PARAMETER(bNewLine); #else - IMG_UINT32 i; + IMG_UINT32 i; IMG_CHAR * pScreen; pScreen = (IMG_CHAR *) DBGDRIV_MONOBASE; @@ -842,10 +842,10 @@ static IMG_UINT32 WriteExpandingBuffer(PDBG_STREAM psStream,IMG_UINT8 * pui8InBu } IMG_VOID * IMG_CALLCONV DBGDrivCreateStream(IMG_CHAR * pszName, - IMG_UINT32 ui32CapMode, - IMG_UINT32 ui32OutMode, + IMG_UINT32 ui32CapMode, + IMG_UINT32 ui32OutMode, IMG_UINT32 ui32Flags, - IMG_UINT32 ui32Size) + IMG_UINT32 ui32Size) { PDBG_STREAM psStream; PDBG_STREAM psInitStream; diff --git a/drivers/gpu/pvr/pdump/dbgdriv.h b/drivers/gpu/pvr/pdump/dbgdriv.h index a285d0d919b..dc75f88f160 100644 --- a/drivers/gpu/pvr/pdump/dbgdriv.h +++ b/drivers/gpu/pvr/pdump/dbgdriv.h @@ -29,9 +29,9 @@ #define BUFFER_SIZE 64*PAGESIZE -#define DBGDRIV_VERSION 0x100 -#define MAX_PROCESSES 2 -#define BLOCK_USED 0x01 +#define DBGDRIV_VERSION 0x100 +#define MAX_PROCESSES 2 +#define BLOCK_USED 0x01 #define BLOCK_LOCKED 0x02 #define DBGDRIV_MONOBASE 0x000B0000 @@ -39,10 +39,10 @@ extern IMG_VOID * g_pvAPIMutex; IMG_VOID * IMG_CALLCONV DBGDrivCreateStream(IMG_CHAR * pszName, - IMG_UINT32 ui32CapMode, - IMG_UINT32 ui32OutMode, + IMG_UINT32 ui32CapMode, + IMG_UINT32 ui32OutMode, IMG_UINT32 ui32Flags, - IMG_UINT32 ui32Pages); + IMG_UINT32 ui32Pages); IMG_VOID IMG_CALLCONV DBGDrivDestroyStream(PDBG_STREAM psStream); IMG_VOID * IMG_CALLCONV DBGDrivFindStream(IMG_CHAR * pszName, IMG_BOOL bResetStream); IMG_UINT32 IMG_CALLCONV DBGDrivWriteString(PDBG_STREAM psStream,IMG_CHAR * pszString,IMG_UINT32 ui32Level); diff --git a/drivers/gpu/pvr/pdump/dbgdriv_ioctl.h b/drivers/gpu/pvr/pdump/dbgdriv_ioctl.h index 8cef6ac78a8..68492495115 100644 --- a/drivers/gpu/pvr/pdump/dbgdriv_ioctl.h +++ b/drivers/gpu/pvr/pdump/dbgdriv_ioctl.h @@ -1,6 +1,6 @@ /********************************************************************** * - * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved. + * Copyright (C) Imagination Technologies Ltd. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, diff --git a/drivers/gpu/pvr/pdump/handle.c b/drivers/gpu/pvr/pdump/handle.c index dceeab886c1..8ba44df7055 100644 --- a/drivers/gpu/pvr/pdump/handle.c +++ b/drivers/gpu/pvr/pdump/handle.c @@ -1,6 +1,6 @@ /********************************************************************** * - * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved. + * Copyright (C) Imagination Technologies Ltd. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -68,7 +68,7 @@ PDBG_STREAM SID2PStream(IMG_SID hStream) } else { - return (PDBG_STREAM)IMG_NULL; + return (PDBG_STREAM)IMG_NULL; } } 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 @@ /********************************************************************** * - * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved. + * Copyright (C) Imagination Technologies Ltd. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -29,13 +29,17 @@ #include <linux/module.h> #include <linux/fs.h> #include <linux/kernel.h> +#include <linux/slab.h> #include <linux/mm.h> #include <linux/string.h> #include <asm/page.h> #include <linux/vmalloc.h> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)) #include <linux/mutex.h> +#else +#include <asm/semaphore.h> +#endif #include <linux/hardirq.h> -#include <linux/slab.h> #if defined(SUPPORT_DBGDRV_EVENT_OBJECTS) #include <linux/sched.h> @@ -51,13 +55,13 @@ #include "hostfunc.h" #include "dbgdriv.h" -#if defined(DEBUG) && !defined(SUPPORT_DRI_DRM) -IMG_UINT32 gPVRDumpDebugLevel = (DBGPRIV_FATAL | DBGPRIV_ERROR | DBGPRIV_WARNING); +#if defined(MODULE) && defined(DEBUG) && !defined(SUPPORT_DRI_DRM) +IMG_UINT32 gPVRDebugLevel = (DBGPRIV_FATAL | DBGPRIV_ERROR | DBGPRIV_WARNING); #define PVR_STRING_TERMINATOR '\0' #define PVR_IS_FILE_SEPARATOR(character) ( ((character) == '\\') || ((character) == '/') ) -void PVRSRVDumpDebugPrintf ( +void PVRSRVDebugPrintf ( IMG_UINT32 ui32DebugLevel, const IMG_CHAR* pszFileName, IMG_UINT32 ui32Line, @@ -79,7 +83,7 @@ void PVRSRVDumpDebugPrintf ( bTrace = (IMG_BOOL)(ui32DebugLevel & DBGPRIV_CALLTRACE) ? IMG_TRUE : IMG_FALSE; - if (gPVRDumpDebugLevel & ui32DebugLevel) + if (gPVRDebugLevel & ui32DebugLevel) { va_list vaArgs; static char szBuffer[256]; @@ -131,7 +135,7 @@ void PVRSRVDumpDebugPrintf ( vsprintf (&szBuffer[strlen(szBuffer)], pszFormat, vaArgs); - if (bTrace == IMG_FALSE) + if (bTrace == IMG_FALSE) { sprintf (&szBuffer[strlen(szBuffer)], " [%d, %s]", (int)ui32Line, pszFileName); } diff --git a/drivers/gpu/pvr/pdump/hostfunc.h b/drivers/gpu/pvr/pdump/hostfunc.h index 42733d7c131..acfc439db0a 100644 --- a/drivers/gpu/pvr/pdump/hostfunc.h +++ b/drivers/gpu/pvr/pdump/hostfunc.h @@ -1,6 +1,6 @@ /********************************************************************** * - * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved. + * Copyright (C) Imagination Technologies Ltd. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, diff --git a/drivers/gpu/pvr/pdump/hotkey.c b/drivers/gpu/pvr/pdump/hotkey.c index 48853c79537..2d82b6cf6d9 100644 --- a/drivers/gpu/pvr/pdump/hotkey.c +++ b/drivers/gpu/pvr/pdump/hotkey.c @@ -1,6 +1,6 @@ /********************************************************************** * - * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved. + * Copyright (C) Imagination Technologies Ltd. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, diff --git a/drivers/gpu/pvr/pdump/hotkey.h b/drivers/gpu/pvr/pdump/hotkey.h index d9c9458da74..942d2daa3a9 100644 --- a/drivers/gpu/pvr/pdump/hotkey.h +++ b/drivers/gpu/pvr/pdump/hotkey.h @@ -1,6 +1,6 @@ /********************************************************************** * - * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved. + * Copyright (C) Imagination Technologies Ltd. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, diff --git a/drivers/gpu/pvr/pdump/ioctl.c b/drivers/gpu/pvr/pdump/ioctl.c index e646c4f9324..1d291468526 100644 --- a/drivers/gpu/pvr/pdump/ioctl.c +++ b/drivers/gpu/pvr/pdump/ioctl.c @@ -1,6 +1,6 @@ /********************************************************************** * - * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved. + * Copyright (C) Imagination Technologies Ltd. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -194,7 +194,7 @@ static IMG_UINT32 DBGDIOCDrivWrite2(IMG_VOID * pvInBuffer, IMG_VOID * pvOutBuffe { IMG_UINT32 * pui32BytesCopied; PDBG_IN_WRITE psInParams; - PDBG_STREAM psStream; + PDBG_STREAM psStream; psInParams = (PDBG_IN_WRITE) pvInBuffer; pui32BytesCopied = (IMG_UINT32 *) pvOutBuffer; diff --git a/drivers/gpu/pvr/pdump/linuxsrv.h b/drivers/gpu/pvr/pdump/linuxsrv.h index 671622fa8b4..4888cd04214 100644 --- a/drivers/gpu/pvr/pdump/linuxsrv.h +++ b/drivers/gpu/pvr/pdump/linuxsrv.h @@ -1,6 +1,6 @@ /********************************************************************** * - * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved. + * Copyright (C) Imagination Technologies Ltd. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -31,7 +31,7 @@ typedef struct tagIOCTL_PACKAGE { IMG_UINT32 ui32Cmd; IMG_UINT32 ui32Size; - IMG_VOID *pInBuffer; + IMG_VOID *pInBuffer; IMG_UINT32 ui32InBufferSize; IMG_VOID *pOutBuffer; IMG_UINT32 ui32OutBufferSize; diff --git a/drivers/gpu/pvr/pdump/main.c b/drivers/gpu/pvr/pdump/main.c index 69c0d9b1a97..45d041b087f 100644 --- a/drivers/gpu/pvr/pdump/main.c +++ b/drivers/gpu/pvr/pdump/main.c @@ -1,6 +1,6 @@ /********************************************************************** * - * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved. + * Copyright (C) Imagination Technologies Ltd. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -116,7 +116,7 @@ IMG_VOID DBGDrvGetServiceTable(IMG_VOID **fn_table) #if defined(SUPPORT_DRI_DRM) void dbgdrv_cleanup(void) #else -void __exit dbgdrv_cleanup_module(void) +static void __exit dbgdrv_cleanup(void) #endif { #if !defined(SUPPORT_DRI_DRM) @@ -136,7 +136,7 @@ void __exit dbgdrv_cleanup_module(void) #if defined(SUPPORT_DRI_DRM) IMG_INT dbgdrv_init(void) #else -int __init dbgdrv_init_module(void) +static int __init dbgdrv_init(void) #endif { #if (defined(LDM_PLATFORM) || defined(LDM_PCI)) && !defined(SUPPORT_DRI_DRM) @@ -240,6 +240,7 @@ long dbgdrv_ioctl(struct file *file, unsigned int ioctlCmd, unsigned long arg) goto init_failed; } + cmd = MAKEIOCTLINDEX(pIP->ui32Cmd) - DEBUG_SERVICE_IOCTL_BASE - 1; if(pIP->ui32Cmd == DEBUG_SERVICE_READ) @@ -310,5 +311,7 @@ IMG_VOID DefineHotKey (IMG_UINT32 ui32ScanCode, IMG_UINT32 ui32ShiftState, PHOTK EXPORT_SYMBOL(DBGDrvGetServiceTable); -module_init(dbgdrv_init_module); -module_exit(dbgdrv_cleanup_module); +#if !defined(SUPPORT_DRI_DRM) +subsys_initcall(dbgdrv_init); +module_exit(dbgdrv_cleanup); +#endif |