git: drm: implement pci_set_dma_mask() and pci_set_consistent_dma_mask()

Aaron LI aly at crater.dragonflybsd.org
Thu Oct 22 07:23:35 PDT 2026


commit 91ba17258a22a982dbd4b73ddd432bd805f2f42e
Author: David Bidner <david at crap.solutions>
Date:   Sat Oct 17 15:45:47 2026 +0200

    drm: implement pci_set_dma_mask() and pci_set_consistent_dma_mask()
    
    The two compat functions returned -EIO unconditionally since their
    introduction in 2014 (9ca0d65ea7), so every drm driver that asks for a
    DMA mask at attach time fails: i915's gen8_gmch_probe() logs
    "Can't set DMA mask/consistent mask (-5)" on every boot, and
    radeon/amdgpu silently downgrade their DMA limit to 32 bits.
    
    No mask was ever recorded or enforced: this compat layer maps DMA
    addresses 1:1 to physical addresses, and dma_alloc_coherent() keeps all
    consistent allocations below 4GB.  Honor a requested mask when it
    covers the installed memory (ptoa(Maxmem)); refuse only what cannot
    actually work, so drivers still see an honest error on machines whose
    memory exceeds their GPU's addressing limit.
    
    Bug: https://bugs.dragonflybsd.org/issues/3455

Summary of changes:
 sys/dev/drm/include/linux/pci.h | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/91ba17258a22a982dbd4b73ddd432bd805f2f42e


-- 
DragonFly BSD source repository


More information about the Commits mailing list