aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/sysfb_efi.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/sysfb_efi.c')
-rw-r--r--arch/x86/kernel/sysfb_efi.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/x86/kernel/sysfb_efi.c b/arch/x86/kernel/sysfb_efi.c
index 5da924bbf0a0..623965e86b65 100644
--- a/arch/x86/kernel/sysfb_efi.c
+++ b/arch/x86/kernel/sysfb_efi.c
@@ -68,6 +68,21 @@ struct efifb_dmi_info efifb_dmi_list[] = {
68 [M_UNKNOWN] = { NULL, 0, 0, 0, 0, OVERRIDE_NONE } 68 [M_UNKNOWN] = { NULL, 0, 0, 0, 0, OVERRIDE_NONE }
69}; 69};
70 70
71void efifb_setup_from_dmi(struct screen_info *si, const char *opt)
72{
73 int i;
74
75 for (i = 0; i < M_UNKNOWN; i++) {
76 if (efifb_dmi_list[i].base != 0 &&
77 !strcmp(opt, efifb_dmi_list[i].optname)) {
78 si->lfb_base = efifb_dmi_list[i].base;
79 si->lfb_linelength = efifb_dmi_list[i].stride;
80 si->lfb_width = efifb_dmi_list[i].width;
81 si->lfb_height = efifb_dmi_list[i].height;
82 }
83 }
84}
85
71#define choose_value(dmivalue, fwvalue, field, flags) ({ \ 86#define choose_value(dmivalue, fwvalue, field, flags) ({ \
72 typeof(fwvalue) _ret_ = fwvalue; \ 87 typeof(fwvalue) _ret_ = fwvalue; \
73 if ((flags) & (field)) \ 88 if ((flags) & (field)) \