summaryrefslogtreecommitdiffstats
path: root/drivers/video/efifb.c
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2010-02-22 12:44:22 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2010-02-22 19:50:34 -0800
commit89f3f2199084a160a3a45fa6d9af235696321758 (patch)
tree4b062cfa6c32658a7b697fa0699ff30c90cea15b /drivers/video/efifb.c
parent115079aad949cba31755eb4e2576edba7fddfdbc (diff)
downloadlinux-89f3f2199084a160a3a45fa6d9af235696321758.tar.gz
linux-89f3f2199084a160a3a45fa6d9af235696321758.tar.bz2
linux-89f3f2199084a160a3a45fa6d9af235696321758.zip
efifb: fix framebuffer handoff
Commit 4410f3910947dcea8672280b3adecd53cec4e85e ("fbdev: add support for handoff from firmware to hw framebuffers") didn't add fb_destroy operation to efifb. Fix it and change aperture_size to match size passed to request_mem_region. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=15151 Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Reported-by: Alex Zhavnerchik <alex.vizor@gmail.com> Tested-by: Alex Zhavnerchik <alex.vizor@gmail.com> Acked-by: Peter Jones <pjones@redhat.com> Cc: Huang Ying <ying.huang@intel.com> Cc: Dave Airlie <airlied@redhat.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/efifb.c')
-rw-r--r--drivers/video/efifb.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
index eb12182b2059..d25df51bb0d2 100644
--- a/drivers/video/efifb.c
+++ b/drivers/video/efifb.c
@@ -161,8 +161,17 @@ static int efifb_setcolreg(unsigned regno, unsigned red, unsigned green,
return 0;
}
+static void efifb_destroy(struct fb_info *info)
+{
+ if (info->screen_base)
+ iounmap(info->screen_base);
+ release_mem_region(info->aperture_base, info->aperture_size);
+ framebuffer_release(info);
+}
+
static struct fb_ops efifb_ops = {
.owner = THIS_MODULE,
+ .fb_destroy = efifb_destroy,
.fb_setcolreg = efifb_setcolreg,
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
@@ -281,7 +290,7 @@ static int __init efifb_probe(struct platform_device *dev)
info->par = NULL;
info->aperture_base = efifb_fix.smem_start;
- info->aperture_size = size_total;
+ info->aperture_size = size_remap;
info->screen_base = ioremap(efifb_fix.smem_start, efifb_fix.smem_len);
if (!info->screen_base) {