summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-04-14 15:35:38 -0700
committerJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-04-14 15:35:38 -0700
commit2aa183db1ff0fb6044d24eae51854ff128da9a0f (patch)
treec0daa91ab8b94ce2edbe3af8d3c1a835ccbe2933 /linux-core
parent65619cab276ba1f00014f9701b8347e2b834abe4 (diff)
Use drm_mem_reg_ioremap to map buffer object.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_fb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/linux-core/drm_fb.c b/linux-core/drm_fb.c
index a70e4d52..df979cd1 100644
--- a/linux-core/drm_fb.c
+++ b/linux-core/drm_fb.c
@@ -107,6 +107,7 @@ int drmfb_probe(struct drm_device *dev, struct drm_framebuffer *fb)
struct device *device = &dev->pdev->dev;
struct fb_var_screeninfo *var_info;
unsigned long base, size;
+ int ret;
info = framebuffer_alloc(sizeof(struct drmfb_par), device);
if (!info){
@@ -139,7 +140,9 @@ int drmfb_probe(struct drm_device *dev, struct drm_framebuffer *fb)
size = (fb->bo->mem.num_pages * PAGE_SIZE);
DRM_DEBUG("remapping %08X %d\n", base, size);
- fb->virtual_base = ioremap_nocache(base, size);
+ ret = drm_mem_reg_ioremap(dev, &fb->bo->mem, &fb->virtual_base);
+ if (ret)
+ DRM_ERROR("error mapping fb: %d\n", ret);
info->screen_base = fb->virtual_base;
info->screen_size = size;