History log of /freebsd-10.1-release/sys/dev/agp/
Revision Date Author Comments
272461 03-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


261455 04-Feb-2014 eadler

MFC r258779,r258780,r258787,r258822:

Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this
shifts into the sign bit. Instead use (1U << 31) which gets the
expected result.

Similar to the (1 << 31) case it is not defined to do (2 << 30).

This fix is not ideal as it assumes a 32 bit int, but does fix the issue
for most cases.

A similar change was made in OpenBSD.


256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


254649 22-Aug-2013 kib

Remove the deprecated VM_ALLOC_RETRY flag for the vm_page_grab(9).
The flag was mandatory since r209792, where vm_page_grab(9) was
changed to only support the alloc retry semantic.

Suggested and reviewed by: alc
Sponsored by: The FreeBSD Foundation


254138 09-Aug-2013 attilio

The soft and hard busy mechanism rely on the vm object lock to work.
Unify the 2 concept into a real, minimal, sxlock where the shared
acquisition represent the soft busy and the exclusive acquisition
represent the hard busy.
The old VPO_WANTED mechanism becames the hard-path for this new lock
and it becomes per-page rather than per-object.
The vm_object lock becames an interlock for this functionality:
it can be held in both read or write mode.
However, if the vm_object lock is held in read mode while acquiring
or releasing the busy state, the thread owner cannot make any
assumption on the busy state unless it is also busying it.

Also:
- Add a new flag to directly shared busy pages while vm_page_alloc
and vm_page_grab are being executed. This will be very helpful
once these functions happen under a read object lock.
- Move the swapping sleep into its own per-object flag

The KPI is heavilly changed this is why the version is bumped.
It is very likely that some VM ports users will need to change
their own code.

Sponsored by: EMC / Isilon storage division
Discussed with: alc
Reviewed by: jeff, kib
Tested by: gavin, bapt (older version)
Tested by: pho, scottl


248084 09-Mar-2013 attilio

Switch the vm_object mutex to be a rwlock. This will enable in the
future further optimizations where the vm_object lock will be held
in read mode most of the time the page cache resident pool of pages
are accessed for reading purposes.

The change is mostly mechanical but few notes are reported:
* The KPI changes as follow:
- VM_OBJECT_LOCK() -> VM_OBJECT_WLOCK()
- VM_OBJECT_TRYLOCK() -> VM_OBJECT_TRYWLOCK()
- VM_OBJECT_UNLOCK() -> VM_OBJECT_WUNLOCK()
- VM_OBJECT_LOCK_ASSERT(MA_OWNED) -> VM_OBJECT_ASSERT_WLOCKED()
(in order to avoid visibility of implementation details)
- The read-mode operations are added:
VM_OBJECT_RLOCK(), VM_OBJECT_TRYRLOCK(), VM_OBJECT_RUNLOCK(),
VM_OBJECT_ASSERT_RLOCKED(), VM_OBJECT_ASSERT_LOCKED()
* The vm/vm_pager.h namespace pollution avoidance (forcing requiring
sys/mutex.h in consumers directly to cater its inlining functions
using VM_OBJECT_LOCK()) imposes that all the vm/vm_pager.h
consumers now must include also sys/rwlock.h.
* zfs requires a quite convoluted fix to include FreeBSD rwlocks into
the compat layer because the name clash between FreeBSD and solaris
versions must be avoided.
At this purpose zfs redefines the vm_object locking functions
directly, isolating the FreeBSD components in specific compat stubs.

The KPI results heavilly broken by this commit. Thirdy part ports must
be updated accordingly (I can think off-hand of VirtualBox, for example).

Sponsored by: EMC / Isilon storage division
Reviewed by: jeff
Reviewed by: pjd (ZFS specific review)
Discussed with: alc
Tested by: pho


245976 27-Jan-2013 kib

Fix reversed condition in the logic to wait for the chipset buffers
flush wait on the Gen2 chipsets. Confirmed by the inspection of the
Linux agp code.

Submitted by: Taku YAMAMOTO <taku@tackymt.homeip.net>
MFC after: 2 weeks


244926 01-Jan-2013 antoine

Remove unneeded semicolons.

Reviewed by: md5 of the object files


244114 11-Dec-2012 bapt

Add pci id for the xeon hd4000 (IvyBridge server GT2)

Submitted by: François Tigeot <ftigeot@wolfpond.org>
Obtained from: dragonfly
MFC after: 3 days


243095 15-Nov-2012 eadler

Remove unneeded header from agp: opt_bus.h

Tested with "make universe"

Approved by: cperciva
MFC after: 1 week


241885 22-Oct-2012 eadler

This isn't functionally identical. In some cases a hint to disable
unit 0 would in fact disable all units.

This reverts r241856

Approved by: cperciva (implicit)


241856 22-Oct-2012 eadler

Now that device disabling is generic, remove extraneous code from the
device drivers that used to provide this feature.

Reviewed by: des
Approved by: cperciva
MFC after: 1 week


239065 05-Aug-2012 kib

After the PHYS_TO_VM_PAGE() function was de-inlined, the main reason
to pull vm_param.h was removed. Other big dependency of vm_page.h on
vm_param.h are PA_LOCK* definitions, which are only needed for
in-kernel code, because modules use KBI-safe functions to lock the
pages.

Stop including vm_param.h into vm_page.h. Include vm_param.h
explicitely for the kernel code which needs it.

Suggested and reviewed by: alc
MFC after: 2 weeks


238301 09-Jul-2012 marcel

Revert revision 238172 of agp_i810.c. Correctness is considered more
important than avoiding confusion.

Feedback from: kib, jhb


238172 06-Jul-2012 marcel

agp.c:
Don't use Maxmem when the amount of memory is meant. Use realmem instead.
Maxmem is not only a MD variable, it represents the highest physical memory
address in use. On systems where memory is sparsely layed-out the highest
memory address and the amount of memory are not interchangeable. Scaling the
AGP aperture based on the actual amount of memory (= realmem) rather than
the available memory (= physmem) makes sure there's consistent behaviour
across architectures.

