• Daniel Vetter's avatar
    fbdev: Simplify fb_is_primary_device for x86 · 5ca1479c
    Daniel Vetter authored
    vga_default_device really is supposed to cover all corners, at least
    for x86. Additionally checking for rom shadowing should be redundant,
    because the bios/fw only does that for the boot vga device.
    
    If this turns out to be wrong, then most likely that's a special case
    which should be added to the vgaarb code, not replicated all over.
    
    Patch motived by changes to the aperture helpers, which also have this
    open code in a bunch of places, and which are all removed in a
    clean-up series. This function here is just for selecting the default
    fbdev device for fbcon, but I figured for consistency it might be good
    to throw this patch in on top.
    
    Note that the shadow rom check predates vgaarb, which was only wired
    up in commit 88674088 ("x86: Use vga_default_device() when
    determining whether an fb is primary"). That patch doesn't explain why
    we still fall back to the shadow rom check.
    
    v4:
    - fix commit message style (i.e., commit 1234 ("..."))
    - fix Daniel's S-o-b address
    
    v5:
    - add back an S-o-b tag with Daniel's Intel address
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
    Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
    Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
    Cc: Helge Deller <deller@gmx.de>
    Cc: Daniel Vetter <daniel@ffwll.ch>
    Cc: Javier Martinez Canillas <javierm@redhat.com>
    Cc: Thomas Zimmermann <tzimmermann@suse.de>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: x86@kernel.org
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20230406132109.32050-9-tzimmermann@suse.de
    5ca1479c
fbdev.c 660 Bytes