diff options
Diffstat (limited to 'drivers/char/drm/radeon_cp.c')
-rw-r--r-- | drivers/char/drm/radeon_cp.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c index 20bcf872b348..8255cc6fdc28 100644 --- a/drivers/char/drm/radeon_cp.c +++ b/drivers/char/drm/radeon_cp.c | |||
@@ -2048,6 +2048,27 @@ int radeon_driver_preinit(struct drm_device *dev, unsigned long flags) | |||
2048 | return ret; | 2048 | return ret; |
2049 | } | 2049 | } |
2050 | 2050 | ||
2051 | int radeon_presetup(struct drm_device *dev) | ||
2052 | { | ||
2053 | int ret; | ||
2054 | drm_local_map_t *map; | ||
2055 | drm_radeon_private_t *dev_priv = dev->dev_private; | ||
2056 | |||
2057 | ret = drm_addmap(dev, drm_get_resource_start(dev, 2), | ||
2058 | drm_get_resource_len(dev, 2), _DRM_REGISTERS, | ||
2059 | _DRM_READ_ONLY, &dev_priv->mmio); | ||
2060 | if (ret != 0) | ||
2061 | return ret; | ||
2062 | |||
2063 | ret = drm_addmap(dev, drm_get_resource_start(dev, 0), | ||
2064 | drm_get_resource_len(dev, 0), _DRM_FRAME_BUFFER, | ||
2065 | _DRM_WRITE_COMBINING, &map); | ||
2066 | if (ret != 0) | ||
2067 | return ret; | ||
2068 | |||
2069 | return 0; | ||
2070 | } | ||
2071 | |||
2051 | int radeon_driver_postcleanup(struct drm_device *dev) | 2072 | int radeon_driver_postcleanup(struct drm_device *dev) |
2052 | { | 2073 | { |
2053 | drm_radeon_private_t *dev_priv = dev->dev_private; | 2074 | drm_radeon_private_t *dev_priv = dev->dev_private; |