agp_i810.c:
While arguably the use of Maxmem can be considered correct, replace its use
with realmem anyway. agp_i810.c is specific to amd64, i386 & pc98, which
have a dense physical memory layout. Avoiding Maxmem here is done with an
eye on copy-n-paste behaviour in general and to avoid confusion caused by
using realmem in agp.c and Maxmem in agp_i810.c.

In both cases, remove the inclusion of md_var.h


237484 23-Jun-2012 kib

Correct device id for GPU on some server SandyBridge model.

Submitted and tested by: Thomas Zander <thomas.e.zander googlemail com>
MFC after: 3 days


235782 22-May-2012 kib

A rewrite of the i810 bits of the agp(4) driver. New driver supports
operations required by GEMified i915.ko. It also attaches to SandyBridge
and IvyBridge CPU northbridges now.

Sponsored by: The FreeBSD Foundation
MFC after: 1 month


219902 23-Mar-2011 jhb

Do a sweep of the tree replacing calls to pci_find_extcap() with calls to
pci_find_cap() instead.


214603 31-Oct-2010 nwhitehorn

Add a driver for the Apple Uninorth AGP host bridge found in all PowerPC
Macintoshes with an AGP bus.


209793 08-Jul-2010 kib

Do not mention VM_ALLOC_RETRY in comment, and normalize the terminology
(blocking -> sleeping).

Reviewed by: alc
MFC after: 3 days


209329 19-Jun-2010 brian

Add a missing linefeed

PR: 147337
Submitted by: cyberleo at cyberleo dot net
MFC after: 1 week


207644 05-May-2010 alc

Push down the acquisition of the page queues lock into vm_page_unwire().

Update the comment describing which lock should be held on entry to
vm_page_wire().

Reviewed by: kib


207574 03-May-2010 alc

Acquire the page lock around vm_page_unwire(). For consistency, extend the
scope of the object lock in agp_i810.c. (In this specific case, the scope
of the object lock shouldn't matter, but I don't want to create a bad
example that might be copied to a case where it did matter.)

Reviewed by: kib


205102 12-Mar-2010 rnoland

Add support of Intel Pineview chips, aka IGD.

MFC after: 3 days


205096 12-Mar-2010 rnoland

Add pci ids for Intel Ironlake chipsets.

These behave just like g45 for agp.

Tested by: Torfinn Ingolfsen

MFC after: 3 days


201758 07-Jan-2010 mbr

Remove extraneous semicolons, no functional changes.

Submitted by: Marc Balmer <marc@msys.ch>
MFC after: 1 week


201223 29-Dec-2009 rnoland

Update d_mmap() to accept vm_ooffset_t and vm_memattr_t.

This replaces d_mmap() with the d_mmap2() implementation and also
changes the type of offset to vm_ooffset_t.

Purge d_mmap2().

All driver modules will need to be rebuilt since D_VERSION is also
bumped.

Reviewed by: jhb@
MFC after: Not in this lifetime...


200764 21-Dec-2009 rnoland

Fix a handful of issues with via agp support.

* Read the pci capability register to identify AGP 3 support
* Add missing smaller aperture sizes for AGP3 chips.
* Fix the aperture size calculation on AGP2 chips.
All sizes between 32M and 256M reported as 256M.
* Add \n to error string.

This all seems to get the CLE266 EPIA-M board agp working properly, now
back to work on drm.

MFC after: 2 weeks


197950 11-Oct-2009 rnoland

Add pci id's for Intel G41 chipset

Submitted by: Artyom Mirgorodsky <man@email.com.ua>
MFC after: 3 days


197191 14-Sep-2009 n_hibma

John Baldwin suggested that 'stolen memory' only happens in the case of
i810 and therefore is useful info there. Aperture size and stolen memory
are now printed on one line.

Submitted by: jhb


197076 10-Sep-2009 n_hibma

Move the printing of aperture size and stolen memory behind bootverbose.
None of the other AGP drivers actually displays this information at all,

MFC after: 1 week


194017 11-Jun-2009 avg

strict kobj signatures: fixes in agp driver

offset parameter has vm_offset_t type in calling code and in kobj method

Reviewed by: imp, rnoland, lulf, current@
Approved by: jhb (mentor)


191057 14-Apr-2009 ed

Use si_drv1 instead of dev2unit() inside agp(4).

Reviewed by: rnoland


190169 20-Mar-2009 rnoland

vm_offset_t is unsigned and therefore can not be negative.
Avoid unnessecary compares.

Found with: Coverity Prevent(tm)
CID: 2362,4215,4214,4209,4208,2363,4211,4210,4213,4212

MFC after: 3 days


189578 09-Mar-2009 imp

Fix prototypes to be consistent.


188247 06-Feb-2009 wkoszek

Fix AGP debugging code:
- correct format strings
- fill opt_agp.h if AGP_DEBUG is defined
- bring AGP_DEBUG to LINT by mentioning it in NOTES

This should hopefully fix a warning that was...

Found by: Coverity Prevent(tm)
CID: 3676
Tested on: amd64, i386


187633 23-Jan-2009 jkim

- Add few VIA bridges to agp_via.c and connect it to amd64 build
as they support Intel Core/Core 2 and VIA Nano processors.
- Align "optional agp" in conf/files.* for consistency while I am here.


187100 12-Jan-2009 jkim

Add support for AMD64 Family 10h processors.

PR: kern/128331
MFC after: 3 days


186434 23-Dec-2008 rnoland

Fix up handling of Intel G4X chips some more.

Note that you need at least xf86-video-intel 2.4.3 for this to work.
The G4X doesn't put the GATT into the same area of stolen memory
as all the other chips and older versions of the driver didn't
handle that properly.

Tested by: ganbold
Approved by: kib
MFC after: 2 weeks


186433 23-Dec-2008 kib

Clear busy state on the pages which are after the one that failed the bind
attempt.

