diff options
author | Thomas White <taw@bitwiz.org.uk> | 2009-08-04 22:24:49 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2009-08-04 22:24:49 +0100 |
commit | cd5b72b48c0f1f1e94189f187f78a9e3a5f8507d (patch) | |
tree | 513c631e2034eb73c409783c6b6c3e9b3bd3f0b6 | |
parent | bd99667512b32eb4a765d96940b00e0f2eb80ae5 (diff) |
ioremap() the framebuffer properly
This fixes the glamo-kms-fb initialisation to ioremap() the proper address for the
framebuffer, rather than just assuming it's at the start of the VRAM.
Signed-off-by: Thomas White <taw@bitwiz.org.uk>
-rw-r--r-- | drivers/mfd/glamo/glamo-kms-fb.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/mfd/glamo/glamo-kms-fb.c b/drivers/mfd/glamo/glamo-kms-fb.c index 3f28134dd99..74ccd3ba3b1 100644 --- a/drivers/mfd/glamo/glamo-kms-fb.c +++ b/drivers/mfd/glamo/glamo-kms-fb.c @@ -368,10 +368,11 @@ int glamofb_create(struct drm_device *dev, uint32_t fb_width, struct glamo_framebuffer *glamo_fb; struct drm_mode_fb_cmd mode_cmd; struct drm_gem_object *fbo = NULL; - struct drm_glamo_gem_object *obj_priv; + struct drm_glamo_gem_object *gobj; struct device *device = &dev->platform_dev->dev; struct glamodrm_handle *gdrm; int size, ret; + unsigned long offs; gdrm = dev->dev_private; @@ -395,7 +396,7 @@ int glamofb_create(struct drm_device *dev, uint32_t fb_width, ret = -ENOMEM; goto out; } - obj_priv = fbo->driver_private; + gobj = fbo->driver_private; mutex_lock(&dev->struct_mutex); @@ -438,7 +439,9 @@ int glamofb_create(struct drm_device *dev, uint32_t fb_width, info->flags = FBINFO_DEFAULT; - info->screen_base = ioremap(gdrm->vram->start, RESSIZE(gdrm->vram)); + offs = gobj->block->start; + info->screen_base = ioremap(gdrm->vram->start + offs, + GLAMO_FRAMEBUFFER_ALLOCATION); if (!info->screen_base) { printk(KERN_ERR "[glamo-drm] Couldn't map framebuffer!\n"); ret = -ENOSPC; |