Index: kernel/arch/sparc64/src/drivers/scr.c
===================================================================
--- kernel/arch/sparc64/src/drivers/scr.c	(revision aa802679067c94e7e628f87857e6f9d9c5a55aaf)
+++ kernel/arch/sparc64/src/drivers/scr.c	(revision 2bc137c2ead5aef4703a85727d96bf8f99c6f418)
@@ -36,4 +36,5 @@
 #include <genarch/ofw/ofw_tree.h>
 #include <genarch/fb/fb.h>
+#include <genarch/fb/visuals.h>
 #include <arch/types.h>
 #include <typedefs.h>
@@ -76,4 +77,5 @@
 	uint32_t fb_linebytes = 0;
 	uint32_t fb_scanline = 0;
+	unsigned int visual;
 
 	prop = ofw_tree_getprop(node, "width");
@@ -116,14 +118,31 @@
 			return;
 		}
-
-		if (fb_depth == 24)
+		
+		switch (fb_depth) {
+		case 8:
+			fb_scanline = fb_linebytes * (fb_depth >> 3);
+			visual = VISUAL_INDIRECT_8;
+			break;
+		case 16:
+			fb_scanline = fb_linebytes * (fb_depth >> 3);
+			visual = VISUAL_RGB_5_6_5;
+			break;
+		case 24:
 			fb_scanline = fb_linebytes * 4;
-		else
+			visual = VISUAL_RGB_8_8_8_0;
+			break;
+		case 32:
 			fb_scanline = fb_linebytes * (fb_depth >> 3);
+			visual = VISUAL_RGB_0_8_8_8;
+			break;
+		default:
+			printf("Unsupported bits per pixel.\n");
+			return;
+		}
 		
 		break;
 	case SCR_FFB:	
-		fb_depth = 32;
 		fb_scanline = 8192;
+		visual = VISUAL_RGB_0_8_8_8;
 
 		ofw_upa_reg_t *reg = &((ofw_upa_reg_t *) prop->value)[FFB_REG_24BPP];
@@ -138,5 +157,5 @@
 	}
 
-	fb_init(fb_addr, fb_width, fb_height, fb_depth, fb_scanline, true);
+	fb_init(fb_addr, fb_width, fb_height, fb_scanline, visual);
 }
 
