git: syscons - Use vtophys() for mmap-ing the framebuffer.
Imre Vadasz
ivadasz at crater.dragonflybsd.org
Thu Jan 15 10:34:46 PST 2026
commit f76e8b935cd9b27328877f9637a1d45dd9cdd045
Author: Imre Vadász <imre at vdsz.com>
Date: Sun Jan 11 13:16:41 2026 +0100
syscons - Use vtophys() for mmap-ing the framebuffer.
With this change, the xf86-video-scrb Xorg/XLibre driver works reliably
on machines using the amdgpu(4) KMS driver.
With amdgpu(4), the framebuffer may be allocated from GTT memory (managed
by TTM and accessed by the GPU through its own IOMMU), and hence is not
contiguous in physical memory.
Using vtophys() in the .d_mmap handler effectively determines the correct
physical address one-by-one for each page of the framebuffer, based on the
kernel's virtual memory mapping.
More optimally, we would call into the correct drm/ttm function to handle
these mmap requests in a more efficient way, however that will require some
more changes to how we pass the framebuffer information on to syscons.
Or alternatively we figure out how to tell amdgpu(4) to always use VRAM for
the framebuffer.
Summary of changes:
sys/dev/misc/syscons/syscons.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f76e8b935cd9b27328877f9637a1d45dd9cdd045
--
DragonFly BSD source repository
More information about the Commits
mailing list