[Spice-devel] [RFC qxl-wddm-dod 0/3] Synchronization of display mode change and pushing drawables

Yuri Benditovich yuri.benditovich at daynix.com
Sun Apr 16 19:43:00 UTC 2017


This is result of investigation of HCK tests "WHQL FPO optimization check for kernel video drivers" on
latest upstream driver.
These tests execute in aloop fast change of display mode and full screen rendering between changes.
When they run on qxl-wddm-dod driver with separate thread that pushes drawables to the host and with
spice server 0.12.4 (rhel-7.2) there are warning printouts of spice server:
"rendering incorrect from now on: get_drawable" and sometimes (3/10) the guest system
stops responding (qxl-wddm-dod driver is in infinite wait for memory allocation).
In case of fast change of display mode it is possible that the driver creates drawable objects
in selected display mode but sends them down in the middle of the change or after change of display mode.
This can cause failure in validation of drawable in spice server.
The same tests do not produce any warnings and system stuck is not reproduced with 0.16 release of the
driver (before implementation of separate thread)
When these tests run on spice server 0.12.8 there are the same warnings but guest stuck was not
reproduced in 10 runs.
In spice server 0.13 these warnings removed from spice server code and guest stuck also was not
reproduced in 10 runs.
It is unclear which commit in spice server 0.12 makes the change, if any.
To avoid inconsistency between drawables and current display mode this set of patches implements
synchronization between display mode change and sending drawables to the host.
Each successful processing of rendering callback creates array of drawables, places it to internal
ring, increments counter of outstanding operations and triggers processing in separate thread.
The thread processes drawables, pushes them to command ring and decrements the counter of outstanding
operations.
When the OS changes display mode, the driver waits until the thread pushes all the queued drawables to the
host, disables queuing of drawables, executes display mode switch and then enables queuing of drawables.

Yuri Benditovich (3):
  Move code for discarding drawable to separate procedure
  Implement rendering state machine
  Synchronize display mode change and pushing drawables

 qxldod/QxlDod.cpp |  35 +++++++++++++++----
 qxldod/QxlDod.h   | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 130 insertions(+), 7 deletions(-)

-- 
2.7.0.windows.1



More information about the Spice-devel mailing list