VirtualBox

Changeset 67379 in vbox for trunk/src


Ignore:
Timestamp:
Jun 13, 2017 3:27:41 PM (8 years ago)
Author:
vboxsync
Message:

bugref:8533: Additions/x11: fully support VMSVGA
Support dynamic resizing with Linux 4.10 and later guests

Linux 4.10 changed the kernel-user-space-ABI used to tell the kernel driver
about new dynamic modes. This change makes VBoxClient work with the new ABI.
We do not test for kernel versions but just try both and see what works.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/display-svga.cpp

    r67320 r67379  
    2424 *    root and not as the logged-in user.  Dynamic resizing should work for all
    2525 *    screens in any environment which handles kernel resize notifications,
    26  *    including at log-in screens.  Test GNOME Shell Wayland and GNOME Shell or
    27  *    Unity or KDE at the log-in screen and after log-in.
     26 *    including at log-in screens.  Test GNOME Shell Wayland and GNOME Shell
     27 *    under X.Org or Unity or KDE at the log-in screen and after log-in.
     28 *  - Linux 4.10 changed the user-kernel-ABI introduced in 4.6: test both.
    2829 *  - On other guests (than Linux 4.6 or later) running X.Org Server 1.3 or
    2930 *    later, VBoxClient --vmsvga should never be running as root, and should run
     
    9899        VBClFatalError(("%s called with bad argument\n", __func__));
    99100    /* Try to open the SVGA DRM device. */
    100     for (i = 0; i < 64; ++i)
     101    for (i = 0; i < 128; ++i)
    101102    {
    102103        char szPath[64];
     
    106107
    107108        /* Control devices for drm graphics driver control devices go from
    108          * controlD64 to controlD127.  The driver takes resize hints via the
    109          * control device. */
    110         rc = RTStrPrintf(szPath, sizeof(szPath), "/dev/dri/controlD%u", i + 64);
     109         * controlD64 to controlD127.  Render node devices go from renderD128
     110         * to renderD192.  The driver takes resize hints via the control device
     111         * on pre-4.10 kernels and on the render device on newer ones.  Try
     112         * both types. */
     113        if (i % 2 == 0)
     114            rc = RTStrPrintf(szPath, sizeof(szPath), "/dev/dri/renderD%u", i / 2 + 128);
     115        else
     116            rc = RTStrPrintf(szPath, sizeof(szPath), "/dev/dri/controlD%u", i / 2 + 64);
    111117        if (RT_FAILURE(rc))
    112118            VBClFatalError(("RTStrPrintf of device path failed, rc=%Rrc\n", rc));
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