open-src/xserver/xorg/dri.patch
changeset 705 24ca414edbff
parent 704 f9b973ecc909
child 706 43bb5cf562a2
equal deleted inserted replaced
704:f9b973ecc909 705:24ca414edbff
     1 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
       
     2 # Use subject to license terms.
       
     3 #
       
     4 # Permission is hereby granted, free of charge, to any person obtaining a
       
     5 # copy of this software and associated documentation files (the
       
     6 # "Software"), to deal in the Software without restriction, including
       
     7 # without limitation the rights to use, copy, modify, merge, publish,
       
     8 # distribute, and/or sell copies of the Software, and to permit persons
       
     9 # to whom the Software is furnished to do so, provided that the above
       
    10 # copyright notice(s) and this permission notice appear in all copies of
       
    11 # the Software and that both the above copyright notice(s) and this
       
    12 # permission notice appear in supporting documentation.
       
    13 # 
       
    14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
       
    15 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
       
    16 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
       
    17 # OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
       
    18 # HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
       
    19 # INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
       
    20 # FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
       
    21 # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
       
    22 # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
       
    23 # 
       
    24 # Except as contained in this notice, the name of a copyright holder
       
    25 # shall not be used in advertising or otherwise to promote the sale, use
       
    26 # or other dealings in this Software without prior written authorization
       
    27 # of the copyright holder.
       
    28 
       
    29 diff -urp -x '*~' -x '*.orig' hw/xfree86/os-support/solaris/agpgart.h hw/xfree86/os-support/solaris/agpgart.h
       
    30 --- hw/xfree86/os-support/solaris/agpgart.h	2007-10-23 14:26:51.000000000 -0700
       
    31 +++ hw/xfree86/os-support/solaris/agpgart.h	2008-09-24 20:22:57.390291000 -0700
       
    32 @@ -23,7 +23,7 @@
       
    33   * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
       
    34   */
       
    35  /*
       
    36 - * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
       
    37 + * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
       
    38   *
       
    39   * Permission is hereby granted, free of charge, to any person obtaining a
       
    40   * copy of this software and associated documentation files (the
       
    41 @@ -54,7 +54,13 @@
       
    42  #ifndef	_AGPGART_H
       
    43  #define	_AGPGART_H
       
    44  
       
    45 -#pragma ident	"@(#)agpgart.h	1.1	05/04/04 SMI"
       
    46 +#pragma ident	"@(#)agpgart.h	1.2	06/10/25 SMI"
       
    47 +
       
    48 +#ifdef __cplusplus
       
    49 +extern "C" {
       
    50 +#endif
       
    51 +
       
    52 +#define	AGP_NORMAL	0	/* mapped to user land, no cache */
       
    53  
       
    54  typedef struct _agp_version {
       
    55  	uint16_t	agpv_major;
       
    56 @@ -80,7 +86,7 @@ typedef struct _agp_allocate {
       
    57  	int32_t		agpa_key;
       
    58  	uint32_t	agpa_pgcount;
       
    59  	uint32_t	agpa_type;
       
    60 -	uint32_t	agpa_physical;	/* for i810/830 driver */
       
    61 +	uint32_t	agpa_physical;	/* for i810 only, private */
       
    62  } agp_allocate_t;
       
    63  
       
    64  typedef struct _agp_bind {
       
    65 @@ -102,7 +108,46 @@ typedef struct _agp_unbind {
       
    66  #define	AGPIOC_DEALLOCATE	_IOW(AGPIOC_BASE, 5, int)
       
    67  #define	AGPIOC_BIND		_IOW(AGPIOC_BASE, 6, agp_bind_t)
       
    68  #define	AGPIOC_UNBIND		_IOW(AGPIOC_BASE, 7, agp_unbind_t)
       
    69 +#define	AGPIOC_IOREMAP		_IO(AGPIOC_BASE, 8)
       
    70 +#define	AGPIOC_IOREMAP_FREE	_IO(AGPIOC_BASE, 9)
       
    71 +#define	AGPIOC_READ		_IO(AGPIOC_BASE, 10)
       
    72 +#define	AGPIOC_WRITE		_IO(AGPIOC_BASE, 11)
       
    73 +
       
    74 +/* AGP status register bits definition */
       
    75 +#define	AGPSTAT_RQ_MASK		0xff000000	/* target only */
       
    76 +#define	AGPSTAT_SBA		(0x1 << 9)	/* always 1 for 3.0 */
       
    77 +#define	AGPSTAT_OVER4G		(0x1 << 5)
       
    78 +#define	AGPSTAT_FW		(0x1 << 4)
       
    79 +#define	AGPSTAT_RATE_MASK	0x7
       
    80 +/* rate for 2.0 mode */
       
    81 +#define	AGP2_RATE_1X		0x1
       
    82 +#define	AGP2_RATE_2X		0x2
       
    83 +#define	AGP2_RATE_4X		0x4
       
    84 +/* AGP 3.0 only bits */
       
    85 +#define	AGPSTAT_ARQSZ_MASK	(0x7 << 13)	/* target only */
       
    86 +#define	AGPSTAT_CAL_MASK	(0x7 << 10)
       
    87 +#define	AGPSTAT_GART64B		(0x1 << 7)	/* target only */
       
    88 +#define	AGPSTAT_MODE3		(0x1 << 3)
       
    89 +/* Rate for 3.0 mode */
       
    90 +#define	AGP3_RATE_4X		0x1
       
    91 +#define	AGP3_RATE_8X		0x2
       
    92 +
       
    93 +/* AGP command register bits definition */
       
    94 +#define	AGPCMD_RQ_MASK		0xff000000	/* master only */
       
    95 +#define	AGPCMD_SBAEN		(0x1 << 9)	/* must be 1 for 3.0 */
       
    96 +#define	AGPCMD_AGPEN		(0x1 << 8)
       
    97 +#define	AGPCMD_OVER4GEN		(0x1 << 5)
       
    98 +#define	AGPCMD_FWEN		(0x1 << 4)
       
    99 +#define	AGPCMD_RATE_MASK	0x7
       
   100 +/* AGP 3.0 only bits */
       
   101 +#define	AGP3_CMD_ARQSZ_MASK	(0x7 << 13)	/* master only */
       
   102 +#define	AGP3_CMD_CAL_MASK	(0x7 << 10)	/* target only */
       
   103 +#define	AGP3_CMD_GART64BEN	(0x1 << 7)	/* target only */
       
   104  
       
   105  #define	AGP_DEVICE	"/dev/agpgart"
       
   106  
       
   107 +#ifdef __cplusplus
       
   108 +}
       
   109 +#endif
       
   110 +
       
   111  #endif /* _AGPGART_H */