source: mainline/kernel/genarch/src/fb/fb.c@ b83c5e4

ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since b83c5e4 was e037cf37, checked in by Jiri Svoboda <jiri@…>, 5 years ago

Show kernel console again when its physical area is unmapped

It's good to be able to see the stack trace if e.g. display server
crashes.

  • Property mode set to 100644
File size: 18.1 KB
Line 
1/*
2 * Copyright (c) 2008 Martin Decky
3 * Copyright (c) 2006 Ondrej Palkovsky
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * - Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * - Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * - The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30/** @addtogroup kernel_genarch
31 * @{
32 */
33/** @file
34 */
35
36#include <assert.h>
37#include <debug.h>
38#include <genarch/fb/font-8x16.h>
39#include <genarch/fb/fb.h>
40#include <console/chardev.h>
41#include <console/console.h>
42#include <sysinfo/sysinfo.h>
43#include <mm/km.h>
44#include <stdlib.h>
45#include <align.h>
46#include <panic.h>
47#include <mem.h>
48#include <config.h>
49#include <bitops.h>
50#include <str.h>
51#include <ddi/ddi.h>
52#include <typedefs.h>
53#include <byteorder.h>
54
55#define BG_COLOR 0x001620
56#define FG_COLOR 0xf3cf65
57#define INV_COLOR 0xaaaaaa
58
59#define FB_PAGES 8
60
61#define RED(x, bits) (((x) >> (8 + 8 + 8 - (bits))) & ((1 << (bits)) - 1))
62#define GREEN(x, bits) (((x) >> (8 + 8 - (bits))) & ((1 << (bits)) - 1))
63#define BLUE(x, bits) (((x) >> (8 - (bits))) & ((1 << (bits)) - 1))
64
65#define COL2X(col) ((col) * FONT_WIDTH)
66#define ROW2Y(row) ((row) * FONT_SCANLINES)
67
68#define X2COL(x) ((x) / FONT_WIDTH)
69#define Y2ROW(y) ((y) / FONT_SCANLINES)
70
71#define FB_POS(instance, x, y) \
72 ((y) * (instance)->scanline + (x) * (instance)->pixelbytes)
73
74#define BB_POS(instance, col, row) \
75 ((((instance)->start_row + (row)) % (instance)->rows) * \
76 (instance)->cols + (col))
77
78#define BB_NEXT_COL(pos) (++(pos))
79
80#define GLYPH_POS(instance, glyph, y) \
81 ((glyph) * (instance)->glyphbytes + (y) * (instance)->glyphscanline)
82
83typedef void (*rgb_conv_t)(void *, uint32_t);
84
85typedef struct {
86 SPINLOCK_DECLARE(lock);
87
88 parea_t parea;
89
90 uint8_t *addr;
91 uint16_t *backbuf;
92 uint8_t *glyphs;
93 uint8_t *bgscan;
94
95 rgb_conv_t rgb_conv;
96
97 unsigned int xres;
98 unsigned int yres;
99
100 /** Number of rows that fit on framebuffer */
101 unsigned int rowtrim;
102
103 unsigned int scanline;
104 unsigned int glyphscanline;
105
106 unsigned int pixelbytes;
107 unsigned int glyphbytes;
108 unsigned int bgscanbytes;
109
110 /** Number of columns in the backbuffer */
111 unsigned int cols;
112 /** Number of rows in the backbuffer */
113 unsigned int rows;
114
115 /** Starting row in the cyclic backbuffer */
116 unsigned int start_row;
117
118 /** Top-most visible row (relative to start_row) */
119 unsigned int offset_row;
120
121 /** Current backbuffer position */
122 unsigned int position;
123} fb_instance_t;
124
125static void fb_putuchar(outdev_t *, char32_t);
126static void fb_redraw(outdev_t *);
127static void fb_scroll_up(outdev_t *);
128static void fb_scroll_down(outdev_t *);
129
130static outdev_operations_t fbdev_ops = {
131 .write = fb_putuchar,
132 .redraw = fb_redraw,
133 .scroll_up = fb_scroll_up,
134 .scroll_down = fb_scroll_down
135};
136
137/*
138 * RGB conversion functions.
139 *
140 * These functions write an RGB value to some memory in some predefined format.
141 * The naming convention corresponds to the format created by these functions.
142 * The functions use the so called network order (i.e. big endian) with respect
143 * to their names.
144 */
145
146static void rgb_0888(void *dst, uint32_t rgb)
147{
148 *((uint32_t *) dst) = host2uint32_t_be((0 << 24) |
149 (RED(rgb, 8) << 16) | (GREEN(rgb, 8) << 8) | (BLUE(rgb, 8)));
150}
151
152static void bgr_0888(void *dst, uint32_t rgb)
153{
154 *((uint32_t *) dst) = host2uint32_t_be((0 << 24) |
155 (BLUE(rgb, 8) << 16) | (GREEN(rgb, 8) << 8) | (RED(rgb, 8)));
156}
157
158static void rgb_8880(void *dst, uint32_t rgb)
159{
160 *((uint32_t *) dst) = host2uint32_t_be((RED(rgb, 8) << 24) |
161 (GREEN(rgb, 8) << 16) | (BLUE(rgb, 8) << 8) | 0);
162}
163
164static void bgr_8880(void *dst, uint32_t rgb)
165{
166 *((uint32_t *) dst) = host2uint32_t_be((BLUE(rgb, 8) << 24) |
167 (GREEN(rgb, 8) << 16) | (RED(rgb, 8) << 8) | 0);
168}
169
170static void rgb_888(void *dst, uint32_t rgb)
171{
172 ((uint8_t *) dst)[0] = RED(rgb, 8);
173 ((uint8_t *) dst)[1] = GREEN(rgb, 8);
174 ((uint8_t *) dst)[2] = BLUE(rgb, 8);
175}
176
177static void bgr_888(void *dst, uint32_t rgb)
178{
179 ((uint8_t *) dst)[0] = BLUE(rgb, 8);
180 ((uint8_t *) dst)[1] = GREEN(rgb, 8);
181 ((uint8_t *) dst)[2] = RED(rgb, 8);
182}
183
184static void rgb_555_be(void *dst, uint32_t rgb)
185{
186 *((uint16_t *) dst) = host2uint16_t_be(RED(rgb, 5) << 10 |
187 GREEN(rgb, 5) << 5 | BLUE(rgb, 5));
188}
189
190static void rgb_555_le(void *dst, uint32_t rgb)
191{
192 *((uint16_t *) dst) = host2uint16_t_le(RED(rgb, 5) << 10 |
193 GREEN(rgb, 5) << 5 | BLUE(rgb, 5));
194}
195
196static void rgb_565_be(void *dst, uint32_t rgb)
197{
198 *((uint16_t *) dst) = host2uint16_t_be(RED(rgb, 5) << 11 |
199 GREEN(rgb, 6) << 5 | BLUE(rgb, 5));
200}
201
202static void rgb_565_le(void *dst, uint32_t rgb)
203{
204 *((uint16_t *) dst) = host2uint16_t_le(RED(rgb, 5) << 11 |
205 GREEN(rgb, 6) << 5 | BLUE(rgb, 5));
206}
207
208/** BGR 3:2:3
209 *
210 * Even though we try 3:2:3 color scheme here, an 8-bit framebuffer
211 * will most likely use a color palette. The color appearance
212 * will be pretty random and depend on the default installed
213 * palette. This could be fixed by supporting custom palette
214 * and setting it to simulate the 8-bit truecolor.
215 *
216 * Currently we set the palette on the ia32, amd64, ppc32 and sparc64 port.
217 *
218 * Note that the byte is being inverted by this function. The reason is
219 * that we would like to use a color palette where the white color code
220 * is 0 and the black color code is 255, as some machines (Sun Blade 1500)
221 * use these codes for black and white and prevent to set codes
222 * 0 and 255 to other colors.
223 *
224 */
225static void bgr_323(void *dst, uint32_t rgb)
226{
227 *((uint8_t *) dst) =
228 ~((RED(rgb, 3) << 5) | (GREEN(rgb, 2) << 3) | BLUE(rgb, 3));
229}
230
231/** Draw character at given position
232 *
233 */
234static void glyph_draw(fb_instance_t *instance, uint16_t glyph,
235 unsigned int col, unsigned int row, bool overlay)
236{
237 if (!overlay)
238 instance->backbuf[BB_POS(instance, col, row)] = glyph;
239
240 /* Do not output if the framebuffer is used by user space */
241 if ((instance->parea.mapped) && (!console_override))
242 return;
243
244 /* Check whether the glyph should be visible */
245 if (row < instance->offset_row)
246 return;
247
248 unsigned int rel_row = row - instance->offset_row;
249 if (rel_row >= instance->rowtrim)
250 return;
251
252 unsigned int x = COL2X(col);
253 unsigned int y = ROW2Y(rel_row);
254
255 for (unsigned int yd = 0; yd < FONT_SCANLINES; yd++)
256 memcpy(&instance->addr[FB_POS(instance, x, y + yd)],
257 &instance->glyphs[GLYPH_POS(instance, glyph, yd)],
258 instance->glyphscanline);
259}
260
261/** Scroll screen down by one row
262 *
263 */
264static void screen_scroll(fb_instance_t *instance)
265{
266 if ((!instance->parea.mapped) || (console_override)) {
267 for (unsigned int rel_row = 0; rel_row < instance->rowtrim; rel_row++) {
268 unsigned int y = ROW2Y(rel_row);
269 unsigned int row = rel_row + instance->offset_row;
270
271 for (unsigned int yd = 0; yd < FONT_SCANLINES; yd++) {
272 unsigned int x;
273 unsigned int col;
274 size_t bb_pos = BB_POS(instance, 0, row);
275 size_t bb_pos1 = BB_POS(instance, 0, row + 1);
276
277 for (col = 0, x = 0; col < instance->cols;
278 col++, x += FONT_WIDTH) {
279 uint16_t glyph;
280
281 if (row < instance->rows - 1) {
282 if (instance->backbuf[bb_pos] ==
283 instance->backbuf[bb_pos1])
284 goto skip;
285
286 glyph = instance->backbuf[bb_pos1];
287 } else
288 glyph = 0;
289
290 memcpy(&instance->addr[FB_POS(instance, x, y + yd)],
291 &instance->glyphs[GLYPH_POS(instance, glyph, yd)],
292 instance->glyphscanline);
293 skip:
294 BB_NEXT_COL(bb_pos);
295 BB_NEXT_COL(bb_pos1);
296 }
297 }
298 }
299 }
300
301 /*
302 * Implement backbuffer scrolling by wrapping around
303 * the cyclic buffer.
304 */
305
306 instance->start_row++;
307 if (instance->start_row == instance->rows)
308 instance->start_row = 0;
309
310 memsetw(&instance->backbuf[BB_POS(instance, 0, instance->rows - 1)],
311 instance->cols, 0);
312}
313
314static void cursor_put(fb_instance_t *instance)
315{
316 unsigned int col = instance->position % instance->cols;
317 unsigned int row = instance->position / instance->cols;
318
319 glyph_draw(instance, fb_font_glyph(U_CURSOR), col, row, true);
320}
321
322static void cursor_remove(fb_instance_t *instance)
323{
324 unsigned int col = instance->position % instance->cols;
325 unsigned int row = instance->position / instance->cols;
326
327 glyph_draw(instance, instance->backbuf[BB_POS(instance, col, row)],
328 col, row, true);
329}
330
331/** Render glyphs
332 *
333 * Convert glyphs from device independent font
334 * description to current visual representation.
335 *
336 */
337static void glyphs_render(fb_instance_t *instance)
338{
339 /* Prerender glyphs */
340 uint16_t glyph;
341
342 for (glyph = 0; glyph < FONT_GLYPHS; glyph++) {
343 uint32_t fg_color;
344
345 if (glyph == FONT_GLYPHS - 1)
346 fg_color = INV_COLOR;
347 else
348 fg_color = FG_COLOR;
349
350 unsigned int y;
351
352 for (y = 0; y < FONT_SCANLINES; y++) {
353 unsigned int x;
354
355 for (x = 0; x < FONT_WIDTH; x++) {
356 void *dst =
357 &instance->glyphs[GLYPH_POS(instance, glyph, y) +
358 x * instance->pixelbytes];
359 uint32_t rgb = (fb_font[glyph][y] &
360 (1 << (7 - x))) ? fg_color : BG_COLOR;
361 instance->rgb_conv(dst, rgb);
362 }
363 }
364 }
365
366 /* Prerender background scanline */
367 unsigned int x;
368
369 for (x = 0; x < instance->xres; x++)
370 instance->rgb_conv(&instance->bgscan[x * instance->pixelbytes], BG_COLOR);
371}
372
373static void fb_redraw_internal(fb_instance_t *instance)
374{
375 for (unsigned int rel_row = 0; rel_row < instance->rowtrim; rel_row++) {
376 unsigned int y = ROW2Y(rel_row);
377 unsigned int row = rel_row + instance->offset_row;
378
379 for (unsigned int yd = 0; yd < FONT_SCANLINES; yd++) {
380 unsigned int x;
381 unsigned int col;
382 size_t bb_pos = BB_POS(instance, 0, row);
383
384 for (col = 0, x = 0; col < instance->cols;
385 col++, x += FONT_WIDTH) {
386 uint16_t glyph =
387 instance->backbuf[bb_pos];
388 void *dst = &instance->addr[FB_POS(instance, x, y + yd)];
389 void *src = &instance->glyphs[GLYPH_POS(instance, glyph, yd)];
390 memcpy(dst, src, instance->glyphscanline);
391 BB_NEXT_COL(bb_pos);
392 }
393 }
394 }
395
396 if (COL2X(instance->cols) < instance->xres) {
397 unsigned int y;
398 unsigned int size =
399 (instance->xres - COL2X(instance->cols)) * instance->pixelbytes;
400
401 for (y = 0; y < instance->yres; y++)
402 memcpy(&instance->addr[FB_POS(instance, COL2X(instance->cols), y)],
403 instance->bgscan, size);
404 }
405
406 if (ROW2Y(instance->rowtrim) < instance->yres) {
407 unsigned int y;
408
409 for (y = ROW2Y(instance->rowtrim); y < instance->yres; y++)
410 memcpy(&instance->addr[FB_POS(instance, 0, y)],
411 instance->bgscan, instance->bgscanbytes);
412 }
413}
414
415/** Print character to screen
416 *
417 * Emulate basic terminal commands.
418 *
419 */
420static void fb_putuchar(outdev_t *dev, char32_t ch)
421{
422 fb_instance_t *instance = (fb_instance_t *) dev->data;
423 spinlock_lock(&instance->lock);
424
425 switch (ch) {
426 case '\n':
427 cursor_remove(instance);
428 instance->position += instance->cols;
429 instance->position -= instance->position % instance->cols;
430 break;
431 case '\r':
432 cursor_remove(instance);
433 instance->position -= instance->position % instance->cols;
434 break;
435 case '\b':
436 cursor_remove(instance);
437 if (instance->position % instance->cols)
438 instance->position--;
439 break;
440 case '\t':
441 cursor_remove(instance);
442 do {
443 glyph_draw(instance, fb_font_glyph(' '),
444 instance->position % instance->cols,
445 instance->position / instance->cols, false);
446 instance->position++;
447 } while (((instance->position % instance->cols) % 8 != 0) &&
448 (instance->position < instance->cols * instance->rows));
449 break;
450 default:
451 glyph_draw(instance, fb_font_glyph(ch),
452 instance->position % instance->cols,
453 instance->position / instance->cols, false);
454 instance->position++;
455 }
456
457 if (instance->position >= instance->cols * instance->rows) {
458 instance->position -= instance->cols;
459 screen_scroll(instance);
460 }
461
462 cursor_put(instance);
463
464 spinlock_unlock(&instance->lock);
465}
466
467/** Scroll the framebuffer up
468 *
469 */
470static void fb_scroll_up(outdev_t *dev)
471{
472 fb_instance_t *instance = (fb_instance_t *) dev->data;
473 spinlock_lock(&instance->lock);
474
475 if (instance->offset_row >= instance->rowtrim / 2)
476 instance->offset_row -= instance->rowtrim / 2;
477 else
478 instance->offset_row = 0;
479
480 fb_redraw_internal(instance);
481 cursor_put(instance);
482
483 spinlock_unlock(&instance->lock);
484}
485
486/** Scroll the framebuffer down
487 *
488 */
489static void fb_scroll_down(outdev_t *dev)
490{
491 fb_instance_t *instance = (fb_instance_t *) dev->data;
492 spinlock_lock(&instance->lock);
493
494 if (instance->offset_row + instance->rowtrim / 2 <=
495 instance->rows - instance->rowtrim)
496 instance->offset_row += instance->rowtrim / 2;
497 else
498 instance->offset_row = instance->rows - instance->rowtrim;
499
500 fb_redraw_internal(instance);
501 cursor_put(instance);
502
503 spinlock_unlock(&instance->lock);
504}
505
506/** Refresh the screen
507 *
508 */
509static void fb_redraw(outdev_t *dev)
510{
511 fb_instance_t *instance = (fb_instance_t *) dev->data;
512
513 spinlock_lock(&instance->lock);
514 fb_redraw_internal(instance);
515 spinlock_unlock(&instance->lock);
516}
517
518/** Framebuffer was mapped or unmapped.
519 *
520 * @param arg Framebuffer instance
521 */
522static void fb_mapped_changed(void *arg)
523{
524 fb_instance_t *instance = (fb_instance_t *) arg;
525
526 if (!instance->parea.mapped) {
527 spinlock_lock(&instance->lock);
528 fb_redraw_internal(instance);
529 spinlock_unlock(&instance->lock);
530 }
531}
532
533/** Initialize framebuffer as a output character device
534 *
535 */
536outdev_t *fb_init(fb_properties_t *props)
537{
538 assert(props);
539 assert(props->x > 0);
540 assert(props->y > 0);
541 assert(props->scan > 0);
542
543 rgb_conv_t rgb_conv;
544 unsigned int pixelbytes;
545
546 switch (props->visual) {
547 case VISUAL_INDIRECT_8:
548 rgb_conv = bgr_323;
549 pixelbytes = 1;
550 break;
551 case VISUAL_RGB_5_5_5_LE:
552 rgb_conv = rgb_555_le;
553 pixelbytes = 2;
554 break;
555 case VISUAL_RGB_5_5_5_BE:
556 rgb_conv = rgb_555_be;
557 pixelbytes = 2;
558 break;
559 case VISUAL_RGB_5_6_5_LE:
560 rgb_conv = rgb_565_le;
561 pixelbytes = 2;
562 break;
563 case VISUAL_RGB_5_6_5_BE:
564 rgb_conv = rgb_565_be;
565 pixelbytes = 2;
566 break;
567 case VISUAL_RGB_8_8_8:
568 rgb_conv = rgb_888;
569 pixelbytes = 3;
570 break;
571 case VISUAL_BGR_8_8_8:
572 rgb_conv = bgr_888;
573 pixelbytes = 3;
574 break;
575 case VISUAL_RGB_8_8_8_0:
576 rgb_conv = rgb_8880;
577 pixelbytes = 4;
578 break;
579 case VISUAL_RGB_0_8_8_8:
580 rgb_conv = rgb_0888;
581 pixelbytes = 4;
582 break;
583 case VISUAL_BGR_0_8_8_8:
584 rgb_conv = bgr_0888;
585 pixelbytes = 4;
586 break;
587 case VISUAL_BGR_8_8_8_0:
588 rgb_conv = bgr_8880;
589 pixelbytes = 4;
590 break;
591 default:
592 LOG("Unsupported visual.");
593 return NULL;
594 }
595
596 outdev_t *fbdev = malloc(sizeof(outdev_t));
597 if (!fbdev)
598 return NULL;
599
600 fb_instance_t *instance = malloc(sizeof(fb_instance_t));
601 if (!instance) {
602 free(fbdev);
603 return NULL;
604 }
605
606 outdev_initialize("fbdev", fbdev, &fbdev_ops);
607 fbdev->data = instance;
608
609 spinlock_initialize(&instance->lock, "*fb.instance.lock");
610
611 instance->rgb_conv = rgb_conv;
612 instance->pixelbytes = pixelbytes;
613 instance->xres = props->x;
614 instance->yres = props->y;
615 instance->scanline = props->scan;
616
617 instance->rowtrim = Y2ROW(instance->yres);
618
619 instance->cols = X2COL(instance->xres);
620 instance->rows = FB_PAGES * instance->rowtrim;
621
622 instance->start_row = instance->rows - instance->rowtrim;
623 instance->offset_row = instance->start_row;
624 instance->position = instance->start_row * instance->cols;
625
626 instance->glyphscanline = FONT_WIDTH * instance->pixelbytes;
627 instance->glyphbytes = ROW2Y(instance->glyphscanline);
628 instance->bgscanbytes = instance->xres * instance->pixelbytes;
629
630 size_t fbsize = instance->scanline * instance->yres;
631 size_t bbsize = instance->cols * instance->rows * sizeof(uint16_t);
632 size_t glyphsize = FONT_GLYPHS * instance->glyphbytes;
633
634 instance->addr = (uint8_t *) km_map((uintptr_t) props->addr, fbsize,
635 KM_NATURAL_ALIGNMENT, PAGE_WRITE | PAGE_NOT_CACHEABLE);
636 if (!instance->addr) {
637 LOG("Unable to map framebuffer.");
638 free(instance);
639 free(fbdev);
640 return NULL;
641 }
642
643 instance->backbuf = (uint16_t *) malloc(bbsize);
644 if (!instance->backbuf) {
645 LOG("Unable to allocate backbuffer.");
646 free(instance);
647 free(fbdev);
648 return NULL;
649 }
650
651 instance->glyphs = (uint8_t *) malloc(glyphsize);
652 if (!instance->glyphs) {
653 LOG("Unable to allocate glyphs.");
654 free(instance->backbuf);
655 free(instance);
656 free(fbdev);
657 return NULL;
658 }
659
660 instance->bgscan = malloc(instance->bgscanbytes);
661 if (!instance->bgscan) {
662 LOG("Unable to allocate background pixel.");
663 free(instance->glyphs);
664 free(instance->backbuf);
665 free(instance);
666 free(fbdev);
667 return NULL;
668 }
669
670 memsetw(instance->backbuf, instance->cols * instance->rows, 0);
671 glyphs_render(instance);
672
673 ddi_parea_init(&instance->parea);
674 instance->parea.pbase = props->addr;
675 instance->parea.frames = SIZE2FRAMES(fbsize);
676 instance->parea.unpriv = false;
677 instance->parea.mapped = false;
678 instance->parea.mapped_changed = fb_mapped_changed;
679 instance->parea.arg = (void *) instance;
680 ddi_parea_register(&instance->parea);
681
682 if (!fb_exported) {
683 /*
684 * We export the kernel framebuffer for uspace usage.
685 * This is used in the case the uspace framebuffer
686 * driver is not self-sufficient.
687 */
688 sysinfo_set_item_val("fb", NULL, true);
689 sysinfo_set_item_val("fb.kind", NULL, 1);
690 sysinfo_set_item_val("fb.width", NULL, instance->xres);
691 sysinfo_set_item_val("fb.height", NULL, instance->yres);
692 sysinfo_set_item_val("fb.scanline", NULL, instance->scanline);
693 sysinfo_set_item_val("fb.visual", NULL, props->visual);
694 sysinfo_set_item_val("fb.address.physical", NULL, props->addr);
695
696 fb_exported = true;
697 }
698
699 fb_redraw(fbdev);
700 return fbdev;
701}
702
703/** @}
704 */
Note: See TracBrowser for help on using the repository browser.