Print this page
4023 - Typo in file(1) manpage and various others
   1 '\" te
   2 .\" Copyright (c) 2008, Sun Microsystems, Inc.  All Rights Reserved
   3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6 .TH AGPGART_IO 7I "Sep 25, 2008"
   7 .SH NAME
   8 agpgart_io \- Solaris agpgart driver I/O control operations
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 #include <sys/agpgart.h>
  13 .fi
  14 
  15 .SH DESCRIPTION
  16 .sp
  17 .LP
  18 The Accelerated Graphics Port (AGP) is a PCI bus technology enhancement that
  19 improves 3D graphics performance by using low-cost system memory. AGP chipsets
  20 use the Graphics Address Remapping Table (GART) to map discontiguous system
  21 memory into a contiguous PCI memory range (known as the AGP Aperture), enabling
  22 the graphics card to utilize the mapped aperture range as video memory.
  23 .sp
  24 .LP
  25 The \fBagpgart\fR driver creates a pseudo device node at \fB/dev/agpgart\fR and
  26 provides a set of ioctls for managing  allocation/deallocation of system


 762 
 763 int main(int argc, char *argv[])
 764 {
 765         int fd, ret;
 766         agp_allocate_t alloc;
 767         agp_bind_t bindinfo;
 768         agp_info_t agpinfo;
 769         agp_setup_t modesetup;
 770         int *p = NULL;
 771         off_t mapoff;
 772         size_t maplen;
 773 
 774         if((fd = open(AGP_DEVICE, O_RDWR))== -1) {
 775                 printf("open AGP_DEVICE error with %d\en", errno);\e
 776                 exit(-1);
 777         }
 778         printf("device opened\en");
 779 
 780         ret = ioctl(fd, AGPIOC_INFO, &agpinfo);
 781         if(ret == -1) {
 782                 printf("Get info error %d\n", errno);
 783                 exit(-1);
 784         }
 785         printf("AGPSTAT is %x\en", agpinfo.agpi_mode);
 786         printf("APBASE is %x\en", agpinfo.agpi_aperbase);
 787         printf("APSIZE is %dMB\en", agpinfo.agpi_apersize);
 788         printf("pg_total is %d\en", agpinfo.agpi_pgtotal);
 789 
 790         ret = ioctl(fd, AGPIOC_ACQUIRE);
 791         if(ret == -1) {
 792                 printf(" Acquire GART error %d\en", errno);
 793                 exit(-1);
 794         }
 795 
 796         modesetup.agps_mode = agpinfo.agpi_mode;
 797         ret = ioctl(fd, AGPIOC_SETUP, &modesetup);
 798         if(ret == -1) {
 799                 printf("set up AGP mode error\en", errno);
 800                 exit(-1);
 801         }
 802 


   1 '\" te
   2 .\" Copyright (c) 2008, Sun Microsystems, Inc.  All Rights Reserved
   3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6 .TH AGPGART_IO 7I "Sep 10, 2013"
   7 .SH NAME
   8 agpgart_io \- Solaris agpgart driver I/O control operations
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 #include <sys/agpgart.h>
  13 .fi
  14 
  15 .SH DESCRIPTION
  16 .sp
  17 .LP
  18 The Accelerated Graphics Port (AGP) is a PCI bus technology enhancement that
  19 improves 3D graphics performance by using low-cost system memory. AGP chipsets
  20 use the Graphics Address Remapping Table (GART) to map discontiguous system
  21 memory into a contiguous PCI memory range (known as the AGP Aperture), enabling
  22 the graphics card to utilize the mapped aperture range as video memory.
  23 .sp
  24 .LP
  25 The \fBagpgart\fR driver creates a pseudo device node at \fB/dev/agpgart\fR and
  26 provides a set of ioctls for managing  allocation/deallocation of system


 762 
 763 int main(int argc, char *argv[])
 764 {
 765         int fd, ret;
 766         agp_allocate_t alloc;
 767         agp_bind_t bindinfo;
 768         agp_info_t agpinfo;
 769         agp_setup_t modesetup;
 770         int *p = NULL;
 771         off_t mapoff;
 772         size_t maplen;
 773 
 774         if((fd = open(AGP_DEVICE, O_RDWR))== -1) {
 775                 printf("open AGP_DEVICE error with %d\en", errno);\e
 776                 exit(-1);
 777         }
 778         printf("device opened\en");
 779 
 780         ret = ioctl(fd, AGPIOC_INFO, &agpinfo);
 781         if(ret == -1) {
 782                 printf("Get info error %d\en", errno);
 783                 exit(-1);
 784         }
 785         printf("AGPSTAT is %x\en", agpinfo.agpi_mode);
 786         printf("APBASE is %x\en", agpinfo.agpi_aperbase);
 787         printf("APSIZE is %dMB\en", agpinfo.agpi_apersize);
 788         printf("pg_total is %d\en", agpinfo.agpi_pgtotal);
 789 
 790         ret = ioctl(fd, AGPIOC_ACQUIRE);
 791         if(ret == -1) {
 792                 printf(" Acquire GART error %d\en", errno);
 793                 exit(-1);
 794         }
 795 
 796         modesetup.agps_mode = agpinfo.agpi_mode;
 797         ret = ioctl(fd, AGPIOC_SETUP, &modesetup);
 798         if(ret == -1) {
 799                 printf("set up AGP mode error\en", errno);
 800                 exit(-1);
 801         }
 802