Skip to content

Commit 2b91d99

Browse files
author
Sebastien Bourdeauducq
committedMar 30, 2013
agg_test: add 1080p
1 parent 9a7c3d9 commit 2b91d99

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed
 

‎agg_test.cpp

+18-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ void draw_line(agg::rasterizer& ras,
5858
enum {
5959
VGA_MODE_640_480,
6060
VGA_MODE_800_600,
61-
VGA_MODE_1024_768
61+
VGA_MODE_1024_768,
62+
VGA_MODE_1920_1080
6263
};
6364

6465
static void vga_clkgen_write(int cmd, int data)
@@ -87,11 +88,11 @@ static void vga_set_mode(int mode)
8788
fb_hres_write(640);
8889
fb_hsync_start_write(656);
8990
fb_hsync_end_write(752);
90-
fb_hscan_write(799);
91+
fb_hscan_write(800);
9192
fb_vres_write(480);
9293
fb_vsync_start_write(492);
9394
fb_vsync_end_write(494);
94-
fb_vscan_write(524);
95+
fb_vscan_write(525);
9596
break;
9697
case VGA_MODE_800_600: // Pixel clock: 50MHz
9798
vga_hres = 800;
@@ -121,6 +122,20 @@ static void vga_set_mode(int mode)
121122
fb_vsync_end_write(778);
122123
fb_vscan_write(807);
123124
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;
124139
}
125140
fb_length_write(vga_hres*vga_vres*4);
126141

0 commit comments

Comments
 (0)
Please sign in to comment.