drm: virtio-gpu: transfer dumb buffers to host on plane update
authorRob Herring <robh@kernel.org>
Wed, 13 Jan 2016 21:52:09 +0000 (15:52 -0600)
committerDave Airlie <airlied@redhat.com>
Wed, 10 Feb 2016 22:56:23 +0000 (08:56 +1000)
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>
drivers/gpu/drm/virtio/virtgpu_plane.c

index 519eebd6c581fc85572415ecd1a820ff138b979b..70b44a2345ab43e2ac1bef8ded76c292ab752884 100644 (file)
@@ -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;
        }
This page took 0.055308 seconds and 5 git commands to generate.