aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/efifb.c
diff options
context:
space:
mode:
authorBrian Maly <bmaly@redhat.com>2009-03-31 18:25:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-01 11:59:34 -0400
commite14a685dfabf3ceeb366f1db1a22471b8f98a08b (patch)
treea9c55be12f88f62b640473e1cec8830d893e074e /drivers/video/efifb.c
parent04645fc337eef283887d3b1204017f1860ed2ff7 (diff)
efifb: dmi set video type
The current logic for dmi matching in efifb does not allow efifb to load on all hardware that we can dmi match for. For a real world example, boot with elilo (3.7 or 3.8 vanilla) and on a Apple (MacBook) and EFI framebuffer driver will not load (you will have no video). This specific hardware is efi v1.10, so we have UGA and not GOP. Without special bootloader magic (i.e. extra elilo patches for UGA graphics detection) no screen info will be passed to the kernel and as a result efifb will not load. This patch allows the dmi match to happen by moving it to earlier in efifb_init, and sets the video type (in set_system) so that efifb can load when we have a valid dmi match and already know the specifics of the hardware. Without this patch the efifb driver will fail to load in the event screen info is not found and passed in by the bootloader, being that we will never get to look for a dmi match. A primary reason for matching with dmi is because not all bootloaders detect the video info properly. The solution is that in the event of a dmi match, we should set screen_info.orig_video_isVGA. Most bootloaders fail to set screen info on Apple hardware, and this is a big problem for people who use Apple hardware. Tested on a MacBook SantaRosa with elilo-3.8 (vanilla) and resolves the issue, the dmi match now works, EFI framebuffer now loads and video works. Signed-off-by: Brian Maly <bmaly@redhat.com> Acked-by: Huang Ying <ying.huang@intel.com> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Cc: Chandramouli Narayanan <mouli@linux.intel.com> Acked-by: Peter Jones <pjones@redhat.com> 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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
index daf9b81878a4..0c5b9a9fd56f 100644
--- a/drivers/video/efifb.c
+++ b/drivers/video/efifb.c
@@ -129,6 +129,8 @@ static int set_system(const struct dmi_system_id *id)
129 screen_info.lfb_width = info->width; 129 screen_info.lfb_width = info->width;
130 if (screen_info.lfb_height == 0) 130 if (screen_info.lfb_height == 0)
131 screen_info.lfb_height = info->height; 131 screen_info.lfb_height = info->height;
132 if (screen_info.orig_video_isVGA == 0)
133 screen_info.orig_video_isVGA = VIDEO_TYPE_EFI;
132 134
133 return 0; 135 return 0;
134} 136}
@@ -374,9 +376,10 @@ static int __init efifb_init(void)
374 int ret; 376 int ret;
375 char *option = NULL; 377 char *option = NULL;
376 378
379 dmi_check_system(dmi_system_table);
380
377 if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI) 381 if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI)
378 return -ENODEV; 382 return -ENODEV;
379 dmi_check_system(dmi_system_table);
380 383
381 if (fb_get_options("efifb", &option)) 384 if (fb_get_options("efifb", &option))
382 return -ENODEV; 385 return -ENODEV;