Skip to content

Commit 4109e7f

Browse files
robherringairlied
authored andcommitted
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>
1 parent bd17d1c commit 4109e7f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/gpu/drm/virtio/virtgpu_plane.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ static void virtio_gpu_plane_atomic_update(struct drm_plane *plane,
7272
vgfb = to_virtio_gpu_framebuffer(plane->state->fb);
7373
bo = gem_to_virtio_gpu_obj(vgfb->obj);
7474
handle = bo->hw_res_handle;
75+
if (bo->dumb) {
76+
virtio_gpu_cmd_transfer_to_host_2d
77+
(vgdev, handle, 0,
78+
cpu_to_le32(plane->state->crtc_w),
79+
cpu_to_le32(plane->state->crtc_h),
80+
plane->state->crtc_x, plane->state->crtc_y, NULL);
81+
}
7582
} else {
7683
handle = 0;
7784
}

0 commit comments

Comments
 (0)