Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Intel G43 integrated graphics on -current





Brad du Plessis wrote:

===================================================================
RCS file: /cvsroot/src/sys/dev/pci/agp_i810.c,v
@@ -291,7 +299,22 @@
         return error;
     }
- if (isc->chiptype == CHIP_I915 || isc->chiptype == CHIP_G33) {
+ if (isc->chiptype == CHIP_G43)
+ {
+ error = pci_mapreg_map(&isc->vga_pa, AGP_I915_MMADR,
+ PCI_MAPREG_TYPE_MEM, 0, &isc->bst, &isc->bsh,
+ &mmadr, &mmadrsize);
+ if (error != 0) {
+ aprint_error(": can't map mmadr registers\n");
+ agp_generic_detach(sc);
+ return error;
+ }
+
+ isc->gtt_bsh=isc->bsh;
+ isc->gtt_bst=isc->bst + (2*1024*1024);
+ }

Looking at this again this doesn't seem right. Perhaps the 2MB offset should be used along with the base MMIO tag and handle for the CHIP_G43 in the WRITEGTT define. Something like this? :

#define WRITEGTT(off, v)                        \
    do {                                \
       if (isc->chiptype == CHIP_G43) { \
            bus_space_write_4(isc->bst, isc->bsh,    \
(u_int32_t)((off) >> AGP_PAGE_SHIFT) * 4 + (2*1024*1024), \
                (v));                    \


Brad



Home | Main Index | Thread Index | Old Index