• Andy Lutomirski's avatar
    drm, agpgart: Use pgprot_writecombine for AGP maps and make the MTRR optional · f435046d
    Andy Lutomirski authored
    I'm not sure I understand the intent of the previous behavior.  mmap
    on /dev/agpgart and DRM_AGP maps had no cache flags set, so they
    would be fully cacheable.  But the DRM code (most of the time) would
    add a write-combining MTRR that would change the effective memory
    type to WC.
    
    The new behavior just requests WC explicitly for all AGP maps.
    
    If there is any code out there that expects cacheable access to the
    AGP aperture (because the drm driver doesn't request an MTRR or
    because it's using /dev/agpgart directly), then it will now end up
    with a UC or WC mapping, depending on the architecture and PAT
    availability.  But cacheable access to the aperture seems like it's
    asking for trouble, because, AIUI, the aperture is an alias of RAM.
    Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: default avatarAndy Lutomirski <luto@amacapital.net>
    Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
    f435046d
drm_pci.c 12.7 KB