summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/mga_dma.c1
-rw-r--r--shared-core/mga_drm.h2
-rw-r--r--shared-core/r128_cce.c6
-rw-r--r--shared-core/radeon_cp.c1
4 files changed, 7 insertions, 3 deletions
diff --git a/shared-core/mga_dma.c b/shared-core/mga_dma.c
index 31df5d6e..005c5234 100644
--- a/shared-core/mga_dma.c
+++ b/shared-core/mga_dma.c
@@ -819,6 +819,7 @@ static int mga_do_init_dma(drm_device_t * dev, drm_mga_init_t * init)
DRM_ERROR("failed to find primary dma region!\n");
return DRM_ERR(EINVAL);
}
+ dev->agp_buffer_token = init->buffers_offset;
dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset);
if (!dev->agp_buffer_map) {
DRM_ERROR("failed to find dma buffer region!\n");
diff --git a/shared-core/mga_drm.h b/shared-core/mga_drm.h
index 5b8f1564..5bcdbfab 100644
--- a/shared-core/mga_drm.h
+++ b/shared-core/mga_drm.h
@@ -312,7 +312,7 @@ typedef struct drm_mga_dma_bootstrap {
* an IOMMU) is being used for "AGP" textures.
*/
/*@{*/
- drm_handle_t texture_handle; /**< Handle used to map AGP textures. */
+ unsigned long texture_handle; /**< Handle used to map AGP textures. */
uint32_t texture_size; /**< Size of the AGP texture region. */
/*@}*/
diff --git a/shared-core/r128_cce.c b/shared-core/r128_cce.c
index 34348cf0..33553670 100644
--- a/shared-core/r128_cce.c
+++ b/shared-core/r128_cce.c
@@ -323,7 +323,8 @@ static void r128_cce_init_ring_buffer(drm_device_t * dev,
ring_start = dev_priv->cce_ring->offset - dev->agp->base;
else
#endif
- ring_start = dev_priv->cce_ring->offset - dev->sg->handle;
+ ring_start = dev_priv->cce_ring->offset -
+ (unsigned long)dev->sg->virtual;
R128_WRITE(R128_PM4_BUFFER_OFFSET, ring_start | R128_AGP_OFFSET);
@@ -484,6 +485,7 @@ static int r128_do_init_cce(drm_device_t * dev, drm_r128_init_t * init)
r128_do_cleanup_cce(dev);
return DRM_ERR(EINVAL);
}
+ dev->agp_buffer_token = init->buffers_offset;
dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset);
if (!dev->agp_buffer_map) {
DRM_ERROR("could not find dma buffer region!\n");
@@ -535,7 +537,7 @@ static int r128_do_init_cce(drm_device_t * dev, drm_r128_init_t * init)
dev_priv->cce_buffers_offset = dev->agp->base;
else
#endif
- dev_priv->cce_buffers_offset = dev->sg->handle;
+ dev_priv->cce_buffers_offset = (unsigned long)dev->sg->virtual;
dev_priv->ring.start = (u32 *) dev_priv->cce_ring->handle;
dev_priv->ring.end = ((u32 *) dev_priv->cce_ring->handle
diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c
index 8694d043..09a473d7 100644
--- a/shared-core/radeon_cp.c
+++ b/shared-core/radeon_cp.c
@@ -1423,6 +1423,7 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
radeon_do_cleanup_cp(dev);
return DRM_ERR(EINVAL);
}
+ dev->agp_buffer_token = init->buffers_offset;
dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset);
if (!dev->agp_buffer_map) {
DRM_ERROR("could not find dma buffer region!\n");