VirtualBox

Changeset 22022 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 6, 2009 10:55:28 AM (15 years ago)
Author:
vboxsync
Message:

Additions/x11/vboxvideo: do all device dependant initialisation before device independant, to ensure that the framebuffer virtual width is known when we need it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo_15.c

    r21747 r22022  
    924924 *
    925925 * End QUOTE.Initialise the initial video mode.
     926 *
     927 * Note that the order of operations here has been adjusted to match the
     928 * Radeon HD driver.  We start with device-dependent initialisation (DDX),
     929 * including modesetting (a.k.a RandR 1.2).  Among other things, this
     930 * establishes the initial physical and virtual screen dimensions, which we
     931 * need to know when we create the screen pixmap (the server's abstraction for
     932 * the framebuffer).  We then do the device-independent initialisation (DIX)
     933 * which sets up the server's internal structures to reflect the hardware
     934 * setup.  Finally we do DPMS (stubs) and hardware cursor setup.
    926935 */
    927936static Bool
     
    953962    pVBox->savedPal = VBESetGetPaletteData(pVBox->pVbe, FALSE, 0, 256,
    954963                                           NULL, FALSE, FALSE);
     964
     965    /* Initialise randr 1.2 mode-setting functions and set first mode. */
     966    if (!xf86CrtcScreenInit(pScreen)) {
     967        return FALSE;
     968    }
     969
     970    if (!xf86SetDesiredModes(pScrn)) {
     971        return FALSE;
     972    }
     973
     974    /* set the viewport */
     975    VBOXAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
     976
     977    /* Needed before we initialise DRI. */
     978    pScrn->virtualX = (pScrn->virtualX + 7) & ~7;
     979    pScrn->displayWidth = pScrn->virtualX;
    955980
    956981    /* mi layer - reset the visual list (?)*/
     
    963988    if (!miSetPixmapDepths())
    964989        return (FALSE);
    965 
    966     /* Needed before we initialise DRI. */
    967     pScrn->virtualX = (pScrn->virtualX + 7) & ~7;
    968     pScrn->displayWidth = pScrn->virtualX;
    969990
    970991#ifdef VBOX_DRI
     
    10071028       to (unsigned char *) later. */
    10081029    xf86DiDGAInit(pScreen, (unsigned long) pVBox->base);
    1009 
    1010     /* Initialise randr 1.2 mode-setting functions and set first mode. */
    1011     if (!xf86CrtcScreenInit(pScreen)) {
    1012         return FALSE;
    1013     }
    1014 
    1015     if (!xf86SetDesiredModes(pScrn)) {
    1016         return FALSE;
    1017     }
    1018 
    1019     /* set the viewport */
    1020     VBOXAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
    10211030
    10221031    /* software cursor */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette