• Gerd Hoffmann's avatar
    qxl: alloc & use shadow for dumb buffers · 62676d10
    Gerd Hoffmann authored
    This patch changes the way the primary surface is used for dumb
    framebuffers.  Instead of configuring the bo itself as primary surface
    a shadow bo is created and used instead.  Framebuffers can share the
    shadow bo in case they have the same format and resolution.
    
    On atomic plane updates we don't have to update the primary surface in
    case we pageflip from one framebuffer to another framebuffer which
    shares the same shadow.  This in turn avoids the flicker caused by the
    primary-destroy + primary-create cycle, which is very annonying when
    running wayland on qxl.
    
    The qxl driver never actually writes to the shadow bo.  It sends qxl
    blit commands which update it though, and the spice server might
    actually execute them (and thereby write to the shadow) in case the
    local rendering is kicked for some reason.  This happens for example in
    case qemu is asked to write out a dump of the guest display (screendump
    monitor command).
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
    Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
    Link: http://patchwork.freedesktop.org/patch/msgid/20171019062150.28090-3-kraxel@redhat.com
    62676d10
qxl_cmd.c 17.7 KB