Commit Graph

26 Commits

Author SHA1 Message Date
tron e583f5d9f4 Don't match a PCI graphics card in a system which supports an AGP.
Patch supplied by Quentin Garnier in PR kern/19256.
2003-02-24 21:56:00 +00:00
thorpej b193480908 Add extensible malloc types, adapted from FreeBSD. This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
2003-02-01 06:23:35 +00:00
thorpej 7ec10e2d99 Use aprint_*(). 2003-01-31 00:07:39 +00:00
scw 173ca7d4d0 Add support for i830/i845 agp. From Shingo WATANABE (on tech-x11) and
FreeBSD, with cleanup/KNF by me.

Note: These chipsets are not well supported by the i810 driver in
NetBSD's in-tree xsrc (based on XFree86 4.2.1 at this time). However,
the driver works perfectly using bleeding-edge XFree86-current on my
Omnibook's i830MG with these agp changes.
2002-12-13 11:32:50 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
thorpej 9b2c2ec24d Add trailing ; to CFATTACH_DECL. 2002-10-02 16:50:59 +00:00
thorpej 387fc6dc87 Use CFATTACH_DECL(). 2002-09-30 20:37:04 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
nathanw 4b6782ddb3 Slight wording cleanup in a comment. 2002-09-19 19:04:50 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
drochner 29c16c72fb -avoid lock leak in error case
-Free AGP memory on close, to avoid a memory leak in case
 the X server doesn't free it explicitely.
 (It appears that the X server never calls AGPIOC_DEALLOCATE.)
 Fixes PR kern/17869 by Emmanuel Dreyfus.
2002-08-11 12:40:47 +00:00
drochner 3825b247fb Only allow the bus_dmamem_alloc() code to sleep if no physically contigous
pages are insisted in.
Atm, the pglistalloc code does the same automatically, but this might change.
2002-06-27 18:37:10 +00:00
augustss fd7f5e11ae Don't pretend we can handle i830; it needs a somewhat different AGP driver.
(I added i830 to quickly.)
2002-01-22 17:29:36 +00:00
augustss 916552082d Add i830M to agp chip tables. 2002-01-14 01:38:25 +00:00
lukem 9048aaae21 add RCSID 2001-11-13 07:48:40 +00:00
fvdl 9706e581b2 Don't map the aperture into KVA, it isn't needed. 2001-10-01 21:54:48 +00:00
thorpej 75fc05bc1e agp_generic_bind_memory(): Don't return NULL if we can't malloc
memory, return ENOMEM.
2001-09-16 18:33:08 +00:00
thorpej 02951c2ac6 agpopen(): check for NULL softc before dereferencing it. 2001-09-15 18:03:35 +00:00
drochner 9ac7c1121f normalize error message if agp_map_aperture() fails 2001-09-15 13:01:44 +00:00
thorpej e3d4f375aa Give each AGP controller its own attribute, and let the "agpbus"
device (rather, the device that carries that attribute) also
carry one or more attributes indicating which type of controller
it might be.

This will allow systems that might have AGP, but would never have
e.g. an Intel PCI-Host bridge, to trim out code that won't be used.
2001-09-15 01:32:10 +00:00
thorpej c1e6d1c91f Use bus_space_mmap() to mmap the aperture. 2001-09-15 00:52:15 +00:00
thorpej 0019ea5ce6 Clean up the AGP match/attach code somewhat. 2001-09-15 00:24:59 +00:00
drochner 9771bc6656 -plug some resource leaks
-don't clear memory ranges on "release"

The X server survives a screen switch now.
2001-09-14 12:09:14 +00:00
drochner e52f69d4e2 -allocate DMA maps as large as necessary in the worst case
-allocate space for DMA segments as much as necessary
-fix format warnings in a debug output
-don't try to access AGP capability stuff in the PCI config header
 if it doesn't exist (as on the i810)
2001-09-13 16:14:16 +00:00
fvdl 71fb506f0b Fix i810/other intel chipsets attach mishap. 2001-09-11 06:51:47 +00:00
fvdl a3130cfbe2 AGP GART support code. Originally written by Doug Rabson for FreeBSD,
modifications to fit it into the NetBSD device/config structure and
to use bus_dma by me.
2001-09-10 10:01:00 +00:00