]> git.baikalelectronics.ru Git - kernel.git/commit
drm/qxl: use surface_id 0 for primary surface on all monitors
authorDavid Mansfield <spice@dm.cobite.com>
Wed, 4 Jun 2014 02:12:15 +0000 (12:12 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 4 Jun 2014 02:13:22 +0000 (12:13 +1000)
commit6f1c3d3d1bf25646bf0f289bee77d258b506f38a
tree0d3ced34dd9fea55f97bc26a7b6553b5bebefaa1
parentee24c48997e479990beb7a15f53d3ac8d2e4c61c
drm/qxl: use surface_id 0 for primary surface on all monitors

spice-server and downstream code expect that the primary surface
will always have surface_id = 0, while in reality, once allocated, the
surface_id in qxl.ko is NEVER 0.  In a dual head environment, all
monitors render portions of the primary surface.

However, when the monitor config events are generated and sent,
the primary surface is only mapped to the correct identifier
(i.e. 0) for the primary head (where crtc index is 0).

The fix is to look at the "primary" flag in the bo and always
use id 0, irrespective of which head is being configured.

[airlied: qxl hw really needs to be fixed to scanout surfaces]

Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/qxl/qxl_display.c