25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: dev_igsfb.c,v 1.5 2006/12/30 13:30:58 debug Exp $ |
* $Id: dev_igsfb.c,v 1.6 2007/06/15 19:11:15 debug Exp $ |
29 |
* |
* |
30 |
* Integraphics Systems "igsfb" Framebuffer (graphics) card, used in at |
* COMMENT: Integraphics Systems "igsfb" Framebuffer graphics card |
31 |
* least the NetWinder. |
* |
32 |
|
* Used in at least the NetWinder. |
33 |
* |
* |
34 |
* TODO: This is hardcoded to 1024x768x8 right now, and only supports the |
* TODO: This is hardcoded to 1024x768x8 right now, and only supports the |
35 |
* two acceleration commands used by NetBSD for scrolling the |
* two acceleration commands used by NetBSD for scrolling the |
159 |
|
|
160 |
DEVICE_ACCESS(igsfb) |
DEVICE_ACCESS(igsfb) |
161 |
{ |
{ |
|
uint64_t idata = 0, odata = 0; |
|
162 |
struct dev_igsfb_data *d = extra; |
struct dev_igsfb_data *d = extra; |
163 |
|
uint64_t idata = 0, odata = 0; |
164 |
|
|
165 |
if (writeflag == MEM_WRITE) |
if (writeflag == MEM_WRITE) |
166 |
idata = memory_readmax64(cpu, data, len); |
idata = memory_readmax64(cpu, data, len); |
405 |
DEVINIT(igsfb) |
DEVINIT(igsfb) |
406 |
{ |
{ |
407 |
struct dev_igsfb_data *d; |
struct dev_igsfb_data *d; |
408 |
d = malloc(sizeof(struct dev_igsfb_data)); |
|
409 |
if (d == NULL) { |
CHECK_ALLOCATION(d = malloc(sizeof(struct dev_igsfb_data))); |
|
fprintf(stderr, "out of memory\n"); |
|
|
exit(1); |
|
|
} |
|
410 |
memset(d, 0, sizeof(struct dev_igsfb_data)); |
memset(d, 0, sizeof(struct dev_igsfb_data)); |
411 |
|
|
412 |
d->xres = 1024; |
d->xres = 1024; |