Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

agg_test: add 1080p

  • Loading branch information...
commit 2b91d995da1973fcfa4113c30dc9c17415858571 1 parent 9a7c3d9
Sébastien Bourdeauducq authored March 30, 2013

Showing 1 changed file with 18 additions and 3 deletions. Show diff stats Hide diff stats

  1. 21  agg_test.cpp
21  agg_test.cpp
@@ -58,7 +58,8 @@ void draw_line(agg::rasterizer& ras,
58 58
 enum {
59 59
     VGA_MODE_640_480,
60 60
     VGA_MODE_800_600,
61  
-    VGA_MODE_1024_768
  61
+    VGA_MODE_1024_768,
  62
+    VGA_MODE_1920_1080
62 63
 };
63 64
 
64 65
 static void vga_clkgen_write(int cmd, int data)
@@ -87,11 +88,11 @@ static void vga_set_mode(int mode)
87 88
             fb_hres_write(640);
88 89
             fb_hsync_start_write(656);
89 90
             fb_hsync_end_write(752);
90  
-            fb_hscan_write(799);
  91
+            fb_hscan_write(800);
91 92
             fb_vres_write(480);
92 93
             fb_vsync_start_write(492);
93 94
             fb_vsync_end_write(494);
94  
-            fb_vscan_write(524);
  95
+            fb_vscan_write(525);
95 96
             break;
96 97
         case VGA_MODE_800_600: // Pixel clock: 50MHz
97 98
             vga_hres = 800;
@@ -121,6 +122,20 @@ static void vga_set_mode(int mode)
121 122
             fb_vsync_end_write(778);
122 123
             fb_vscan_write(807);
123 124
             break;
  125
+        case VGA_MODE_1920_1080: // Pixel clock: 148MHz
  126
+            vga_hres = 1920;
  127
+            vga_vres = 1080;
  128
+            clock_m = 74;
  129
+            clock_d = 25;
  130
+            fb_hres_write(1920);
  131
+            fb_hsync_start_write(2008);
  132
+            fb_hsync_end_write(2052);
  133
+            fb_hscan_write(2200);
  134
+            fb_vres_write(1080);
  135
+            fb_vsync_start_write(1084);
  136
+            fb_vsync_end_write(1089);
  137
+            fb_vscan_write(1125);
  138
+            break;
124 139
     }
125 140
     fb_length_write(vga_hres*vga_vres*4);
126 141
 

0 notes on commit 2b91d99

Please sign in to comment.
Something went wrong with that request. Please try again.