diff options
author | Rob Herring <robh@kernel.org> | 2016-01-13 15:52:09 -0600 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-02-11 08:56:23 +1000 |
commit | 4109e7f7d5aeefaa1d72f9ab4c63aa5d79fc81fb (patch) | |
tree | b1eac5588fd85eef5e660770aa4cdf8c3f129929 /drivers/gpu/drm/virtio | |
parent | bd17d1c77c2ae3bb988a256ea5bda6d405b62b56 (diff) |
drm: virtio-gpu: transfer dumb buffers to host on plane update
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>
Diffstat (limited to 'drivers/gpu/drm/virtio')
-rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_plane.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c index 519eebd6c581..70b44a2345ab 100644 --- a/drivers/gpu/drm/virtio/virtgpu_plane.c +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c @@ -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; } |