~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/gpu/pvr/img_defs.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**********************************************************************
 
2
 *
 
3
 * Copyright (C) Imagination Technologies Ltd. All rights reserved.
 
4
 * 
 
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,
 
7
 * version 2, as published by the Free Software Foundation.
 
8
 * 
 
9
 * This program is distributed in the hope it will be useful but, except 
 
10
 * as otherwise stated in writing, without any warranty; without even the 
 
11
 * implied warranty of merchantability or fitness for a particular purpose. 
 
12
 * See the GNU General Public License for more details.
 
13
 * 
 
14
 * You should have received a copy of the GNU General Public License along with
 
15
 * this program; if not, write to the Free Software Foundation, Inc.,
 
16
 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
 
17
 * 
 
18
 * The full GNU General Public License is included in this distribution in
 
19
 * the file called "COPYING".
 
20
 *
 
21
 * Contact Information:
 
22
 * Imagination Technologies Ltd. <gpl-support@imgtec.com>
 
23
 * Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK 
 
24
 *
 
25
 ******************************************************************************/
 
26
 
 
27
#if !defined (__IMG_DEFS_H__)
 
28
#define __IMG_DEFS_H__
 
29
 
 
30
#include "img_types.h"
 
31
 
 
32
typedef         enum    img_tag_TriStateSwitch
 
33
{
 
34
        IMG_ON          =       0x00,
 
35
        IMG_OFF,
 
36
        IMG_IGNORE
 
37
 
 
38
} img_TriStateSwitch, * img_pTriStateSwitch;
 
39
 
 
40
#define         IMG_SUCCESS                             0
 
41
 
 
42
#define         IMG_NO_REG                              1
 
43
 
 
44
#if defined (NO_INLINE_FUNCS)
 
45
        #define INLINE
 
46
        #define FORCE_INLINE
 
47
#else
 
48
#if defined (__cplusplus)
 
49
        #define INLINE                                  inline
 
50
        #define FORCE_INLINE                    inline
 
51
#else
 
52
#if     !defined(INLINE)
 
53
        #define INLINE                                  __inline
 
54
#endif
 
55
        #define FORCE_INLINE                    static __inline
 
56
#endif
 
57
#endif
 
58
 
 
59
 
 
60
#ifndef PVR_UNREFERENCED_PARAMETER
 
61
#define PVR_UNREFERENCED_PARAMETER(param) (param) = (param)
 
62
#endif
 
63
 
 
64
#ifdef __GNUC__
 
65
#define unref__ __attribute__ ((unused))
 
66
#else
 
67
#define unref__
 
68
#endif
 
69
 
 
70
#ifndef _TCHAR_DEFINED
 
71
#if defined(UNICODE)
 
72
typedef unsigned short          TCHAR, *PTCHAR, *PTSTR;
 
73
#else   
 
74
typedef char                            TCHAR, *PTCHAR, *PTSTR;
 
75
#endif  
 
76
#define _TCHAR_DEFINED
 
77
#endif 
 
78
 
 
79
 
 
80
                        #if defined(__linux__) || defined(__METAG)
 
81
 
 
82
                                #define IMG_CALLCONV
 
83
                                #define IMG_INTERNAL    __attribute__((visibility("hidden")))
 
84
                                #define IMG_EXPORT              __attribute__((visibility("default")))
 
85
                                #define IMG_IMPORT
 
86
                                #define IMG_RESTRICT    __restrict__
 
87
 
 
88
                        #else
 
89
                                        #error("define an OS")
 
90
                        #endif
 
91
 
 
92
#ifndef IMG_ABORT
 
93
        #define IMG_ABORT()     abort()
 
94
#endif
 
95
 
 
96
#ifndef IMG_MALLOC
 
97
        #define IMG_MALLOC(A)           malloc  (A)
 
98
#endif
 
99
 
 
100
#ifndef IMG_FREE
 
101
        #define IMG_FREE(A)                     free    (A)
 
102
#endif
 
103
 
 
104
#define IMG_CONST const
 
105
 
 
106
#if defined(__GNUC__)
 
107
#define IMG_FORMAT_PRINTF(x,y)          __attribute__((format(printf,x,y)))
 
108
#else
 
109
#define IMG_FORMAT_PRINTF(x,y)
 
110
#endif
 
111
 
 
112
#define  CLEANUP_WITH_POLL              IMG_FALSE
 
113
#define  FORCE_CLEANUP                  IMG_TRUE
 
114
 
 
115
#if defined (_WIN64)
 
116
#define IMG_UNDEF       (~0ULL)
 
117
#else
 
118
#define IMG_UNDEF       (~0UL)
 
119
#endif
 
120
 
 
121
#endif