aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/drm/ati_pcigart.c
diff options
context:
space:
mode:
authorRobert Noland <rnoland@FreeBSD.org>2009-03-25 01:41:56 +0000
committerRobert Noland <rnoland@FreeBSD.org>2009-03-25 01:41:56 +0000
commiteccb3bb8f6075127aab2885b6364385c8d7737de (patch)
treeabfd0bec96a170c5e3d7eb89b1ccf5ec1218b4af /sys/dev/drm/ati_pcigart.c
parente88ad97fcdfa8869177e6601efd0f42086780942 (diff)
Notes
Diffstat (limited to 'sys/dev/drm/ati_pcigart.c')
-rw-r--r--sys/dev/drm/ati_pcigart.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/drm/ati_pcigart.c b/sys/dev/drm/ati_pcigart.c
index 7e5d20761f73..e3fecd1071b0 100644
--- a/sys/dev/drm/ati_pcigart.c
+++ b/sys/dev/drm/ati_pcigart.c
@@ -104,7 +104,7 @@ drm_ati_alloc_pcigart_table(struct drm_device *dev,
return ENOMEM;
}
- dev->sg->dmah = dmah;
+ gart_info->dmah = dmah;
return 0;
}
@@ -113,12 +113,12 @@ static void
drm_ati_free_pcigart_table(struct drm_device *dev,
struct drm_ati_pcigart_info *gart_info)
{
- struct drm_dma_handle *dmah = dev->sg->dmah;
+ struct drm_dma_handle *dmah = gart_info->dmah;
bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map);
bus_dma_tag_destroy(dmah->tag);
free(dmah, DRM_MEM_DMA);
- dev->sg->dmah = NULL;
+ gart_info->dmah = NULL;
}
int
@@ -134,7 +134,7 @@ drm_ati_pcigart_cleanup(struct drm_device *dev,
if (gart_info->bus_addr) {
if (gart_info->gart_table_location == DRM_ATI_GART_MAIN) {
gart_info->bus_addr = 0;
- if (dev->sg->dmah)
+ if (gart_info->dmah)
drm_ati_free_pcigart_table(dev, gart_info);
}
}
@@ -169,8 +169,8 @@ drm_ati_pcigart_init(struct drm_device *dev,
goto done;
}
- address = (void *)dev->sg->dmah->vaddr;
- bus_address = dev->sg->dmah->busaddr;
+ address = (void *)gart_info->dmah->vaddr;
+ bus_address = gart_info->dmah->busaddr;
} else {
address = gart_info->addr;
bus_address = gart_info->bus_addr;