VirtualBox

Changeset 76937 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Jan 22, 2019 4:39:05 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128314
Message:

Additions/linux/vboxvideo: Fix reporting invalid suggested-offset-properties
(Partial commit of kernel change.)
bugref:8282: Additions/linux: track kernel changes to vboxvideo in our own tree

The x and y hints receives from the host are unsigned 32 bit integers and
they get set to -1 (0xffffffff) when invalid. Before this commit the
vboxvideo driver was storing them in an u16 causing the -1 to be truncated
to 65535 which, once reported to userspace, was breaking gnome 3.26+
in Wayland mode.


This commit stores the host values in 32 bit variables, removing the
truncation and checks for -1, replacing it with 0 as -1 is not a valid
suggested-offset-property value. Likewise the properties are now
initialized to 0 instead of -1, since -1 is not a valid value.
This fixes gnome 3.26+ in Wayland mode not working with the vboxvideo
driver.


Reported-by: Gianfranco Costamagna <locutusofborg@…>
Cc: stable@…
Cc: Michael Thayer <michael.thayer@…>
Signed-off-by: Hans de Goede <hdegoede@…>
Signed-off-by: Greg Kroah-Hartman <gregkh@…>

Location:
trunk/src/VBox/Additions/linux/drm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/drm/vbox_drv.h

    r76563 r76937  
    237237        struct vbox_crtc *vbox_crtc;
    238238        struct {
    239                 u16 width;
    240                 u16 height;
     239                u32 width;
     240                u32 height;
    241241                bool disconnected;
    242242        } mode_hint;
  • trunk/src/VBox/Additions/linux/drm/vbox_irq.c

    r76553 r76937  
    159159                disconnected = !(hints->fEnabled);
    160160                crtc_id = vbox_conn->vbox_crtc->crtc_id;
    161                 vbox_conn->mode_hint.width = hints->cx & 0x8fff;
    162                 vbox_conn->mode_hint.height = hints->cy & 0x8fff;
     161                vbox_conn->mode_hint.width = hints->cx;
     162                vbox_conn->mode_hint.height = hints->cy;
    163163                vbox_conn->vbox_crtc->x_hint = hints->dx;
    164164                vbox_conn->vbox_crtc->y_hint = hints->dy;
Note: See TracChangeset for help on using the changeset viewer.

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