VirtualBox

Changeset 60198 in vbox for trunk


Ignore:
Timestamp:
Mar 26, 2016 2:43:03 PM (9 years ago)
Author:
vboxsync
Message:

bugref:8087: Additions/x11: support non-root X server: when running on older versions of VirtualBox certain things are not shown right unless we programme the graphics mode on the first screen via the VBE registers too. While this is not always possible due to limitations of the register model, at least do it when it is.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/drm/vbox_mode.c

    r60141 r60198  
    8787    pitch = crtc->enabled ? CRTC_FB(crtc)->pitches[0] : width * bpp / 8;
    8888#endif
    89     /* if (vbox_crtc->crtc_id == 0 && crtc->enabled)
     89    /* This is the old way of setting graphics modes.  It assumed one screen
     90     * and a frame-buffer at the start of video RAM.  On older versions of
     91     * VirtualBox, certain parts of the code still assume that the first
     92     * screen is programmed this way, so try to fake it. */
     93    if (   vbox_crtc->crtc_id == 0
     94        && crtc->enabled
     95        && vbox_crtc->fb_offset / pitch < 0xffff - crtc->y
     96        && vbox_crtc->fb_offset % (bpp / 8) == 0)
    9097        VBoxVideoSetModeRegisters(width, height, pitch * 8 / bpp,
    91                                   CRTC_FB(crtc)->bits_per_pixel, 0,
    92                                   crtc->x, crtc->y); */
     98                          CRTC_FB(crtc)->bits_per_pixel, 0,
     99                          vbox_crtc->fb_offset % pitch / bpp * 8 + crtc->x,
     100                          vbox_crtc->fb_offset / pitch + crtc->y);
    93101    flags = VBVA_SCREEN_F_ACTIVE;
    94102    flags |= (crtc->enabled && !vbox_crtc->blanked ? 0 : VBVA_SCREEN_F_BLANK);
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