Reported and tested by: ganbold
Reviewed by: rnoland
MFC after: 2 weeks


186385 21-Dec-2008 rnoland

Deal with 0 length args...

Approved by: kib


186384 21-Dec-2008 rnoland

Fix AGP_DEBUG macro to use c99 __VA_ARGS__ and build if enabled.

Approved by: kib


183555 02-Oct-2008 rnoland

Correctly handle Intel g33 chips and add support for g45 chips

g33 based chips use a different method of identifying the gtt size.
g45 based chips gtt is located in a different area of stolen memory.

Approved by: jhb (mentor)
MFC after: 2 weeks


183397 27-Sep-2008 ed

Replace all calls to minor() with dev2unit().

After I removed all the unit2minor()/minor2unit() calls from the kernel
yesterday, I realised calling minor() everywhere is quite confusing.
Character devices now only have the ability to store a unit number, not
a minor number. Remove the confusion by using dev2unit() everywhere.

This commit could also be considered as a bug fix. A lot of drivers call
minor(), while they should actually be calling dev2unit(). In -CURRENT
this isn't a problem, but it turns out we never had any problem reports
related to that issue in the past. I suspect not many people connect
more than 256 pieces of the same hardware.

Reviewed by: kib


182068 23-Aug-2008 imp

When device_get_children returns an error, ignore that bus' children.


181124 01-Aug-2008 jhb

Enable the support for G33/Q35/Q33 now that both the G33 and Q35 have been
tested:

PR: amd64/126090
MFC after: 1 week


179901 20-Jun-2008 gonzo

Fix PCI id for 945GME Express Integrated Graphics Controller:
set to 8086:27AE

PR: kern/124782
Event: Bugathon#5


177115 12-Mar-2008 remko

Add resume support to the agp_i810 family.

Submitted by: "Robert Noland" <rnoland at 2hip dot net>
Reviewed by: anholt
Approved by: anholt, imp (mentor)
MFC after: 1 week


176896 07-Mar-2008 jhb

Calculate the number of pages the GATT spans when reading from each page
to flush the TLB instead of hardcoding a size of 33 pages. Apertures of
32MB and 64MB only use a 16 page GATT and an aperture of 128MB only uses
a 32 page GATT, so without this the code could walk off the end of the
pointer and cause a page fault if the next page was unmapped. Also, for
aperture sizes > 128MB, not all of the pages would be read. The Linux
driver has the same bug.

MFC after: 1 week
Tested by: Frédéric PRACA frederic.praca of freebsd-fr.org


173946 26-Nov-2007 remko

Add the 845M GMCH controller.

PR: 114802
Approved by: imp (mentor), anholt (private mail)
Submitted by: Alex Goncharov <algo1 at comcast dot net>
MFC After: 3 days


173573 12-Nov-2007 jhb

Move the agp(4) driver from sys/pci to sys/dev/agp. __FreeBSD_version was
bumped to 800004 to note the change though userland apps should not be
affected since they use <sys/agpio.h> rather than the headers in
sys/dev/agp.

Discussed with: anholt
Repocopy by: simon


173203 30-Oct-2007 jhb

Split agp_generic_detach() up into two routines: agp_free_cdev() destroys
/dev/agpgart and agp_free_res() frees resources like the BAR for the
aperture. Splitting this up lets chipset-specific detach routines
manipulate the aperture during their detach routines without panicing.

MFC after: 1 week
Reviewed by: anholt


172262 21-Sep-2007 kevlo

- Add the device ID for the VIA VT3324 (CX700) chipset.
- Set and Get aperture size correctly for VIA's AGP3 chipsets.

Approved by: re (kensmith)


172187 15-Sep-2007 alc

Add the PCI id for the Intel 7221's integrated graphics controller. It is
similar to a 915G.

Approved by: re (kensmith)
Reviewed by: anholt
MFC after: 3 weeks


171433 13-Jul-2007 anholt

Add support for G965/Q965/GM965/GME965/GME945 AGP.

This adds a function to agp.c to set the aperture resource ID if it's
not the usual AGP_APBASE. Previously, agp.c had been assuming
AGP_APBASE, which resulted in incorrect agp_info, and contortions by
agp_i810.c to work around it.

This also adds functions to agp.c for default AGP_GET_APERTURE() and
AGP_SET_APERTURE(), which return the aperture resource size and disallow
aperture size changes. Moving to these for our AGP drivers will likely
result in stability improvements. This should fix 855-class aperture
size detection.

Additionally, refuse to attach agp_i810 when some RAM is above 4GB and
the GART can't reference memory that high. This should be very rare.
The correct solution would be bus_dma conversion for agp, which is
beyond the scope of this change. Other AGP drivers could likely use
this change as well.

G33/Q35/Q33 AGP support is also included, but disconnected by default
due to lack of testing.

PR: kern/109724 (855 aperture issue)
Submitted by: FUJIMOTO Kou<fujimoto@j.dendai.ac.jp>
Approved by: re (hrs)


165826 06-Jan-2007 takawata

Restore agp aperture size after resume, in case it is modified after boot.


165815 05-Jan-2007 jkim

- Clean up Aperture Access Global Enable (APEN) bit access.
- Rename confusing AGP_INTEL_I845_MCHCFG to AGP_INTEL_I845_AGPM.
- Move E7205 and E7505 from i8x5 to i8x0 family. It probably worked
because the actual offset is the same.

In fact, all three families have the bit at the exact same place. Only
differences are name and width of the registers, i.e., NBXCFG (0x50, dword),
RDCR (0x51, byte), AGPM (0x51, byte), MCHCFG (0x50, word) depending on
the family of the chipsets.


165811 05-Jan-2007 jkim

Fix style(9).


165805 05-Jan-2007 takawata

Make agp_intel capable to work after resume from S3 state.


163614 22-Oct-2006 alc

The page queues lock is no longer required by vm_page_busy() or
vm_page_wakeup(). Reduce or eliminate its use accordingly.


163362 15-Oct-2006 tanimura

