Unix/Linux Go Back    

Plan 9 - man page for vga (plan9 section 3)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

VGA(3)											   VGA(3)

       vga - VGA controller device

       bind #v /dev


       The  VGA device allows configuration of a graphics controller on a PC.  Vgactl allows con-
       trol over higher-level settings such as display height, width, depth, controller and hard-
       ware-cursor  type.   Vgaiob, vgaiow and vgaiol allow control over individual 8-bit, 16-bit
       and 32-bit x86 I/O-ports respectively, such as those used to implement  configuration  and
       setup  registers  on  a	VGA controller card.  These functions are normally carried out by

       Writes to vgactl are of the form `attribute value'.  Valid attributes are

       size   value is 'XxYxZ' , where X, Y and Z are numbers that tell the kernel the width  and
	      height of the screen in pixels and the number of bits per pixel.

       type   tells  the kernel which type of controller is being used, mainly to enable the cor-
	      rect code for display-memory bank switching at resolutions greater than  640x480x1.
	      The names vga, clgd542x, et4000, mach32, and s3 are supported for value.

	      Note  that  this	list  does  not indicate the full set of VGA chips supported. For
	      example, s3 includes the 86C801/5, 86C928, Vision864, and Vision964.  It is the job
	      of  vga(8)  to  recognize  which particular chip is being used and to initialize it

       hwgc   tells the kernel to use a particular type of hardware graphics cursor.   Bt485hwgc,
	      et4000hwgc,  s3hwgc  and	tvp3020hwgc, are currently recognized values.  A value of
	      off reverts to using the software cursor.

       Reading vgactl returns the current settings, one per line.

       The following reverts to using the software graphics cursor

	    echo -n 'hwgc off' >/dev/vgactl

       Sample code to read an x86 8-bit I/O port

	    inportb(long port)
		 uchar data;

		 if(iobfd == -1)
		      iobfd = open("#v/vgaiob", ORDWR);

		 seek(iobfd, port, 0);
		 if(read(iobfd, &data, sizeof(data)) != sizeof(data))
		      error("inportb(0x%4.4x): %r0, port);
		 return data;



       There should be some restriction on the range of valid ports.

       There should be support for the hardware graphics cursor on the clgd54[23]x VGA controller

       The hardware graphics cursor on the et4000 does not work in 2x8-bit mode.

Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 07:20 PM.