Rev 3675 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3675 | Rev 3684 | ||
---|---|---|---|
Line 76... | Line 76... | ||
76 | printf("Unknown screen device.\n"); |
76 | printf("Unknown screen device.\n"); |
77 | return; |
77 | return; |
78 | } |
78 | } |
79 | 79 | ||
80 | uintptr_t fb_addr; |
80 | uintptr_t fb_addr; |
- | 81 | unsigned int fb_offset = 0; |
|
81 | uint32_t fb_width = 0; |
82 | uint32_t fb_width = 0; |
82 | uint32_t fb_height = 0; |
83 | uint32_t fb_height = 0; |
83 | uint32_t fb_depth = 0; |
84 | uint32_t fb_depth = 0; |
84 | uint32_t fb_linebytes = 0; |
85 | uint32_t fb_linebytes = 0; |
85 | uint32_t fb_scanline = 0; |
86 | uint32_t fb_scanline = 0; |
Line 165... | Line 166... | ||
165 | &fb_addr)) { |
166 | &fb_addr)) { |
166 | printf("Failed to determine screen address.\n"); |
167 | printf("Failed to determine screen address.\n"); |
167 | return; |
168 | return; |
168 | } |
169 | } |
169 | 170 | ||
- | 171 | fb_offset = 4 * 0x2000; |
|
- | 172 | ||
170 | switch (fb_depth) { |
173 | switch (fb_depth) { |
171 | case 8: |
174 | case 8: |
172 | fb_scanline = fb_linebytes * (fb_depth >> 3); |
175 | fb_scanline = fb_linebytes * (fb_depth >> 3); |
173 | visual = VISUAL_SB1500_PALETTE; |
176 | visual = VISUAL_INDIRECT_8; |
174 | break; |
177 | break; |
175 | case 16: |
178 | case 16: |
176 | fb_scanline = fb_linebytes * (fb_depth >> 3); |
179 | fb_scanline = fb_linebytes * (fb_depth >> 3); |
177 | visual = VISUAL_RGB_5_6_5; |
180 | visual = VISUAL_RGB_5_6_5; |
178 | break; |
181 | break; |
Line 223... | Line 226... | ||
223 | panic("Unexpected type.\n"); |
226 | panic("Unexpected type.\n"); |
224 | } |
227 | } |
225 | 228 | ||
226 | fb_properties_t props = { |
229 | fb_properties_t props = { |
227 | .addr = fb_addr, |
230 | .addr = fb_addr, |
228 | .offset = 0, |
231 | .offset = fb_offset, |
229 | .x = fb_width, |
232 | .x = fb_width, |
230 | .y = fb_height, |
233 | .y = fb_height, |
231 | .scan = fb_scanline, |
234 | .scan = fb_scanline, |
232 | .visual = visual, |
235 | .visual = visual, |
233 | }; |
236 | }; |