mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +00:00
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>
This commit is contained in:
parent
bd17d1c77c
commit
4109e7f7d5
@ -72,6 +72,13 @@ static void virtio_gpu_plane_atomic_update(struct drm_plane *plane,
|
|||||||
vgfb = to_virtio_gpu_framebuffer(plane->state->fb);
|
vgfb = to_virtio_gpu_framebuffer(plane->state->fb);
|
||||||
bo = gem_to_virtio_gpu_obj(vgfb->obj);
|
bo = gem_to_virtio_gpu_obj(vgfb->obj);
|
||||||
handle = bo->hw_res_handle;
|
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 {
|
} else {
|
||||||
handle = 0;
|
handle = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user