 diff -rup linux-3.14.19-orig/arch/x86/boot/video.c linux-3.14.19/arch/x86/boot/video.c
---- linux-3.14.19-orig/arch/x86/boot/video.c	2014-09-17 19:21:23.000000000 +0300
-+++ linux-3.14.19/arch/x86/boot/video.c	2014-09-20 14:11:16.564844745 +0300
-@@ -312,6 +312,40 @@ static void restore_screen(void)
+--- linux-3.14.19-orig/arch/x86/boot/video.c	2014-09-21 20:11:20.662964171 +0300
++++ linux-3.14.19/arch/x86/boot/video.c	2014-09-22 19:22:39.520944994 +0300
+@@ -312,6 +312,39 @@ static void restore_screen(void)
  	store_cursor_position();
  }
  

+				continue; /* Hidden mode */
+
+			unsigned long pixels = mi->x * mi->y;
+			if (max_pixels < pixels) {
+				mode = mode_id;
+				max_pixels = pixels;
+				max_depth = mi->depth;
+			} else if ((max_pixels == pixels) && (max_depth < mi->depth)) {
+				mode = mode_id;
+				max_pixels = pixels;
+				max_depth = mi->depth;
+			}
+		}
+	}

+
+	for (card = video_cards; card < video_cards_end; card++) {
+		mi = card->modes;
+		for (i = 0; i < card->nmodes; i++, mi++) {
+			int visible = mi->x && mi->y;
+			u16 mode_id = mi->mode ? mi->mode :
+					(mi->y << 8)+mi->x;
