diff options
author | Franco Catrin L <fcatrin@tuxpan.com> | 2004-04-05 18:19:34 +0000 |
---|---|---|
committer | Franco Catrin L <fcatrin@tuxpan.com> | 2004-04-05 18:19:34 +0000 |
commit | 07bc231872e7e056fa3049a0fcd963c61f826f80 (patch) | |
tree | 46d27436f48423658cfa263444d5ab6e5cb7da23 /hw | |
parent | b526276faa765df893197e04370a915ed73947dc (diff) |
small fixes, but still can't get this driver woking again
Diffstat (limited to 'hw')
-rw-r--r-- | hw/kdrive/neomagic/backend.c | 37 | ||||
-rw-r--r-- | hw/kdrive/neomagic/neomagic.c | 5 |
2 files changed, 23 insertions, 19 deletions
diff --git a/hw/kdrive/neomagic/backend.c b/hw/kdrive/neomagic/backend.c index 27a4b3fb7..958b83781 100644 --- a/hw/kdrive/neomagic/backend.c +++ b/hw/kdrive/neomagic/backend.c @@ -19,24 +19,6 @@ backendInitialize(KdCardInfo *card, BackendInfo *backend) { Bool success = FALSE; -#ifdef KDRIVEFBDEV - if (!success && fbdevInitialize(card, &backend->priv.fbdev)) { - success = TRUE; - backend->type = FBDEV; - backend->cardfini = fbdevCardFini; - backend->scrfini = fbdevScreenFini; - backend->initScreen = fbdevInitScreen; - backend->finishInitScreen = fbdevFinishInitScreen; - backend->createRes = fbdevCreateResources; - backend->preserve = fbdevPreserve; - backend->restore = fbdevRestore; - backend->dpms = fbdevDPMS; - backend->enable = fbdevEnable; - backend->disable = fbdevDisable; - backend->getColors = fbdevGetColors; - backend->putColors = fbdevPutColors; - } -#endif #ifdef KDRIVEVESA if (!success && vesaInitialize(card, &backend->priv.vesa)) { success = TRUE; @@ -55,6 +37,24 @@ backendInitialize(KdCardInfo *card, BackendInfo *backend) backend->putColors = vesaPutColors; } #endif +#ifdef KDRIVEFBDEV + if (!success && fbdevInitialize(card, &backend->priv.fbdev)) { + success = TRUE; + backend->type = FBDEV; + backend->cardfini = fbdevCardFini; + backend->scrfini = fbdevScreenFini; + backend->initScreen = fbdevInitScreen; + backend->finishInitScreen = fbdevFinishInitScreen; + backend->createRes = fbdevCreateResources; + backend->preserve = fbdevPreserve; + backend->restore = fbdevRestore; + backend->dpms = fbdevDPMS; + backend->enable = fbdevEnable; + backend->disable = fbdevDisable; + backend->getColors = fbdevGetColors; + backend->putColors = fbdevPutColors; + } +#endif return success; } @@ -75,6 +75,7 @@ backendScreenInitialize(KdScreenInfo *screen, BackendScreen *backendScreen, #endif #ifdef KDRIVEVESA if (backendCard->type == VESA) { + screen->card->driver = &backendCard->priv.vesa; if (screen->fb[0].depth == 0) { screen->fb[0].depth = 16; } diff --git a/hw/kdrive/neomagic/neomagic.c b/hw/kdrive/neomagic/neomagic.c index 4d1e67f60..3e72b77b9 100644 --- a/hw/kdrive/neomagic/neomagic.c +++ b/hw/kdrive/neomagic/neomagic.c @@ -98,7 +98,8 @@ neoScreenInit(KdScreenInfo *screen) return FALSE; } - screen->driver = neos; + memset (neos, '\0', sizeof (NeoScreenInfo)); + if(!backendScreenInitialize(screen, &neos->backendScreen, &neoc->backendCard)) { xfree(neos); @@ -136,6 +137,8 @@ neoScreenInit(KdScreenInfo *screen) neos->off_screen_size = 0; } + screen->driver = neos; + LEAVE(); return TRUE; } |