Skip to content

Commit

Permalink
efifb: fix framebuffer handoff
Browse files Browse the repository at this point in the history
Commit 4410f39 ("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:https://bugzilla.kernel.org/show_bug.cgi?id=15151

Signed-off-by: Marcin Slusarz <[email protected]>
Reported-by: Alex Zhavnerchik <[email protected]>
Tested-by: Alex Zhavnerchik <[email protected]>
Acked-by: Peter Jones <[email protected]>
Cc: Huang Ying <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
mslusarz authored and torvalds committed Feb 23, 2010
1 parent 115079a commit 89f3f21
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion drivers/video/efifb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 89f3f21

Please sign in to comment.