Remove bogus AGP/DRM assumptions
PATCH 1/1 Remove bogus AGP/DRM assumptions
AGP/DRM currently assume that GATT entries can be converted to physical addresses with a simple mask. Additionally, agpgart assumes in a couple places that the mask is ~0xfff, i.e., that all the GART control bits are in the low 12 bits. Both assumptions are bogus, so:
Make agp_memory.memory[] (exported from agpgart to DRM) contain physical addresses, not GATT entries.
DRM assumes agp_memory contains GATT entries, and it converts them to physical addresses with "paddr = agp_memory.memory[i] & mask". 460GX requires both a shift and a mask, so exporting plain physical addresses and a mask of ~0UL allows agpgart to add 460GX support without requiring DRM interface changes.
Applies to 2.4 BitKeeper tree.
drivers/char/agp/agp.h +1 -1
@@ -87,6 +87,7 @@u32 *gatt_table;u32 *gatt_table_real;unsigned long scratch_page; +unsigned long scratch_page_real;unsigned long gart_bus_addr;unsigned long gatt_bus_addr;u32 mode;
@@ -99,7 +100,6 @@int needs_scratch_page;int aperture_size_idx;int num_aperture_sizes; -int num_of_masks;int capndx;int cant_use_aperture;
drivers/char/agp/agpgart_be.c +22 -50
272 lines not on this page · raw message