103b705cfSriastradh 203b705cfSriastradh/************************************************************************** 303b705cfSriastradh 403b705cfSriastradhCopyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. 503b705cfSriastradhCopyright © 2002 David Dawes 603b705cfSriastradh 703b705cfSriastradhAll Rights Reserved. 803b705cfSriastradh 903b705cfSriastradhPermission is hereby granted, free of charge, to any person obtaining a 1003b705cfSriastradhcopy of this software and associated documentation files (the 1103b705cfSriastradh"Software"), to deal in the Software without restriction, including 1203b705cfSriastradhwithout limitation the rights to use, copy, modify, merge, publish, 1303b705cfSriastradhdistribute, sub license, and/or sell copies of the Software, and to 1403b705cfSriastradhpermit persons to whom the Software is furnished to do so, subject to 1503b705cfSriastradhthe following conditions: 1603b705cfSriastradh 1703b705cfSriastradhThe above copyright notice and this permission notice (including the 1803b705cfSriastradhnext paragraph) shall be included in all copies or substantial portions 1903b705cfSriastradhof the Software. 2003b705cfSriastradh 2103b705cfSriastradhTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 2203b705cfSriastradhOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2303b705cfSriastradhMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 2403b705cfSriastradhIN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 2503b705cfSriastradhANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 2603b705cfSriastradhTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 2703b705cfSriastradhSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2803b705cfSriastradh 2903b705cfSriastradh**************************************************************************/ 3003b705cfSriastradh 3103b705cfSriastradh/* 3203b705cfSriastradh * Authors: 3303b705cfSriastradh * Keith Whitwell <keith@tungstengraphics.com> 3403b705cfSriastradh * David Dawes <dawes@xfree86.org> 3503b705cfSriastradh * 3603b705cfSriastradh */ 3703b705cfSriastradh 3803b705cfSriastradh#ifndef _INTEL_COMMON_H_ 3903b705cfSriastradh#define _INTEL_COMMON_H_ 4003b705cfSriastradh 4103b705cfSriastradh#include <xf86.h> 4203b705cfSriastradh 4303b705cfSriastradh/* Provide substitutes for gcc's __FUNCTION__ on other compilers */ 4403b705cfSriastradh#if !defined(__GNUC__) && !defined(__FUNCTION__) 4503b705cfSriastradh# if defined(__STDC__) && (__STDC_VERSION__>=199901L) /* C99 */ 4603b705cfSriastradh# define __FUNCTION__ __func__ 4703b705cfSriastradh# else 4803b705cfSriastradh# define __FUNCTION__ "" 4903b705cfSriastradh# endif 5003b705cfSriastradh#endif 5103b705cfSriastradh 5203b705cfSriastradh#define PFX __FILE__,__LINE__,__FUNCTION__ 5303b705cfSriastradh#define FUNCTION_NAME __FUNCTION__ 5403b705cfSriastradh 5503b705cfSriastradh#define KB(x) ((x) * 1024) 5603b705cfSriastradh#define MB(x) ((x) * KB(1024)) 5703b705cfSriastradh 5803b705cfSriastradh/** 5903b705cfSriastradh * Hints to CreatePixmap to tell the driver how the pixmap is going to be 6003b705cfSriastradh * used. 6103b705cfSriastradh * 6203b705cfSriastradh * Compare to CREATE_PIXMAP_USAGE_* in the server. 6303b705cfSriastradh */ 6403b705cfSriastradhenum { 6503b705cfSriastradh INTEL_CREATE_PIXMAP_TILING_X = 0x10000000, 6603b705cfSriastradh INTEL_CREATE_PIXMAP_TILING_Y = 0x20000000, 6703b705cfSriastradh INTEL_CREATE_PIXMAP_TILING_NONE = 0x40000000, 6803b705cfSriastradh INTEL_CREATE_PIXMAP_DRI2 = 0x80000000, 6903b705cfSriastradh}; 7003b705cfSriastradh 7103b705cfSriastradh#endif /* _INTEL_COMMON_H_ */ 72