]> git.karo-electronics.de Git - karo-tx-linux.git/commit
qxl: Don't notify userspace when monitors config is unchanged
authorChristophe Fergeau <cfergeau@redhat.com>
Tue, 8 Nov 2016 09:12:08 +0000 (10:12 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 15 Nov 2016 08:45:32 +0000 (09:45 +0100)
commit9e3b317839298abc0ab796a691f8449a16792398
treef7446129b34a440f38cb1d86cd77424397a69812
parentae4b9a09234ec77832406bdb767015ebd82cf22f
qxl: Don't notify userspace when monitors config is unchanged

When the QXL driver receives a QXL_INTERRUPT_CLIENT_MONITORS_CONFIG interrupt,
we currently always notify userspace that there was some hotplug event.

However, gnome-shell/mutter is reacting to this event by attempting a
resolution change, which it does by issueing drmModeRmFB, drmModeAddFB,
and then drmModeSetCrtc. This has the side-effect of causing
qxl_crtc_mode_set() to tell the QXL virtual hardware that a primary
surface was destroyed and created. After going through QEMU and then the
remote SPICE client, a new identical monitors config message will be
sent, resulting in a QXL_INTERRUPT_CLIENT_MONITORS_CONFIG interrupt to
be emitted, and the same scenario occurring again.

As destroying/creating the primary surface causes a visible screen
flicker, this makes the guest hard to use (
https://bugzilla.redhat.com/show_bug.cgi?id=1266484 ).

This commit checks if the screen configuration we received is the same
one as the current one, and does not notify userspace about it if that's
the case.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Message-id: 20161108091209.25568-7-cfergeau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/qxl/qxl_display.c