Skip to content

Commit

Permalink
drm: virtio-gpu: transfer dumb buffers to host on plane update
Browse files Browse the repository at this point in the history
For dumb buffers, we need to transfer them to the host when updating a
plane.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Rob Herring authored and Dave Airlie committed Feb 10, 2016
1 parent bd17d1c commit 4109e7f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/gpu/drm/virtio/virtgpu_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ static void virtio_gpu_plane_atomic_update(struct drm_plane *plane,
vgfb = to_virtio_gpu_framebuffer(plane->state->fb);
bo = gem_to_virtio_gpu_obj(vgfb->obj);
handle = bo->hw_res_handle;
if (bo->dumb) {
virtio_gpu_cmd_transfer_to_host_2d
(vgdev, handle, 0,
cpu_to_le32(plane->state->crtc_w),
cpu_to_le32(plane->state->crtc_h),
plane->state->crtc_x, plane->state->crtc_y, NULL);
}
} else {
handle = 0;
}
Expand Down

0 comments on commit 4109e7f

Please sign in to comment.