1 /*************************************************************************/ /*!
3 @Title Services cache management header
4 @Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
5 @Description Defines for cache management which are visible internally
7 @License Dual MIT/GPLv2
9 The contents of this file are subject to the MIT license as set out below.
11 Permission is hereby granted, free of charge, to any person obtaining a copy
12 of this software and associated documentation files (the "Software"), to deal
13 in the Software without restriction, including without limitation the rights
14 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 copies of the Software, and to permit persons to whom the Software is
16 furnished to do so, subject to the following conditions:
18 The above copyright notice and this permission notice shall be included in
19 all copies or substantial portions of the Software.
21 Alternatively, the contents of this file may be used under the terms of
22 the GNU General Public License Version 2 ("GPL") in which case the provisions
23 of GPL are applicable instead of those above.
25 If you wish to allow use of your version of this file only under the terms of
26 GPL, and not to allow others to use your version of this file under the terms
27 of the MIT license, indicate your decision by deleting the provisions above
28 and replace them with the notice and other provisions required by GPL as set
29 out in the file called "GPL-COPYING" included in this distribution. If you do
30 not delete the provisions above, a recipient may use your version of this file
31 under the terms of either the MIT license or GPL.
33 This License is also included in this distribution in the file called
36 EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
37 PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
38 BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
39 PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
40 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
41 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
42 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
43 */ /**************************************************************************/
45 #ifndef _CACHE_EXTERNAL_H_
46 #define _CACHE_EXTERNAL_H_
47 #include "img_types.h"
49 typedef IMG_UINT32 PVRSRV_CACHE_OP;
51 #define PVRSRV_CACHE_OP_NONE 0x0 /*!< No operation */
52 #define PVRSRV_CACHE_OP_CLEAN 0x1 /*!< Flush w/o invalidate */
53 #define PVRSRV_CACHE_OP_INVALIDATE 0x2 /*!< Invalidate w/o flush */
54 #define PVRSRV_CACHE_OP_FLUSH 0x3 /*!< Flush w/ invalidate */
57 If we get multiple cache operations before the operation which will
58 trigger the operation to happen then we need to make sure we do
61 Note: PVRSRV_CACHE_OP_INVALIDATE should never be passed into here
63 #ifdef INLINE_IS_PRAGMA
64 #pragma inline(SetCacheOp)
66 static INLINE PVRSRV_CACHE_OP SetCacheOp(PVRSRV_CACHE_OP uiCurrent,
67 PVRSRV_CACHE_OP uiNew)
69 PVRSRV_CACHE_OP uiRet;
71 uiRet = uiCurrent | uiNew;
75 #endif /* _CACHE_EXTERNAL_H_ */