Rev 1897 | Rev 1986 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1897 | Rev 1898 | ||
---|---|---|---|
Line 39... | Line 39... | ||
39 | #include <typedefs.h> |
39 | #include <typedefs.h> |
40 | #include <func.h> |
40 | #include <func.h> |
41 | #include <align.h> |
41 | #include <align.h> |
42 | #include <print.h> |
42 | #include <print.h> |
43 | 43 | ||
- | 44 | #define FFB_REG_24BPP 7 |
|
- | 45 | ||
44 | scr_type_t scr_type = SCR_UNKNOWN; |
46 | scr_type_t scr_type = SCR_UNKNOWN; |
45 | 47 | ||
46 | /** Initialize screen. |
48 | /** Initialize screen. |
47 | * |
49 | * |
48 | * Traverse OpenFirmware device tree in order to find necessary |
50 | * Traverse OpenFirmware device tree in order to find necessary |
Line 118... | Line 120... | ||
118 | fb_scanline = fb_linebytes * 4; |
120 | fb_scanline = fb_linebytes * 4; |
119 | else |
121 | else |
120 | fb_scanline = fb_linebytes * (fb_depth >> 3); |
122 | fb_scanline = fb_linebytes * (fb_depth >> 3); |
121 | 123 | ||
122 | break; |
124 | break; |
123 | case SCR_FFB: |
125 | case SCR_FFB: |
- | 126 | fb_depth = 24; |
|
- | 127 | fb_scanline = 8192; |
|
- | 128 | ||
- | 129 | ofw_upa_reg_t *reg = &((ofw_upa_reg_t *) prop->value)[FFB_REG_24BPP]; |
|
- | 130 | if (!ofw_upa_apply_ranges(node->parent, reg, &fb_addr)) { |
|
- | 131 | printf("Failed to determine screen address.\n"); |
|
- | 132 | return; |
|
- | 133 | } |
|
- | 134 | ||
- | 135 | break; |
|
124 | default: |
136 | default: |
125 | panic("Unexpected type.\n"); |
137 | panic("Unexpected type.\n"); |
126 | } |
138 | } |
127 | 139 | ||
128 | fb_init(fb_addr, fb_width, fb_height, fb_depth, fb_scanline, true); |
140 | fb_init(fb_addr, fb_width, fb_height, fb_depth, fb_scanline, true); |