25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: dev_sgi_gbe.c,v 1.26 2005/08/16 05:37:12 debug Exp $ |
* $Id: dev_sgi_gbe.c,v 1.27 2005/08/16 20:17:32 debug Exp $ |
29 |
* |
* |
30 |
* SGI "gbe", graphics controller. Framebuffer. |
* SGI "gbe", graphics controller. Framebuffer. |
31 |
* Loosely inspired by Linux code. |
* Loosely inspired by Linux code. |
49 |
#define GBE_DEBUG |
#define GBE_DEBUG |
50 |
/* #define debug fatal */ |
/* #define debug fatal */ |
51 |
|
|
52 |
/* #define MTE_TEST */ |
#define MTE_TEST |
53 |
|
|
54 |
#define GBE_DEFAULT_XRES 640 |
#define GBE_DEFAULT_XRES 640 |
55 |
#define GBE_DEFAULT_YRES 480 |
#define GBE_DEFAULT_YRES 480 |
399 |
exit(1); |
exit(1); |
400 |
} |
} |
401 |
memset(d, 0, sizeof(struct sgi_gbe_data)); |
memset(d, 0, sizeof(struct sgi_gbe_data)); |
402 |
|
|
403 |
|
/* 640x480 for Linux: */ |
404 |
d->xres = GBE_DEFAULT_XRES; |
d->xres = GBE_DEFAULT_XRES; |
405 |
d->yres = GBE_DEFAULT_YRES; |
d->yres = GBE_DEFAULT_YRES; |
406 |
d->bitdepth = 8; |
d->bitdepth = 8; |
|
#if 0 |
|
407 |
d->control = 0x20aa000; /* or 0x00000001? */ |
d->control = 0x20aa000; /* or 0x00000001? */ |
408 |
#endif |
|
409 |
|
/* 1280x1024 for booting the O2's PROM: */ |
410 |
|
d->xres = 1280; d->yres = 1024; |
411 |
|
|
412 |
d->fb_data = dev_fb_init(machine, mem, FAKE_GBE_FB_ADDRESS, |
d->fb_data = dev_fb_init(machine, mem, FAKE_GBE_FB_ADDRESS, |
413 |
VFB_GENERIC, d->xres, d->yres, d->xres, d->yres, 8, "SGI GBE"); |
VFB_GENERIC, d->xres, d->yres, d->xres, d->yres, 8, "SGI GBE"); |
414 |
set_grayscale_palette(d->fb_data, 256); |
set_grayscale_palette(d->fb_data, 256); |