Fix the wraparound of memsize >=2GB.


163181 09-Oct-2006 jkim

Fix style(9) nits.


163180 09-Oct-2006 jkim

Fix 32-bit PTE in the GART table.

Noticed by: jmg


162690 27-Sep-2006 anholt

Add support for 945G/GM AGP chipsets.

The key problem was that the aperture size detection using the MSAC bit
doesn't work -- the bit appears to be set even when it shouldn't be. Linux
takes a different approach, testing for a bit of the GMADR (PCIR_BAR(2)) being
set. However, as I don't think that's a safe way to test aperture size, we
just allocate the resource and check its size. This also pointed out that
agp_generic_attach hadn't been allocating our aperture resource, which may
have caused problems in some cases.

Also corrected is a minor copy-and-pasteo in an error case.

PR: kern/103079
Submitted by: mnag
Tested on: i945GM, i915GM
MFC after: 2 weeks


161788 01-Sep-2006 anholt

Add support for another ATI IGP 340M (RS200M) AGP bridge.

PR: kern/100958
Submitted by: Kazuo Dohzono <dohzono@axion-software.com>
MFC after: 1 week


161518 21-Aug-2006 jkim

Use aperture base address from north bridge. Some BIOS does not encode
misc. control registers correctly and it is inconsistent with north bridge.
In fact, there are too many broken BIOS implementations out there and we
cannot fix every possible combination but at least it is consistent with
what we advertise with ioctl(2).


161222 11-Aug-2006 jkim

Explicitly set v3 mode only when it is requested. Don't bother otherwise.


159981 27-Jun-2006 anholt

Fix breakage of CHIP_I855 in the last revision.

Submitted by: Ted Faber <faber@ISI.EDU>


159926 25-Jun-2006 anholt

Replace the three copies of the list of pci ids with a single centralized list.
Add the i945 PCI IDs commented out -- I think it should just work, but it hasn't
been tested yet.


159075 30-May-2006 jkim

Move SiS 760 to where it belongs.

PR: 98094
Submitted by: Mike M < mmcgus at yahoo dot com >


158655 16-May-2006 anholt

Add support for allocating one larger than page-sized contiguous block of memory
with a physical address. This is used for hardware ARGB cursor support on newer
chipsets.


158471 12-May-2006 jhb

Remove various bits of conditional Alpha code and fixup a few comments.


155772 17-Feb-2006 anholt

Add support for the Intel E7205 chipset.

PR: kern/91315
Submitted by: Joerg Pulz <Joerg.Pulz@frm2.tum.de>


155186 01-Feb-2006 jhb

Don't add an agp child in vgapci's attach routine if the PCIY_AGP
capability is present as not all devices supported by the agp_i810 driver
(such as i915) have the AGP capability. Instead, add an identify routine
to the agp_i810 driver that uses the PCI ID to determine if it should
create an agp child device.


154486 17-Jan-2006 jhb

Fix a memory leak I introduced with the hostb/vgapci stuff.

