diff options
Diffstat (limited to 'usr/src/uts/common')
| -rw-r--r-- | usr/src/uts/common/sys/Makefile | 18 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/THIRDPARTYLICENSE.agpgart | 1 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/agp/agpdefs.h | 19 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/agp/agpgart_impl.h | 1 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/agp/agpmaster_io.h | 7 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/agp/agptarget_io.h | 2 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/agpgart.h | 24 |
7 files changed, 56 insertions, 16 deletions
diff --git a/usr/src/uts/common/sys/Makefile b/usr/src/uts/common/sys/Makefile index 40ba9fb..c43bcf2 100644 --- a/usr/src/uts/common/sys/Makefile +++ b/usr/src/uts/common/sys/Makefile @@ -34,7 +34,15 @@ FILEMODE=644 # unix_bb_info.h: Private interface to kcov # -i386_HDRS= +i386_HDRS= \ + agp/agpamd64gart_io.h \ + agp/agpdefs.h \ + agp/agpgart_impl.h \ + agp/agpmaster_io.h \ + agp/agptarget_io.h \ + agpgart.h \ + gfx_private.h + sparc_HDRS= # Generated headers @@ -49,7 +57,7 @@ HDRS= $(GENHDRS) $(CHKHDRS) # from Makefile.syshdrs ROOTDIR= $(ROOT)/usr/include/sys sparc_ROOTDIRS= -i386_ROOTDIRS= +i386_ROOTDIRS= $(ROOTDIR)/agp sparc_ROOTHDRS= i386_ROOTHDRS= @@ -61,9 +69,15 @@ ROOTHDRS= \ $($(MACH)_HDRS:%=$(ROOTDIR)/%) \ $(HDRS:%=$(ROOTDIR)/%) +agp/%.check: agp/%.h + $(DOT_H_CHECK) + $(ROOTDIR)/%: % $(INS.file) +$(ROOTDIR)/agp/%: agp/% + $(INS.file) + $(ROOTDIRS): $(INS.dir) diff --git a/usr/src/uts/common/sys/THIRDPARTYLICENSE.agpgart b/usr/src/uts/common/sys/THIRDPARTYLICENSE.agpgart index 3bcf0d3..8bf5829 100644 --- a/usr/src/uts/common/sys/THIRDPARTYLICENSE.agpgart +++ b/usr/src/uts/common/sys/THIRDPARTYLICENSE.agpgart @@ -1,4 +1,5 @@ * Copyright (c) 2000 Doug Rabson + * Copyright (c) 2009, Intel Corporation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/usr/src/uts/common/sys/agp/agpdefs.h b/usr/src/uts/common/sys/agp/agpdefs.h index adda870..3d7caa5 100644 --- a/usr/src/uts/common/sys/agp/agpdefs.h +++ b/usr/src/uts/common/sys/agp/agpdefs.h @@ -187,14 +187,16 @@ extern "C" { #define INTEL_IGD_B43 0x2e428086 /* Intel 915 and 945 series */ -#define IS_INTEL_915(device) ((device == INTEL_IGD_915) || \ +#define IS_INTEL_915(device) ( \ + (device == INTEL_IGD_915) || \ (device == INTEL_IGD_915GM) || \ (device == INTEL_IGD_945) || \ (device == INTEL_IGD_945GM) || \ (device == INTEL_IGD_945GME)) /* Intel 965 series */ -#define IS_INTEL_965(device) ((device == INTEL_IGD_946GZ) || \ +#define IS_INTEL_965(device) ( \ + (device == INTEL_IGD_946GZ) || \ (device == INTEL_IGD_965G1) || \ (device == INTEL_IGD_965Q) || \ (device == INTEL_IGD_965G2) || \ @@ -204,20 +206,23 @@ extern "C" { IS_INTEL_G4X(device)) /* Intel G33 series */ -#define IS_INTEL_X33(device) ((device == INTEL_IGD_Q35) || \ +#define IS_INTEL_X33(device) ( \ + (device == INTEL_IGD_Q35) || \ (device == INTEL_IGD_G33) || \ (device == INTEL_IGD_Q33)) /* IGDNG */ -#define IS_IGDNG(device) ((device == INTEL_IGD_IGDNG_D) || \ - (device == INTEL_IGD_IGDNG_M)) +#define IS_INTEL_IGDNG(device) ( \ + (device == INTEL_IGD_IGDNG_D) || \ + (device == INTEL_IGD_IGDNG_M)) /* Intel G4X series */ -#define IS_INTEL_G4X(device) ((device == INTEL_IGD_EL) || \ +#define IS_INTEL_G4X(device) ( \ + (device == INTEL_IGD_EL) || \ (device == INTEL_IGD_Q45) || \ (device == INTEL_IGD_G45) || \ (device == INTEL_IGD_G41) || \ - IS_IGDNG(device) || \ + IS_INTEL_IGDNG(device) || \ (device == INTEL_IGD_B43)) /* register offsets in PCI config space */ diff --git a/usr/src/uts/common/sys/agp/agpgart_impl.h b/usr/src/uts/common/sys/agp/agpgart_impl.h index a8f5b6b..5c93eb7 100644 --- a/usr/src/uts/common/sys/agp/agpgart_impl.h +++ b/usr/src/uts/common/sys/agp/agpgart_impl.h @@ -156,7 +156,6 @@ typedef struct agpgart_softstate { /* all registered agp device in here */ agp_registered_dev_t asoft_devreg; kstat_t *asoft_ksp; - struct list_head mapped_list; } agpgart_softstate_t; typedef struct agpgart_ctx { diff --git a/usr/src/uts/common/sys/agp/agpmaster_io.h b/usr/src/uts/common/sys/agp/agpmaster_io.h index 1202e76..e492fae 100644 --- a/usr/src/uts/common/sys/agp/agpmaster_io.h +++ b/usr/src/uts/common/sys/agp/agpmaster_io.h @@ -48,16 +48,21 @@ extern "C" { #define I810_SET_GTT_BASE _IOW(AGPMASTERIOC_BASE, 12, uint32_t) #define I8XX_ADD2GTT _IOW(AGPMASTERIOC_BASE, 13, igd_gtt_seg_t) #define I8XX_REM_GTT _IOW(AGPMASTERIOC_BASE, 14, igd_gtt_seg_t) +#define I8XX_RW_GTT _IOW(AGPMASTERIOC_BASE, 15, igd_gtt_seg_t) #define I8XX_UNCONFIG _IO(AGPMASTERIOC_BASE, 16) #define AGP_MASTER_GETINFO _IOR(AGPMASTERIOC_BASE, 20, agp_info_t) #define AGP_MASTER_SETCMD _IOW(AGPMASTERIOC_BASE, 21, uint32_t) -/* used for IGD to bind/unbind gtt entries */ +/* + * used for IGD to bind/unbind gtt entries, and RW_GTT + */ typedef struct igd_gtt_seg { uint32_t igs_pgstart; uint32_t igs_npage; uint32_t *igs_phyaddr; /* pointer to address array */ uint32_t igs_type; /* reserved for other memory type */ + uint32_t igs_flags; + uint32_t igs_scratch; } igd_gtt_seg_t; /* used for IGD to get info */ diff --git a/usr/src/uts/common/sys/agp/agptarget_io.h b/usr/src/uts/common/sys/agp/agptarget_io.h index 316e2ab..c68e3d7 100644 --- a/usr/src/uts/common/sys/agp/agptarget_io.h +++ b/usr/src/uts/common/sys/agp/agptarget_io.h @@ -28,6 +28,8 @@ extern "C" { #define INTEL_CHIPSET_FLUSH_SETUP _IO(AGPTARGETIOC_BASE, 38) #define INTEL_CHIPSET_FLUSH _IO(AGPTARGETIOC_BASE, 39) #define INTEL_CHIPSET_FLUSH_FREE _IO(AGPTARGETIOC_BASE, 40) +#define AGP_TARGET_PCICONFIG_GET16 _IOWR(AGPTARGETIOC_BASE, 41, uint16_t) +#define AGP_TARGET_PCICONFIG_SET16 _IOW(AGPTARGETIOC_BASE, 42, uint32_t) /* Internal agp info struct */ typedef struct _i_agp_info { diff --git a/usr/src/uts/common/sys/agpgart.h b/usr/src/uts/common/sys/agpgart.h index c8770ae..cf25bf0 100644 --- a/usr/src/uts/common/sys/agpgart.h +++ b/usr/src/uts/common/sys/agpgart.h @@ -70,14 +70,16 @@ typedef struct _agp_allocate { typedef struct _agp_bind_pages { uint32_t agpb_pgstart; + uint32_t agpb_pgcount; pfn_t *agpb_pages; - unsigned long agpb_pgcount; + uint32_t agpb_type; /* AGP_USER_MEMORY */ } agp_bind_pages_t; typedef struct _agp_unbind_pages { - uint32_t agpb_pgstart; - unsigned long agpb_pgcount; - uint32_t agpb_type; + uint32_t agpu_pgstart; + uint32_t agpu_pgcount; + pfn_t agpu_scratch; + uint32_t agpu_flags; } agp_unbind_pages_t; typedef struct _agp_bind { @@ -90,6 +92,13 @@ typedef struct _agp_unbind { uint32_t agpu_pri; /* no use in solaris */ } agp_unbind_t; +typedef struct _agp_rw_gtt { + uint32_t agprw_pgstart; + uint32_t agprw_pgcount; + void *agprw_addr; /* buffer */ + uint32_t agprw_flags; /* 0:read, 1:write */ +} agp_rw_gtt_t; + #define AGPIOC_BASE 'G' #define AGPIOC_INFO _IOR(AGPIOC_BASE, 0, 100) #define AGPIOC_ACQUIRE _IO(AGPIOC_BASE, 1) @@ -106,7 +115,12 @@ typedef struct _agp_unbind { #define AGPIOC_FLUSHCHIPSET _IO(AGPIOC_BASE, 12) #define AGPIOC_PAGES_BIND _IOW(AGPIOC_BASE, 13, agp_bind_pages_t) #define AGPIOC_PAGES_UNBIND _IOW(AGPIOC_BASE, 14, agp_unbind_pages_t) -#define AGPIOC_PAGES_REBIND _IO(AGPIOC_BASE, 15) +#define AGPIOC_RW_GTT _IOW(AGPIOC_BASE, 15, agp_rw_gtt_t) + +/* AGP bind pages type values */ +#define AGP_USER_TYPES (1 << 16) +#define AGP_USER_MEMORY (AGP_USER_TYPES) +#define AGP_USER_CACHED_MEMORY (AGP_USER_TYPES + 1) /* AGP status register bits definition */ #define AGPSTAT_RQ_MASK 0xff000000 /* target only */ |
