]> git.baikalelectronics.ru Git - kernel.git/commit
staging: vboxvideo: Cache mode width, height and crtc panning in vbox_crtc
authorHans de Goede <hdegoede@redhat.com>
Sat, 29 Sep 2018 12:18:14 +0000 (14:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 29 Sep 2018 12:31:32 +0000 (05:31 -0700)
commit967e6258f4e5ab175c1b46f151e12ae3c02185f2
tree100c74c47d2c41b879fd310ea05ac98252349cc4
parent0275dff0e1988a699bfd8736c8dc3e7cdd967a1f
staging: vboxvideo: Cache mode width, height and crtc panning in vbox_crtc

When setting a mode we not only pass the mode to the hypervisor,
but also information on how to map / translate input coordinates
for the emulated USB tablet.  This input-mapping may change when
the mode on *another* crtc changes.

This means that sometimes we must do a modeset on other crtc-s then
the one being changed to update the input-mapping. Including crtc-s
which may be disabled inside the guest (shown as a black window
on the host unless closed by the user).

With atomic modesetting the mode-info of disabled crtcs gets zeroed
yet we need it when updating the input-map to avoid resizing the
window as a side effect of a mode_set on another crtc.

This commit adds caching of the mode info into out private vbox_crtc
struct so that we always have the info at hand when we need it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vboxvideo/vbox_drv.h
drivers/staging/vboxvideo/vbox_mode.c