From: Peter Jones <pjones@redhat.com>
To: Matthew Garrett <mjg@redhat.com>
Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] efifb: Skip DMI checks if the bootloader knows what it's doing
Date: Fri, 27 Apr 2012 13:37:37 -0400 [thread overview]
Message-ID: <4F9AD961.30605@redhat.com> (raw)
In-Reply-To: <1335538451-4395-1-git-send-email-mjg@redhat.com>
On 04/27/2012 10:54 AM, Matthew Garrett wrote:
> The majority of the DMI checks in efifb are for cases where the bootloader
> has provided invalid information. However, on some machines the overrides
> may do more harm than good due to configuration differences between machines
> with the same machine identifier. It turns out that it's possible for the
> bootloader to get the correct information on GOP-based systems, but we
> can't guarantee that the kernel's being booted with one that's been updated
> to do so. Add support for a capabilities flag that can be set by the
> bootloader, and skip the DMI checks in that case.
>
> Signed-off-by: Matthew Garrett<mjg@redhat.com>
Looks right to me.
Acked-by: Peter Jones <pjones@redhat.com>
> ---
> drivers/video/efifb.c | 4 +++-
> include/linux/screen_info.h | 2 ++
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
> index b4a632a..932abaa 100644
> --- a/drivers/video/efifb.c
> +++ b/drivers/video/efifb.c
> @@ -553,7 +553,9 @@ static int __init efifb_init(void)
> int ret;
> char *option = NULL;
>
> - dmi_check_system(dmi_system_table);
> + if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI ||
> + !(screen_info.capabilities& VIDEO_CAPABILITY_SKIP_QUIRKS))
> + dmi_check_system(dmi_system_table);
>
> if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI)
> return -ENODEV;
> diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h
> index 899fbb4..fb3c5a8 100644
> --- a/include/linux/screen_info.h
> +++ b/include/linux/screen_info.h
> @@ -68,6 +68,8 @@ struct screen_info {
>
> #define VIDEO_FLAGS_NOCURSOR (1<< 0) /* The video mode has no cursor set */
>
> +#define VIDEO_CAPABILITY_SKIP_QUIRKS (1<< 0)
> +
> #ifdef __KERNEL__
> extern struct screen_info screen_info;
>
--
Peter
Any connection between your reality and mine is purely coincidental.
01234567890123456789012345678901234567890123456789012345678901234567890123456789
next prev parent reply other threads:[~2012-04-27 17:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-27 14:54 [PATCH] efifb: Skip DMI checks if the bootloader knows what it's doing Matthew Garrett
2012-04-27 17:37 ` Peter Jones [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-07-27 16:58 Matthew Garrett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F9AD961.30605@redhat.com \
--to=pjones@redhat.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox