• Icenowy Zheng's avatar
    LoongArch: Disable WUC for pgprot_writecombine() like ioremap_wc() · 278be836
    Icenowy Zheng authored
    Currently the code disables WUC only disables it for ioremap_wc(), which
    is only used when mapping writecombine pages like ioremap() (mapped to
    the kernel space). But for VRAM mapped in TTM/GEM, it is mapped with a
    crafted pgprot by the pgprot_writecombine() function, in which case WUC
    isn't disabled now.
    
    Disable WUC for pgprot_writecombine() (fallback to SUC) if needed, like
    ioremap_wc().
    
    This improves the AMDGPU driver's stability (solves some misrendering)
    on Loongson-3A5000/3A6000 machines.
    Signed-off-by: default avatarIcenowy Zheng <uwu@icenowy.me>
    Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
    278be836
pgtable-bits.h 4.14 KB