diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2018-08-27 09:30:08 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2018-08-27 09:30:08 +0000 |
commit | ed712632241f41424222f310063f597b059742ff (patch) | |
tree | b8ea68126a7716457e0ec9a4c895f22d958578c4 /sys/dev/pci | |
parent | ce8ce2048a42db1d6e11cb1b202704780e7cadcf (diff) |
Add an interface that allows drivers to claim a framebuffer and check
whether another driver has already claimed a framebuffer. Use this in
radeondrm(4) and simplefb(4) to prevent the latter from attaching if
radeondrm(4) is attached to the hardware that provides the framebuffer
set up by the firmware.
ok mlarkin@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/drm/radeon/radeon_kms.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon_kms.c b/sys/dev/pci/drm/radeon/radeon_kms.c index acc0fbc95cb..f9e72e449cd 100644 --- a/sys/dev/pci/drm/radeon/radeon_kms.c +++ b/sys/dev/pci/drm/radeon/radeon_kms.c @@ -435,6 +435,7 @@ radeondrm_attach_kms(struct device *parent, struct device *self, void *aux) pcireg_t type; int i; uint8_t rmmio_bar; + paddr_t fb_aper; #if !defined(__sparc64__) pcireg_t addr, mask; int s; @@ -660,6 +661,10 @@ radeondrm_attach_kms(struct device *parent, struct device *self, void *aux) } #endif + fb_aper = bus_space_mmap(rdev->memt, rdev->fb_aper_offset, 0, 0, 0); + if (fb_aper != -1) + rasops_claim_framebuffer(fb_aper, rdev->fb_aper_size, self); + rdev->shutdown = true; config_mountroot(self, radeondrm_attachhook); } |