[PATCH] x86: Clear isVGA flag if current fb driver is mimicking VGA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some device (eg. hyperv_fb) will mimic EFI (or VESA) VGA on first boot
up, but after the real driver is loaded, it will switch to new mode
and no longer compatible with EFI/VESA VGA. Keep setting
orig_video_isVGA to EFI/VESA VGA flag will get wrong driver loaded and
try to manipulate the framebuffer in a wrong way.

As we have already take care of "VESA VGA" and "EFI VGA", just set the
orig_video_isVGA to 0 for any other driver reports as EFI/VESA VGA but
is not EFI/VESA VGA.

Signed-off-by: Kairui Song <kasong@xxxxxxxxxx>
---
 kexec/arch/i386/x86-linux-setup.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kexec/arch/i386/x86-linux-setup.c b/kexec/arch/i386/x86-linux-setup.c
index dc785a2..a129812 100644
--- a/kexec/arch/i386/x86-linux-setup.c
+++ b/kexec/arch/i386/x86-linux-setup.c
@@ -152,6 +152,11 @@ static int setup_linux_vesafb(struct x86_linux_param_header *real_mode)
 		err = get_bootparam(&real_mode->orig_video_isVGA, offset, 1);
 		if (err)
 			goto out;
+
+		if (real_mode->orig_video_isVGA == 0x70 || real_mode->orig_video_isVGA == 0x23) {
+			/* Clear isVGA flag for fb drivers that mimic EFI/VESA VGA */
+			real_mode->orig_video_isVGA = 0;
+		}
 	}
 	close(fd);
 
-- 
2.19.1


_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux