summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-04-27 20:23:53 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-04-27 21:08:35 -0700
commit2a2a7fa6856b2e1954e904577535118f20cd9133 (patch)
treeac60f5e005ae4ef8cc4cec2301a2b7b23b18b4e8
parent707af5f8c5fae3b6c4c5125a91917667bb0ab908 (diff)
Solaris: use <sys/agpgart.h> instead of stale copy in Xorg sources
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-rw-r--r--configure.ac2
-rw-r--r--hw/xfree86/os-support/solaris/Makefile.am11
-rw-r--r--hw/xfree86/os-support/solaris/agpgart.h108
-rw-r--r--hw/xfree86/os-support/solaris/sun_agp.c7
4 files changed, 7 insertions, 121 deletions
diff --git a/configure.ac b/configure.ac
index 9eadabced..438ee0899 100644
--- a/configure.ac
+++ b/configure.ac
@@ -222,7 +222,7 @@ AC_CHECK_LIB(m, cbrt, AC_DEFINE(HAVE_CBRT, 1, [Have the 'cbrt' function]))
AC_CHECK_HEADERS([ndbm.h dbm.h rpcsvc/dbm.h])
dnl AGPGART headers
-AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h], AGP=yes)
+AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h sys/agpgart.h], AGP=yes)
AM_CONDITIONAL(AGP, [test "x$AGP" = xyes])
dnl APM header
diff --git a/hw/xfree86/os-support/solaris/Makefile.am b/hw/xfree86/os-support/solaris/Makefile.am
index bcb987490..4496ee122 100644
--- a/hw/xfree86/os-support/solaris/Makefile.am
+++ b/hw/xfree86/os-support/solaris/Makefile.am
@@ -4,12 +4,11 @@ else
VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c
endif
-# TODO: Don't build agpgart on SPARC
-#if defined(i386Architecture) || defined(AMD64Architecture)
+if AGP
AGP_SRC = sun_agp.c
-#else
-#AGP_SRC = $(srcdir)/../shared/agp_noop.c
-#endif
+else
+AGP_SRC = $(srcdir)/../shared/agp_noop.c
+endif
SOLARIS_INOUT_SRC = solaris-@SOLARIS_INOUT_ARCH@.S
DISTCLEANFILES = solaris-@SOLARIS_INOUT_ARCH@.il
@@ -28,7 +27,7 @@ libsolaris_la_SOURCES = sun_init.c \
$(VTSW_SRC)
nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC)
-sdk_HEADERS = agpgart.h
+sdk_HEADERS =
nodist_sdk_HEADERS = solaris-@SOLARIS_INOUT_ARCH@.il
AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
diff --git a/hw/xfree86/os-support/solaris/agpgart.h b/hw/xfree86/os-support/solaris/agpgart.h
deleted file mode 100644
index 566de8046..000000000
--- a/hw/xfree86/os-support/solaris/agpgart.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * AGPGART module version 0.99
- * Copyright (C) 1999 Jeff Hartmann
- * Copyright (C) 1999 Precision Insight, Inc.
- * Copyright (C) 1999 Xi Graphics, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * JEFF HARTMANN, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, and/or sell copies of the Software, and to permit persons
- * to whom the Software is furnished to do so, provided that the above
- * copyright notice(s) and this permission notice appear in all copies of
- * the Software and that both the above copyright notice(s) and this
- * permission notice appear in supporting documentation.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
- * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
- * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
- * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
- * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Except as contained in this notice, the name of a copyright holder
- * shall not be used in advertising or otherwise to promote the sale, use
- * or other dealings in this Software without prior written authorization
- * of the copyright holder.
- */
-
-#ifndef _AGPGART_H
-#define _AGPGART_H
-
-#pragma ident "@(#)agpgart.h 1.1 05/04/04 SMI"
-
-typedef struct _agp_version {
- uint16_t agpv_major;
- uint16_t agpv_minor;
-} agp_version_t;
-
-typedef struct _agp_info {
- agp_version_t agpi_version;
- uint32_t agpi_devid; /* bridge vendor + device */
- uint32_t agpi_mode; /* mode of bridge */
- ulong_t agpi_aperbase; /* base of aperture */
- size_t agpi_apersize; /* aperture range size */
- uint32_t agpi_pgtotal; /* max number of pages in aperture */
- uint32_t agpi_pgsystem; /* same as pg_total */
- uint32_t agpi_pgused; /* NUMBER of currently used pages */
-} agp_info_t;
-
-typedef struct _agp_setup {
- uint32_t agps_mode;
-} agp_setup_t;
-
-typedef struct _agp_allocate {
- int32_t agpa_key;
- uint32_t agpa_pgcount;
- uint32_t agpa_type;
- uint32_t agpa_physical; /* for i810/830 driver */
-} agp_allocate_t;
-
-typedef struct _agp_bind {
- int32_t agpb_key;
- uint32_t agpb_pgstart;
-} agp_bind_t;
-
-typedef struct _agp_unbind {
- int32_t agpu_key;
- uint32_t agpu_pri; /* no use in solaris */
-} agp_unbind_t;
-
-#define AGPIOC_BASE 'G'
-#define AGPIOC_INFO _IOR(AGPIOC_BASE, 0, 100)
-#define AGPIOC_ACQUIRE _IO(AGPIOC_BASE, 1)
-#define AGPIOC_RELEASE _IO(AGPIOC_BASE, 2)
-#define AGPIOC_SETUP _IOW(AGPIOC_BASE, 3, agp_setup_t)
-#define AGPIOC_ALLOCATE _IOWR(AGPIOC_BASE, 4, agp_allocate_t)
-#define AGPIOC_DEALLOCATE _IOW(AGPIOC_BASE, 5, int)
-#define AGPIOC_BIND _IOW(AGPIOC_BASE, 6, agp_bind_t)
-#define AGPIOC_UNBIND _IOW(AGPIOC_BASE, 7, agp_unbind_t)
-
-#define AGP_DEVICE "/dev/agpgart"
-
-#endif /* _AGPGART_H */
diff --git a/hw/xfree86/os-support/solaris/sun_agp.c b/hw/xfree86/os-support/solaris/sun_agp.c
index d151bf611..376f98edd 100644
--- a/hw/xfree86/os-support/solaris/sun_agp.c
+++ b/hw/xfree86/os-support/solaris/sun_agp.c
@@ -34,8 +34,6 @@
* of the copyright holder.
*/
-#pragma ident "@(#)sun_agp.c 1.1 05/04/04 SMI"
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
@@ -49,11 +47,8 @@
#include <sys/ioccom.h>
#include <sys/types.h>
#include <fcntl.h>
-#include "agpgart.h"
+#include <sys/agpgart.h>
-#ifndef AGP_DEVICE
-#define AGP_DEVICE "/dev/agpgart"
-#endif
/* AGP page size is independent of the host page size. */
#ifndef AGP_PAGE_SIZE
#define AGP_PAGE_SIZE 4096