diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-05-11 00:06:40 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-05-11 00:06:40 +0000 |
commit | c943cdb9e19d7789ca8cf02b4c9b0921bc9cc61b (patch) | |
tree | 4a64b010791e634de8f5cb98e429c186cfaf8075 /sys/dev/pci/drm/radeon_drv.c | |
parent | dcc04216edc250771b008004668abcdb51e19363 (diff) |
Rework the pcigart stuff somewhat.
firstly: move the pcigart initialisation in radeon_cp.c into its own
function to avoid the horrible nesting and make it more readable.
secondly: make the pcigart code more intelligent depending on whether
the gart table is in pci memory, or system memory. In the former case we
use the bus_space functions and thus don't need BUS_SPACE_LINEAR, while
i'm here, stop using the drm wrapper functions for mapping (which
require a drm_local_map structure, which will die eventually) and just
use bus_space_map itself.
tested on pcie (in framebuffer memory) here on my x800. tested on an
i386 agp card forced to pci mode by sthen. Doesn't make IGP chips
worse, doesn't make them better either (tested on a rs690).
basic idea from a commit "upstream" a while ago. All the code from yours
truly.
Diffstat (limited to 'sys/dev/pci/drm/radeon_drv.c')
-rw-r--r-- | sys/dev/pci/drm/radeon_drv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/radeon_drv.c b/sys/dev/pci/drm/radeon_drv.c index 3623862e8fe..b302470d9cf 100644 --- a/sys/dev/pci/drm/radeon_drv.c +++ b/sys/dev/pci/drm/radeon_drv.c @@ -528,6 +528,7 @@ radeondrm_attach(struct device *parent, struct device *self, void *aux) PCI_PRODUCT(pa->pa_id), radeondrm_pciidlist); dev_priv->flags = id_entry->driver_private; dev_priv->pc = pa->pa_pc; + dev_priv->bst = pa->pa_memt; bar = vga_pci_bar_info((struct vga_pci_softc *)parent, 0); if (bar == NULL) { |