vgacon: check for efi machine
vgacon: check for efi machine

It seems there is a small problem of VGA palette corruption on EFI
machine.  When the kernel initializes the architecture, it checks if the
machine is a EFI machine and assumes that a VGA console can exist.

When it initializes the console in vgacon_startup it checks if it can
really use the VGA console.  I think this is where a check is missing.
Currently, the function can fail if a VESA boot mode is detected but not if
a EFI boot mode was used.

Thus vgacon_startup() doesn't fail and initialize the video card for a real
VGA mode.  This function changes the first 16entries of the VGA palette.

When the efifb driver kicks in, the palette is not restored to default
ramp value, thus the 16 first entry remain in a modified state.  The
following patch prevent this corruption.

Signed-off-by: Yannick Heneault <b6851a81ede638476cdf4f638d8ac3520e732e55@matrox.com>
Cc: Dave Airlie <f2295d84e358395675bc8031be58672073ae065e@linux.ie>
Cc: "H. Peter Anvin" <8a453bad9912ffe59bc0f0b8abe03df9be19379e@zytor.com>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs