Hello,

Based on the history it seems that the drm code is now used for AMD/ATI
graphics hardware, leaving those with lowly old nvidia cards (which
can't be replaced in the case of my powerbook) to rely on xf86-video-nv
for a proper full-color X experience; the problem is that the existing
logic here will select the wrong mmio region (reported as starting at
0x00000000) and prevent mmap()-ing the correct one from userland as a
result. This solves that problem by uncommenting the check for 0.

I"m not personally aware of any hardware that would be negatively
affected by this; perhaps some newer chipsets would have more comlicated
memory layouts but they'll have the benefit of the AGP aperture in
correspondingly 'newer' hardware, so I'm curious if this would be
acceptable:

diff --git sys/arch/macppc/pci/vgafb.c sys/arch/macppc/pci/vgafb.c
index e3752045b95..41bbdcd8ab2 100644
--- sys/arch/macppc/pci/vgafb.c
+++ sys/arch/macppc/pci/vgafb.c
@@ -517,8 +517,7 @@ vgafb_mapregs(struct vgafb_softc *sc, struct 
pci_attach_args *pa)
                            &ba, &bs, NULL);
                        if (rv != 0)
                                continue;
-
-                       if (bs == 0 /* || ba == 0 */) {
+                       if (bs == 0 || ba == 0 ) {
                                /* ignore this entry */
                        } else if (hasmem == 0) {
                                /*

Reply via email to