Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1993 → Rev 1992

/trunk/kernel/arch/sparc64/src/drivers/scr.c
35,7 → 35,6
#include <arch/drivers/scr.h>
#include <genarch/ofw/ofw_tree.h>
#include <genarch/fb/fb.h>
#include <genarch/fb/visuals.h>
#include <arch/types.h>
#include <typedefs.h>
#include <func.h>
76,7 → 75,6
uint32_t fb_depth = 0;
uint32_t fb_linebytes = 0;
uint32_t fb_scanline = 0;
unsigned int visual;
 
prop = ofw_tree_getprop(node, "width");
if (prop && prop->value)
117,33 → 115,16
printf("Failed to determine screen address.\n");
return;
}
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:
 
if (fb_depth == 24)
fb_scanline = fb_linebytes * 4;
visual = VISUAL_RGB_8_8_8_0;
break;
case 32:
else
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];
if (!ofw_upa_apply_ranges(node->parent, reg, &fb_addr)) {
156,7 → 137,7
panic("Unexpected type.\n");
}
 
fb_init(fb_addr, fb_width, fb_height, fb_scanline, visual);
fb_init(fb_addr, fb_width, fb_height, fb_depth, fb_scanline, true);
}
 
/** @}