Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753080AbcD1KiP (ORCPT ); Thu, 28 Apr 2016 06:38:15 -0400 Received: from terminus.zytor.com ([198.137.202.10]:47778 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752868AbcD1KiL (ORCPT ); Thu, 28 Apr 2016 06:38:11 -0400 Date: Thu, 28 Apr 2016 03:37:12 -0700 From: tip-bot for Ard Biesheuvel Message-ID: Cc: will.deacon@arm.com, dh.herrmann@gmail.com, hpa@zytor.com, mark.rutland@arm.com, mingo@kernel.org, linux-kernel@vger.kernel.org, pjones@redhat.com, peterz@infradead.org, ard.biesheuvel@linaro.org, matt@codeblueprint.co.uk, bp@alien8.de, tglx@linutronix.de Reply-To: bp@alien8.de, matt@codeblueprint.co.uk, tglx@linutronix.de, linux-kernel@vger.kernel.org, pjones@redhat.com, ard.biesheuvel@linaro.org, peterz@infradead.org, mark.rutland@arm.com, mingo@kernel.org, hpa@zytor.com, will.deacon@arm.com, dh.herrmann@gmail.com In-Reply-To: <1461614832-17633-19-git-send-email-matt@codeblueprint.co.uk> References: <1461614832-17633-19-git-send-email-matt@codeblueprint.co.uk> To: linux-tip-commits@vger.kernel.org Subject: [tip:efi/core] x86/efi/efifb: Move DMI based quirks handling out of generic code Git-Commit-ID: 21289ec02b41c4b928a0b3de1778b325d714eea3 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3985 Lines: 114 Commit-ID: 21289ec02b41c4b928a0b3de1778b325d714eea3 Gitweb: http://git.kernel.org/tip/21289ec02b41c4b928a0b3de1778b325d714eea3 Author: Ard Biesheuvel AuthorDate: Mon, 25 Apr 2016 21:06:50 +0100 Committer: Ingo Molnar CommitDate: Thu, 28 Apr 2016 11:33:57 +0200 x86/efi/efifb: Move DMI based quirks handling out of generic code The efifb quirks handling based on DMI identification of the platform is specific to x86, so move it to x86 arch code. Signed-off-by: Ard Biesheuvel Signed-off-by: Matt Fleming Acked-by: David Herrmann Acked-by: Peter Jones Cc: Borislav Petkov Cc: Mark Rutland Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1461614832-17633-19-git-send-email-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar --- arch/x86/include/asm/efi.h | 2 ++ arch/x86/kernel/sysfb_efi.c | 15 +++++++++++++++ drivers/video/fbdev/efifb.c | 15 ++++----------- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h index 10e4407..8747abe 100644 --- a/arch/x86/include/asm/efi.h +++ b/arch/x86/include/asm/efi.h @@ -180,6 +180,8 @@ static inline bool efi_runtime_supported(void) extern struct console early_efi_console; extern void parse_efi_setup(u64 phys_addr, u32 data_len); +extern void efifb_setup_from_dmi(struct screen_info *si, const char *opt); + #ifdef CONFIG_EFI_MIXED extern void efi_thunk_runtime_setup(void); extern efi_status_t efi_thunk_set_virtual_address_map( diff --git a/arch/x86/kernel/sysfb_efi.c b/arch/x86/kernel/sysfb_efi.c index b285d4e..e21a8a7 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[] = { [M_UNKNOWN] = { NULL, 0, 0, 0, 0, OVERRIDE_NONE } }; +void efifb_setup_from_dmi(struct screen_info *si, const char *opt) +{ + int i; + + for (i = 0; i < M_UNKNOWN; i++) { + if (efifb_dmi_list[i].base != 0 && + !strcmp(opt, efifb_dmi_list[i].optname)) { + si->lfb_base = efifb_dmi_list[i].base; + si->lfb_linelength = efifb_dmi_list[i].stride; + si->lfb_width = efifb_dmi_list[i].width; + si->lfb_height = efifb_dmi_list[i].height; + } + } +} + #define choose_value(dmivalue, fwvalue, field, flags) ({ \ typeof(fwvalue) _ret_ = fwvalue; \ if ((flags) & (field)) \ diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c index 95d293b..dd59436 100644 --- a/drivers/video/fbdev/efifb.c +++ b/drivers/video/fbdev/efifb.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -15,7 +16,7 @@ #include #include #include