Commit 6a01d277 authored by Gerd Hoffmann's avatar Gerd Hoffmann

drm/virtio: fix pageflip flush

Sending the flush command only makes sense if we actually have
a framebuffer attached to the scanout (handle != 0).
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20181219122708.4586-3-kraxel@redhat.com
parent 3630c2a2
...@@ -130,11 +130,12 @@ static void virtio_gpu_primary_plane_update(struct drm_plane *plane, ...@@ -130,11 +130,12 @@ static void virtio_gpu_primary_plane_update(struct drm_plane *plane,
plane->state->src_h >> 16, plane->state->src_h >> 16,
plane->state->src_x >> 16, plane->state->src_x >> 16,
plane->state->src_y >> 16); plane->state->src_y >> 16);
virtio_gpu_cmd_resource_flush(vgdev, handle, if (handle)
plane->state->src_x >> 16, virtio_gpu_cmd_resource_flush(vgdev, handle,
plane->state->src_y >> 16, plane->state->src_x >> 16,
plane->state->src_w >> 16, plane->state->src_y >> 16,
plane->state->src_h >> 16); plane->state->src_w >> 16,
plane->state->src_h >> 16);
} }
static int virtio_gpu_cursor_prepare_fb(struct drm_plane *plane, static int virtio_gpu_cursor_prepare_fb(struct drm_plane *plane,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment