• Bjorn Helgaas's avatar
    [AGP] Remove bogus AGP/DRM assumptions · c6ce7bc9
    Bjorn Helgaas authored
    [Forward port of a 2.4 patch that got applied last month -- DJ] 
     
    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.
    c6ce7bc9
via-kt400.c 5.37 KB