diff options
Diffstat (limited to 'drivers/video/efifb.c')
-rw-r--r-- | drivers/video/efifb.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c index 581d2dbf675a..4a56f46af40a 100644 --- a/drivers/video/efifb.c +++ b/drivers/video/efifb.c | |||
@@ -49,6 +49,7 @@ enum { | |||
49 | M_MBP_2, /* MacBook Pro 2nd gen */ | 49 | M_MBP_2, /* MacBook Pro 2nd gen */ |
50 | M_MBP_SR, /* MacBook Pro (Santa Rosa) */ | 50 | M_MBP_SR, /* MacBook Pro (Santa Rosa) */ |
51 | M_MBP_4, /* MacBook Pro, 4th gen */ | 51 | M_MBP_4, /* MacBook Pro, 4th gen */ |
52 | M_MBP_5_1, /* MacBook Pro, 5,1th gen */ | ||
52 | M_UNKNOWN /* placeholder */ | 53 | M_UNKNOWN /* placeholder */ |
53 | }; | 54 | }; |
54 | 55 | ||
@@ -70,6 +71,7 @@ static struct efifb_dmi_info { | |||
70 | [M_MBP_2] = { "mbp2", 0, 0, 0, 0 }, /* placeholder */ | 71 | [M_MBP_2] = { "mbp2", 0, 0, 0, 0 }, /* placeholder */ |
71 | [M_MBP_SR] = { "mbp3", 0x80030000, 2048 * 4, 1440, 900 }, | 72 | [M_MBP_SR] = { "mbp3", 0x80030000, 2048 * 4, 1440, 900 }, |
72 | [M_MBP_4] = { "mbp4", 0xc0060000, 2048 * 4, 1920, 1200 }, | 73 | [M_MBP_4] = { "mbp4", 0xc0060000, 2048 * 4, 1920, 1200 }, |
74 | [M_MBP_5_1] = { "mbp51", 0xc0010000, 2048 * 4, 1440, 900 }, | ||
73 | [M_UNKNOWN] = { NULL, 0, 0, 0, 0 } | 75 | [M_UNKNOWN] = { NULL, 0, 0, 0, 0 } |
74 | }; | 76 | }; |
75 | 77 | ||
@@ -106,6 +108,7 @@ static struct dmi_system_id __initdata dmi_system_table[] = { | |||
106 | EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro3,1", M_MBP_SR), | 108 | EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro3,1", M_MBP_SR), |
107 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro3,1", M_MBP_SR), | 109 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro3,1", M_MBP_SR), |
108 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro4,1", M_MBP_4), | 110 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro4,1", M_MBP_4), |
111 | EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro5,1", M_MBP_5_1), | ||
109 | {}, | 112 | {}, |
110 | }; | 113 | }; |
111 | 114 | ||
@@ -165,7 +168,7 @@ static void efifb_destroy(struct fb_info *info) | |||
165 | { | 168 | { |
166 | if (info->screen_base) | 169 | if (info->screen_base) |
167 | iounmap(info->screen_base); | 170 | iounmap(info->screen_base); |
168 | release_mem_region(info->aperture_base, info->aperture_size); | 171 | release_mem_region(info->apertures->ranges[0].base, info->apertures->ranges[0].size); |
169 | framebuffer_release(info); | 172 | framebuffer_release(info); |
170 | } | 173 | } |
171 | 174 | ||
@@ -289,8 +292,13 @@ static int __devinit efifb_probe(struct platform_device *dev) | |||
289 | info->pseudo_palette = info->par; | 292 | info->pseudo_palette = info->par; |
290 | info->par = NULL; | 293 | info->par = NULL; |
291 | 294 | ||
292 | info->aperture_base = efifb_fix.smem_start; | 295 | info->apertures = alloc_apertures(1); |
293 | info->aperture_size = size_remap; | 296 | if (!info->apertures) { |
297 | err = -ENOMEM; | ||
298 | goto err_release_fb; | ||
299 | } | ||
300 | info->apertures->ranges[0].base = efifb_fix.smem_start; | ||
301 | info->apertures->ranges[0].size = size_remap; | ||
294 | 302 | ||
295 | info->screen_base = ioremap(efifb_fix.smem_start, efifb_fix.smem_len); | 303 | info->screen_base = ioremap(efifb_fix.smem_start, efifb_fix.smem_len); |
296 | if (!info->screen_base) { | 304 | if (!info->screen_base) { |