diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2010-05-16 11:27:03 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-05-18 02:19:27 -0400 |
commit | 1471ca9aa71cd37b6a7476bb6f06a3a8622ea1bd (patch) | |
tree | 3bf5ef9fea79b0b92220cfcc3842db7afb5cd63d /drivers/video/vesafb.c | |
parent | 3da1f33e79a5922c1a31077e7b33aba1cec19b94 (diff) |
fbdev: allow passing more than one aperture for handoff
It removes a hack from nouveau code which had to detect which
region to pass to kick vesafb/efifb.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Peter Jones <pjones@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/video/vesafb.c')
-rw-r--r-- | drivers/video/vesafb.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c index 0cadf7aee27e..090aa1a9be6e 100644 --- a/drivers/video/vesafb.c +++ b/drivers/video/vesafb.c | |||
@@ -177,7 +177,7 @@ static void vesafb_destroy(struct fb_info *info) | |||
177 | { | 177 | { |
178 | if (info->screen_base) | 178 | if (info->screen_base) |
179 | iounmap(info->screen_base); | 179 | iounmap(info->screen_base); |
180 | release_mem_region(info->aperture_base, info->aperture_size); | 180 | release_mem_region(info->apertures->ranges[0].base, info->apertures->ranges[0].size); |
181 | framebuffer_release(info); | 181 | framebuffer_release(info); |
182 | } | 182 | } |
183 | 183 | ||
@@ -295,8 +295,13 @@ static int __init vesafb_probe(struct platform_device *dev) | |||
295 | info->par = NULL; | 295 | info->par = NULL; |
296 | 296 | ||
297 | /* set vesafb aperture size for generic probing */ | 297 | /* set vesafb aperture size for generic probing */ |
298 | info->aperture_base = screen_info.lfb_base; | 298 | info->apertures = alloc_apertures(1); |
299 | info->aperture_size = size_total; | 299 | if (!info->apertures) { |
300 | err = -ENOMEM; | ||
301 | goto err; | ||
302 | } | ||
303 | info->apertures->ranges[0].base = screen_info.lfb_base; | ||
304 | info->apertures->ranges[0].size = size_total; | ||
300 | 305 | ||
301 | info->screen_base = ioremap(vesafb_fix.smem_start, vesafb_fix.smem_len); | 306 | info->screen_base = ioremap(vesafb_fix.smem_start, vesafb_fix.smem_len); |
302 | if (!info->screen_base) { | 307 | if (!info->screen_base) { |