]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
staging: vboxvideo: Fix reporting invalid suggested-offset-properties
authorHans de Goede <hdegoede@redhat.com>
Thu, 12 Oct 2017 18:10:25 +0000 (20:10 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 14 Mar 2018 10:41:32 +0000 (11:41 +0100)
commit54bda669e5dced2777eaf016a5cee6204b2d502c
treec90eac888941fdf028be30a281c92bae1ac70135
parent9bd5b28b1550bea7179a85ec554f922b4418d783
staging: vboxvideo: Fix reporting invalid suggested-offset-properties

BugLink: http://bugs.launchpad.net/bugs/1744212
commit ce10d7b4e8e3574b9616e54a09d64521b9aeb8b6 upstream.

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@debian.org>
Cc: Michael Thayer <michael.thayer@oracle.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/staging/vboxvideo/vbox_drv.h
drivers/staging/vboxvideo/vbox_irq.c
drivers/staging/vboxvideo/vbox_mode.c