Hi,

I did some experiments today with cranking up the video resolution. I
got the GUI to work at up to 1024x768 (my screen does not go above):
http://www.milkymist.org/flickernoise/dmxtable.png

To try this on your M1s, you need to upgrade SoC, MTK, RTEMS and
Flickernoise to Git head, and apply the attached patch to RTEMS which I
did not commit because it breaks rendering. Flickernoise will then
automatically start in 1024x768 60Hz (hardcoded atm).

Getting the rendering to run at higher resolutions while keeping the
framerate will likely need significantly more work.

S.

diff --git a/c/src/lib/libbsp/lm32/shared/milkymist_framebuffer/framebuffer.c b/c/src/lib/libbsp/lm32/shared/milkymist_framebuffer/framebuffer.c
index 575344c..95b2c57 100644
--- a/c/src/lib/libbsp/lm32/shared/milkymist_framebuffer/framebuffer.c
+++ b/c/src/lib/libbsp/lm32/shared/milkymist_framebuffer/framebuffer.c
@@ -25,11 +25,11 @@
 
 #define FRAMEBUFFER_DEVICE_NAME "/dev/fb"
 
-static unsigned short int framebufferA[640*480]
+static unsigned short int framebufferA[1024*768]
   __attribute__((aligned(32)));
-static unsigned short int framebufferB[640*480]
+static unsigned short int framebufferB[1024*768]
   __attribute__((aligned(32)));
-static unsigned short int framebufferC[640*480]
+static unsigned short int framebufferC[1024*768]
   __attribute__((aligned(32)));
 
 static unsigned short int *frontbuffer;
@@ -41,15 +41,15 @@ static unsigned short int ref_counter = 0;
 /* screen information for the VGA driver */
 static struct fb_var_screeninfo fb_var =
 {
-  .xres                = 640,
-  .yres                = 480,
+  .xres                = 1024,
+  .yres                = 768,
   .bits_per_pixel      = 16
 };
 
 static struct fb_fix_screeninfo fb_fix =
 {
 // this is initialized at start-up
-  .smem_len            = 640 * 480 * 2,       /* buffer size (2 bytes per pixel) */
+  .smem_len            = 1024 * 768 * 2,       /* buffer size (2 bytes per pixel) */
   .type                = FB_TYPE_VGA_PLANES,  /* type of display */
   .visual              = FB_VISUAL_TRUECOLOR, /* color scheme used */
   .line_length         = 80                   /* chars per line */
@@ -87,9 +87,6 @@ rtems_device_driver frame_buffer_initialize(
 
   fb_fix.smem_start = (volatile char *)frontbuffer;
 
-  MM_WRITE(MM_VGA_BASEADDRESS, (unsigned int)frontbuffer);
-  MM_WRITE(MM_VGA_RESET, 0);
-
   /*
   * Register the device
   */
@@ -122,8 +119,20 @@ rtems_device_driver frame_buffer_open(
 )
 {
   ref_counter++;
-  if(ref_counter == 1)
+  if(ref_counter == 1) {
+    MM_WRITE(MM_VGA_BASEADDRESS, (unsigned int)frontbuffer);
+    MM_WRITE(MM_VGA_HRES, 1024);
+    MM_WRITE(MM_VGA_HSYNC_START, 1048);
+    MM_WRITE(MM_VGA_HSYNC_END, 1184);
+    MM_WRITE(MM_VGA_HSCAN, 1344);
+    MM_WRITE(MM_VGA_VRES, 768);
+    MM_WRITE(MM_VGA_VSYNC_START, 771);
+    MM_WRITE(MM_VGA_VSYNC_END, 777);
+    MM_WRITE(MM_VGA_VSCAN, 806);
+    MM_WRITE(MM_VGA_CLKSEL, 2);
+    MM_WRITE(MM_VGA_BURST_COUNT, 1024*768/16);
     MM_WRITE(MM_VGA_RESET, 0);
+  }
   return RTEMS_SUCCESSFUL;
 }
 
_______________________________________________
http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org
IRC: #milkymist@Freenode
Twitter: www.twitter.com/milkymistvj
Ideas? http://milkymist.uservoice.com

Reply via email to