Reported by: Coverity (via dfr's clue-bat)


153580 20-Dec-2005 jhb

- Use PCIR_BAR() macro for the BAR for the aperture.
- Axe macros used for walking PCI capabilities list. We now ask the PCI
bus to find caps for us rather than doing it in the drm and agp drivers.


153579 20-Dec-2005 jhb

- Bump FreeBSD version for the hostb(4) and vgapci(4) drivers as well as
the addition of pci_find_extcap().
- Change the drm drivers to attach to vgapci. This is #ifdef'd so the
code can be shared across branches.
- Use pci_find_extcap() to look for AGP and PCIE capabilities in drm.
- GC all the drmsub stuff for i810/i830/i915. The agp and drm devices are
now both children of vgapci.


153572 20-Dec-2005 jhb

Change the various AGP drivers that attach to the Host-PCI bridge device to
attach to the hostb driver instead. This means that agp can now be loaded
at runtime (in theory at least). Also, the drivers no longer have to
explicity call device_verbose() to cancel out any earlier calls to
device_quiet() by the hostb(4) driver (this shows a limitation in new-bus,
drivers really shouldn't be doing device_quiet() until they know they are
going to drive that device, i.e. in attach).


153568 20-Dec-2005 jhb

Change the agp_find_device() to return the first agp device that has been
attached to a driver rather than always returning agp0.


153563 20-Dec-2005 jhb

Don't map the AGP aperture into contiguous KVA. The various graphics
drivers already map sections into KVA as needed anyway. Note that this
will probably break the nvidia driver, but I will coordinate to get that
fixed.

MFC after: 2 weeks


153562 20-Dec-2005 jhb

Destroy the /dev device before destroying the mutex or releasing resources
rather than afterwards.

MFC after: 1 week


153561 20-Dec-2005 jhb

Use pci_find_extcap() to search for AGP capabilities (PCIY_AGP).


153031 02-Dec-2005 anholt

Add support for i915 GMCH AGP. This diff is a combination of work by myself
and some fixes from Motomichi Matsuzaki. Testing involved many people, but the
final, successful testing was from rwatson who endured several rounds of "it
crashes at XYZ stage" "oh, please correct this typo and try again." The Linux
driver, and to a small extent the limited specs, were both used as a reference
for how to program the chipset.

PR: kern/80396
Submitted by: Martin Mersberger


152914 29-Nov-2005 anholt

Add support for the i855GM, tested by an r300 user.


152435 14-Nov-2005 jkim

0xb1881106 seems to be an AGP bridge and some BIOSes incorrectly handle
the bridge. Therefore, we give the same treatment as we did for nForce3-250
and ULi chipsets. VIA AGPv3 code was copied from agp_via.c.


150645 27-Sep-2005 jkim

- Add a work-around for nForce3-250. Aperture base address encoded in misc.
control register and AGP bridge seems to be inconsistent with some BIOS.
Instead of relying on BIOS settings, we just take the initial aperture size
and encode them for both miscellaneous control register and AGP bridge.
Some idea was borrowed from agp_nvidia.c.

- Add preliminary ULi M1689 chipset support. The idea was taken from Linux
because hardware and documentation are unavailable. Not tested.

- Add more VIA chipset PCI IDs taken from Linux driver.

Approved by: anholt (mentor)
Tested by: Adam Gregoire <ebola at psychoholics dot org>
Ganael Laplanche <ganael.laplanche at martymac dot com>
K Wieland <kwieland at wustl dot edu>


150236 17-Sep-2005 anholt

Add a new AGP driver for ATI IGP chipsets. The driver is based on reading of
the Linux driver, since specs are unavailable. Many thanks to Adam Kirchhoff
for multiple useful testing cycles, and Ralf Wostrack for the final fix to get
it working.

PR: i386/75251
Submitted by: anholt


150235 16-Sep-2005 anholt

Fix agp_nvidia.c to behave more like the linux driver, fixing DRI on Radeon
9200 according to one responder. The primary issue was not setting some bits
to say that the entries were active, but also fix one place where some memory
wasn't being used as volatile as it should. While here, change some use of ffs
to a relatively short case statement, to make it more obvious what's going on.

PR: kern/71638, kern/72372, kern/71547?
Submitted by: Andrew J. Caines <A.J.Caines@halplant.com>,
Robin Schoonover <end@endif.cjb.net>,
Jason Henson <jason@ec.rr.com>


147606 26-Jun-2005 anholt

Make the initialization in the AGPv3 case match that of Linux. Fixes hangs on
X startup with DRI enabled, with a v3-capable card.

Tested by: Tom McLaughlin <tmclaugh@sdf.lonestar.org>
Approved by: re (scottl)


144809 08-Apr-2005 obrien

Add nForce3-250.


144517 02-Apr-2005 obrien

nVidia AGP chipsets beyond nForce2 are AMD64-specific.
So move the AGP support to there.

Submitted by: Jung-uk Kim <jkim@niksun.com>


142646 27-Feb-2005 cognet

Add device id for the Ali M1671 host to AGP bridge.


142407 24-Feb-2005 imp

Fix style(9) issues with __P removal.

Noticed by: bde


142398 24-Feb-2005 imp

Return BUS_PROBE_DEFAULT instead of 0.


141885 14-Feb-2005 anholt

Correct the SiS 755 PCI ID. Confirmed against Linux code.

PR: kern/76411
Submitted by: Jonathan Fosburgh, jonathan at fosburgh dot org
Obtained from: Jung-uk Kim, jkim at niksun.com


141883 14-Feb-2005 anholt

No use for this AMD64 special-case "return NULL;" in probe now that we don't
do fake "generic" support.


139825 07-Jan-2005 imp

/* -> /*- for license, minor formatting changes


139431 30-Dec-2004 anholt

[1] Remove the generic bridge support from those drivers that had it. The
generic bridge support was biting us more than it helped, whenever a new chipset
came out from a vendor and misprogramming it caused strange hangs or corruption.
[2] Add a large number of PCI IDs based on what the linux drivers support.
Note that the new PCI IDs haven't been tested, they're just *likely* to work.
In particular the VIA AGP 8x chipsets are concerning, due to lack of testing,
possible issues (kern/69953), and not having a nice "does this bridge say it
would do 8x" function. However, this shouldn't make the situation worse, since
these chips would have probed in the past anyway.


136853 24-Oct-2004 alc

Use VM_ALLOC_NOBUSY to eliminate an unneeded vm_page_wakeup() call and the
synchronization that one entails.


136852 24-Oct-2004 alc

Avoid repeated acquisition and release of the vm object lock inside of
two loops in agp_generic_bind_memory(). As an intended side-effect, all
of the calls to vm_page_wakeup() are now performed with the containing
vm object lock held.


136133 05-Oct-2004 anholt

Add PCI ID for VIA K8T800Pro chipset. Tested with agptest and X with DRI
enabled, but not 3D.


134144 22-Aug-2004 anholt

Add support for Intel E7205 AGP.

PR: kern/69858
Submitted by: Jacobo Arvelo <unix4all at gulic dot org>


134099 21-Aug-2004 anholt

Fix aperture size detection on some ALi chipsets by only using the lowest 4 bits
to check aperture size, avoiding hangs. Maintain the rest of the bits when
setting/unsetting ATTBASE. This essentially matches Linux's AGP driver as well.

PR: kern/70037
Submitted by: Mark Tinguely <tinguely at casselton dot net>
Obtained from: NetBSD


134098 21-Aug-2004 anholt

Apply some stylistic changes based off of kern/70037 (content changes to
follow).


134043 19-Aug-2004 obrien

Unconditionally support the AMD64 GART HW.


133852 16-Aug-2004 obrien

AMD64 on-CPU GART support.
This also applies to AMD64 HW running 'i386' OS.

Submitted by: Jung-uk Kim <jkim@niksun.com>
Integration by: obrien


133851 16-Aug-2004 obrien

style.9.


133406 09-Aug-2004 anholt

Minimal fix to prevent crashes when an AGP v2 card is used with the new v3 VIA
chipsets, based on Linux's via-agp.c. On boot, the system selects which AGP
version to use based on the inserted card. If v2 was chosen, the chipset
needs to be programmed with the v2 registers still. Also included in kern/69953
are changes to make the programming of the v3 registers match linux, but that
will be left out until the need to do so is confirmed (want specs or a tester).

PR: kern/69953
Submitted by: Oleg Sharoiko <os@rsu.ru>
Tested by: Oleg Sharoiko <os@rsu.ru>, Geoff Speicher <geoff@speicher.org>
(full version from PR)


131433 02-Jul-2004 jhb

Add support for the VIA Apollo KT400/400A/600 AGP host bridges which use
the VIA v3 register offsets.

PR: 68545
Submitted by: Ariff Abdullah <skywizard@mybsd.org.my>


130585 16-Jun-2004 phk

Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.


129878 30-May-2004 phk

Add missing <sys/module.h> includes


129605 23-May-2004 mux

Use __FBSDID.


129601 23-May-2004 mux

In agp_generic_bind_memory(), grab the needed pages before acquiring
the agp mutex. We do this because vm_page_grab() called with the
VM_ALLOC_RETRY flag can sleep.

Pointed out by: alc


129579 22-May-2004 mux

Get rid of a lockmgr consumer by making agp(4) use a standard mutex,
since it's always acquiring the lock exclusively. This was tested
with X on an SMP box, with and without WITNESS.


129567 22-May-2004 mux

Plug three lock leaks.


129415 19-May-2004 anholt

Add explicit list of SiS AGP chipsets based on Linux kernel's list.

Prompted by: i386/59503


129189 13-May-2004 jhb

Different VIA host bridges use different offsets to their AGP config
registers, so add a register offset array to the softc. We key off the
device ID to determine which set of register offsets. Currently the 8385
host bridge used on amd64 is the only bridge to use the AGP3_VIA_*
register offsets and all other bridges use the AGP_VIA_* offsets. It is
currently unclear if the AGP3_VIA_* offsets are for VIA bridges that
implement AGP 3.0 bridges or just for amd64 bridges.

Submitted by: Kenneth Culver culverk at sweetdreamsracing dot biz


128613 24-Apr-2004 alc

Push down the responsibility for zeroing a physical page from the
caller to vm_page_grab(). Although this gives VM_ALLOC_ZERO a
different meaning for vm_page_grab() than for vm_page_alloc(), I feel
such change is necessary to accomplish other goals. Specifically, I
want to make the PG_ZERO flag immutable between the time it is
allocated by vm_page_alloc() and freed by vm_page_free() or
vm_page_free_zero() to avoid locking overheads. Once we gave up on
the ability to automatically recognize a zeroed page upon entry to
vm_page_free(), the ability to mutate the PG_ZERO flag became useless.
Instead, I would like to say that "Once a page becomes valid, its
PG_ZERO flag must be ignored."


127873 05-Apr-2004 imp

Add register definitions for the status and command registers for AGP.

PR: 64846
Submitted by: Samy Al Bahra


127815 03-Apr-2004 njl

Add the ability to disable agp devices at the loader prompt. Usage is
hint.agp.0.disabled="1"

Submitted by: jhb


127790 03-Apr-2004 peadar

Before MFC'ing the previous commit, I noticed I'd left out a case.
Add in missing case for i845G in the attach routine. I'll MFC this
with the rest of the change after the 4.10 codefreeze lifts.

Reviewed By: Doug Rabson


127135 17-Mar-2004 njl

Convert callers to the new bus_alloc_resource_any(9) API.

Submitted by: Mark Santcroos <marks@ripe.net>
Reviewed by: imp, dfr, bde


126922 13-Mar-2004 peadar

Recognise the 82845G AGP bridge, and poke it appropriately at
attach/detach time.

Assigning the default behaviour to this particular device is
incorrect, corrupting the video BIOS aperture, and breaking
VESA support in the kernel and XFree86.

Reviewed By: dfr
MFC after: 1 week
PR: kern/62906


126080 21-Feb-2004 phk

Device megapatch 4/6:

Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.

Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.


126076 21-Feb-2004 phk

Device megapatch 1/6:

Free approx 86 major numbers with a mostly automatically generated patch.

A number of strategic drivers have been left behind by caution, and a few
because they still (ab)use their major number.


125845 15-Feb-2004 phk

This is not a D_TTY driver.


122513 11-Nov-2003 anholt

- Disable AGP on ALI chipsets if aperture size is 0.
- Fail in agp_alloc_gatt if the aperture size is 0 instead of panicing in
contigmalloc.

Reported by: Bjoern Fischer <bfischer@Techfak.Uni-Bielefeld.DE>
Reviewed by: jhb
MFC after: 1 week


121440 23-Oct-2003 jhb

Add simple support for AGP 3.0 including enabling 8x mode. The simple
part of the support is that it still assumes one master and one target
where as AGP 3.0 actually supports multiple devices on the bus.

Submitted by: Keith Whitwell <keith@tungstengraphics.com>
Sponsored by: The Weather Channel


121437 23-Oct-2003 jhb

Use a switch statement on the devid instead of if-else for determing which
code to use to see if the onboard video has been disabled or not.

Submitted by: Keith Whitwell <keith@tungstengraphics.com>


120673 02-Oct-2003 anholt

Make the i810 AGP device create a "drmsub" child device. This will be attached
to by the DRM for i8xx devices.

Submitted by: Keith Whitwell <keith@tungstengraphics.com>


120144 17-Sep-2003 anholt

Fix a typo in r1.8: The GTLB enable/flush bit is 1<<7, not 1<<8.

PR: kern/56297
Submitted by: Dan Angelescu <mrhsaacdoh@yahoo.com>


119371 23-Aug-2003 mdodd

PCI header files live in dev/pci.


119368 23-Aug-2003 mdodd

AGP GART driver for NVIDIA nForce/nForce2 chipsets.


119288 22-Aug-2003 imp

Prefer new location of pci include files (which have only been in the
tree for two or more years now), except in a few places where there's
code to be compatible with older versions of FreeBSD.


116921 27-Jun-2003 jhb

Sort the list of PCI ID's in numerical order and fix a whitespace bogon.


116723 23-Jun-2003 mdodd

Add a PCI ID for the Apollo Pro 133A.

PR: kern/46983
Submitted by: David Holm <david@realityrift.com>


116722 23-Jun-2003 mdodd

Add PCI IDs for the i82855 and i82875P AGP bridges.

PR: i386/53136, i386/51802
Submitted by: Kyunghwan Kim <redjade@atropos.snu.ac.kr>, Norikatsu Shigemura <nork@FreeBSD.org>


116555 19-Jun-2003 alc

Add vm object locking.


116288 13-Jun-2003 alc

Add vm object locking.


116192 11-Jun-2003 obrien

Use __FBSDID().


115355 27-May-2003 jhb

Fix support for 256 MB aperture sizes on chipsets such as the 845 and
865. The APSIZE register has a variable-sized field of enabled bits.
To figure out how many bits a specific host bridge supports, write the
maximum width and see how many bits are set in the hardware. We then
use this mask for setting and getting the aperture size. Prior to this,
the agp(4) driver would treat an aperture size of 256 MB as 128 MB and
would not allocate enough physical memory for the GART as a result.

MFC after: 3 days
Sponsored by: The Weather Channel
Approved by: re (rwatson)


115354 27-May-2003 jhb

Grr, fix compile. The bane of trying to split out patches into two
commits.

Reported by: Lukas Ertl <l.ertl@univie.ac.at>
With hat: re
Pointy hat to: jhb


115349 27-May-2003 jhb

Add support for the Intel 865 chipset.

MFC after: 3 days
Sponsored by: The Weather Channel
Approved by: re (murray)


113506 15-Apr-2003 mdodd

- Express hard dependencies on bus (pci, isa, pccard) and
network layer (ether).
- Don't abuse module names to facilitate ifconfig module loading;
such abuse isn't really needed. (And if we do need type information
associated with a module then we should make it explicit and not
use hacks.)


113204 07-Apr-2003 murray

Fix typo.

PR: kern/50504
Submitted by: Alex Semenyaka <alexs@snark.ratmir.ru>
MFC after: 3 days


112569 25-Mar-2003 jake

- Add vm_paddr_t, a physical address type. This is required for systems
where physical addresses larger than virtual addresses, such as i386s
with PAE.
- Use this to represent physical addresses in the MI vm system and in the
i386 pmap code. This also changes the paddr parameter to d_mmap_t.
- Fix printf formats to handle physical addresses >4G in the i386 memory
detection code, and due to kvtop returning vm_paddr_t instead of u_long.

Note that this is a name change only; vm_paddr_t is still the same as
vm_offset_t on all currently supported platforms.

Sponsored by: DARPA, Network Associates Laboratories
Discussed with: re, phk (cdevsw change)


112184 13-Mar-2003 sos

Add pci id# for the sis648


111815 03-Mar-2003 phk

Gigacommit to improve device-driver source compatibility between
branches:

Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.

This patch is automatically generated and has been tested by compiling
LINT with all the fields in struct cdevsw in reverse order on alpha,
sparc64 and i386.

Approved by: re(scottl)


111462 25-Feb-2003 mux

Cleanup of the d_mmap_t interface.

- Get rid of the useless atop() / pmap_phys_address() detour. The
device mmap handlers must now give back the physical address
without atop()'ing it.
- Don't borrow the physical address of the mapping in the returned
int. Now we properly pass a vm_offset_t * and expect it to be
filled by the mmap handler when the mapping was successful. The
mmap handler must now return 0 when successful, any other value
is considered as an error. Previously, returning -1 was the only
way to fail. This change thus accidentally fixes some devices
which were bogusly returning errno constants which would have been
considered as addresses by the device pager.
- Garbage collect the poorly named pmap_phys_address() now that it's
no longer used.
- Convert all the d_mmap_t consumers to the new API.

I'm still not sure wheter we need a __FreeBSD_version bump for this,
since and we didn't guarantee API/ABI stability until 5.1-RELEASE.

Discussed with: alc, phk, jake
Reviewed by: peter
Compile-tested on: LINT (i386), GENERIC (alpha and sparc64)
Runtime-tested on: i386


111119 19-Feb-2003 imp

Back out M_* changes, per decision of the TRB.

Approved by: trb


110844 14-Feb-2003 anholt

Split the arch-specific AGP files into the appropriate files.* and do the same
for the agp module, and add agp to the list of modules to compile for alpha.
Add an alpha_mb() to agp_flush_cache for alpha -- it's not correct but may
improve the situation, and it's what linux and NetBSD do.


110843 14-Feb-2003 anholt

Remove an extra agp_flush_cache(). The i810 case that needs it already has it.


110814 13-Feb-2003 anholt

Add agpreg.h missed in commit to agp_i810 (adding i85x/i86x AGP support).


110785 13-Feb-2003 anholt

Add Intel 85x/86x AGP support.

Submitted by: David Dawes <dawes@xfree86.org>


109623 21-Jan-2003 alfred

Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.


109115 11-Jan-2003 anholt

Add support for the Intel 82820 UP-only AGP bridge.

PR: 41466
Submitted by: NIIMI Satoshi <sa2c@sa2c.net>
MFC after: 1 week


108236 23-Dec-2002 alc

- Hold the page queues lock around vm_page_wakeup().


106860 13-Nov-2002 mux

Remove a bunch of #include "opt_pci.h".


105145 15-Oct-2002 marcel

Fix previous commit: Don't cast integral types to pointers to
print them with %p. Cast to unsigned long and print with %#lx.

Discussed with: bde


104999 12-Oct-2002 marcel

Make this compile on 64-bit architectures (e.g. ia64) by not assuming
pointers (but more precisely vm_offset_t) can be printed with %x. Use
%p instead and cast the argument to caddr_t.


104397 03-Oct-2002 anholt

Correct an indentation.

Noticed by: phk


103340 15-Sep-2002 anholt

Fix i810 after i830 commit.

Submitted by: David Dawes <dawes@XFree86.Org>


103272 13-Sep-2002 anholt

Fix an i830/i845 test that shouldn't get hit in normal use and remove a printf.

Submitted by: David Dawes <dawes@XFree86.Org>


103243 12-Sep-2002 anholt

Add AGP support for Intel i830M and i845 thanks to patches from moto kawasaki
<kawasaki@mbg.sphere.ne.jp> and David Dawes <dawes@XFree86.org>.


102480 27-Aug-2002 bde

Include <sys/lockmgr.h> for old lock interfaces instead of depending on
namespace pollution in <sys/lock.h>.


102382 25-Aug-2002 alc

o Retire vm_page_zero_fill() and vm_page_zero_fill_area(). Ever since
pmap_zero_page() and pmap_zero_page_area() were modified to accept
a struct vm_page * instead of a physical address, vm_page_zero_fill()
and vm_page_zero_fill_area() have served no purpose.


101647 10-Aug-2002 alc

o Use the VM_ALLOC_WIRED flag instead of calling vm_page_wire().


100422 21-Jul-2002 alc

o If the page returned by vm_page_grab(VM_ALLOC_ZERO) isn't prezeroed,
zero it.

Reviewed by: dfr, peter


100212 17-Jul-2002 jhb

- Use more correct values to initialize the AGP controller during setup.
The value we use is still questionable for 440BX chipsets.
- When flushing the TLB just toggle the bit in question instead of writing
a magic value that could trash other unrelated bits.


99988 14-Jul-2002 alc

o Lock page queue accesses by vm_page_wire().


99927 13-Jul-2002 alc

o Complete the locking of page queue accesses by vm_page_unwire().
o Assert that the page queues lock is held in vm_page_unwire().
o Make vm_page_lock_queues() and vm_page_unlock_queues() visible
to kernel loadable modules.


94790 15-Apr-2002 cokane

Fix some nits in AMD AGP driver. Remove excess malloc and move a bzero
out of the way, so it won't cause trouble.

Submitted by: Frank Mayher <frank@exit.com>
MFC after: 1 week


90270 05-Feb-2002 benno

Correctly identify the Intel 82830 AGP bridge.


88185 19-Dec-2001 mdodd

Allow retrieval of the virtual address of the AGP aperture
using agp_get_info().

MFC after: 1 week


87599 10-Dec-2001 obrien

Update to C99, s/__FUNCTION__/__func__/,
also don't use ANSI string concatenation.


87479 07-Dec-2001 cokane

This patch will fix the lockups associated with AMD 751,761,762 based AGP
controllers. There still seems to be some issues with the DRI copying code
for some adapters, at least it doesn't hang the system now. Input would be
appreciated.

PR: 32301
Obtained from: Eric Anhlot <eanholt@gladstone.uoregon.edu>, Joe <joeo@nks.net>


86976 27-Nov-2001 ru

Don't automatically unbind/deallocate memory when releasing.
This fixes the VT switching problem with the i810 X driver.

Explained by: David Dawes <dawes@XFree86.Org>
Reviewed by: dfr


86192 08-Nov-2001 kuriyama

Add support for Intel's i820/i840/i845/i850/i860 chipset.

Submitted by: nork@cityfujisawa.ne.jp (Norikatsu Shigemura)
PR: kern/31559, kern/31825
MFC after: 1 week


83699 20-Sep-2001 cokane

Add probe line for the AMD 761 northbridge chip. At least it detects now,
seems to set up memory spaces correctly. This change actually did work for
me using -STABLE, XFree86 4.0.3 ~ some snapshot of DRI awhile back. I sent
mail to dfr to no avail, perhaps someone else would like to test it with
DRI.

Anyway, people have been nagging me about this change for awhile, so here's
the commit.


83366 12-Sep-2001 julian

KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after: ha ha ha ha


82573 30-Aug-2001 dfr

Recognise VIA Apollo KT133A bridge.

PR: 30061
Submitted by: John Merryweather Cooper <jmcoopr@webmail.bmi.net>
MFC after: 1 week


79339 05-Jul-2001 jhb

Make these compile again by adding proc.h include for GIANT_REQUIRED
that is in included vm headers.


76827 19-May-2001 alfred

Introduce a global lock for the vm subsystem (vm_mtx).

vm_mtx does not recurse and is required for most low level
vm operations.

faults can not be taken without holding Giant.

Memory subsystems can now call the base page allocators safely.

Almost all atomic ops were removed as they are covered under the
vm mutex.

Alpha and ia64 now need to catch up to i386's trap handlers.

FFS and NFS have been tested, other filesystems will need minor
changes (grabbing the vm lock when twiddling page properties).

Reviewed (partially) by: jake, jhb


74810 26-Mar-2001 phk

Send the remains (such as I have located) of "block major numbers" to
the bit-bucket.


70185 19-Dec-2000 assar

un-staticize M_AGP so that it can be used in agp*.c


69927 12-Dec-2000 jhb

Add a missing include of <sys/proc.h>.


69774 08-Dec-2000 phk

Staticize some malloc M_ instances.


67882 29-Oct-2000 phk

Remove unneeded #include <sys/proc.h> lines.


67379 20-Oct-2000 ache

Add i815 host to PCI bridge ID


67295 18-Oct-2000 peter

This didn't compile. Fix typo: s/rmang_get_start/rman_get_start/


67268 18-Oct-2000 mdodd

Use appropriate resource management accessors instead of directly
referencing structure members.

Use rman_get_size() instead of end - start + 1.


67197 16-Oct-2000 ru

Added support for i815.


67164 15-Oct-2000 phk

Remove unneeded #include <machine/clock.h>


66615 04-Oct-2000 jasone

Convert lockmgr locks from using simple locks to using mutexes.

Add lockdestroy() and appropriate invocations, which corresponds to
lockinit() and must be called to clean up after a lockmgr lock is no
longer needed.


63010 12-Jul-2000 dfr

Add support for Intel's i810 chipset with integrated graphics. An
associated patch to XFree86 allows the X server to work with this chipset
on FreeBSD. Additional work will include porting the Linux 3D driver.

Submitted by: Ruslan Ermilov <ru@FreeBSD.org>


61503 10-Jun-2000 dfr

Release resources properly in detach.


61501 10-Jun-2000 dfr

Fix the AMD 751 AGP minidriver so that it works with my test code.


61452 09-Jun-2000 dfr

A driver for programming the AGP hardware. This is only very lightly
tested on Intel BX chipsets only. The other agp minidrivers are totally
untested.

The programming api is a subset of the Linux api and is only intended to
be enough for the X server to use. There is also an in-kernel api for the
use of other kernel modules such as the 3D DRI.