• Gerd Hoffmann's avatar
    drm/qxl: cover all crtcs in shadow bo. · 90adda2c
    Gerd Hoffmann authored
    The qxl device supports only a single active framebuffer ("primary
    surface" in spice terminology).  In multihead configurations are handled
    by defining rectangles within the primary surface for each head/crtc.
    
    Userspace which uses the qxl ioctl interface (xorg qxl driver) is aware
    of this limitation and will setup framebuffers and crtcs accordingly.
    
    Userspace which uses dumb framebuffers (xorg modesetting driver,
    wayland) is not aware of this limitation and tries to use two
    framebuffers (one for each crtc) instead.
    
    The qxl kms driver already has the dumb bo separated from the primary
    surface, by using a (shared) shadow bo as primary surface.  This is
    needed to support pageflips without having to re-create the primary
    surface.  The qxl driver will blit from the dumb bo to the shadow bo
    instead.
    
    So we can extend the shadow logic:  Maintain a global shadow bo (aka
    primary surface), make it big enough that dumb bo's for all crtcs fit in
    side-by-side.  Adjust the pageflip blits to place the heads next to each
    other in the shadow.
    
    With this patch in place multihead qxl works with wayland.
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
    Acked-by: default avatarNoralf Trønnes <noralf@tronnes.org>
    Link: http://patchwork.freedesktop.org/patch/msgid/20190118122020.27596-15-kraxel@redhat.com
    90adda2c
qxl_display.c 33.3 KB