drm/virtio: pass virtio_gpu_object to virtio_gpu_cmd_transfer_to_host_{2d, 3d}
Pass virtio_gpu_object down to virtio_gpu_cmd_transfer_to_host_2d and virtio_gpu_cmd_transfer_to_host_3d functions, instead of passing just the virtio resource handle. This is needed to lookup the scatter list of the object, for dma sync. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiandi An <jiandi.an@amd.com> Tested-by: Jiandi An <jiandi.an@amd.com> Link: http://patchwork.freedesktop.org/patch/msgid/20180920062924.6514-1-kraxel@redhat.com
This commit is contained in:
@@ -158,7 +158,7 @@ static void virtio_gpu_primary_plane_update(struct drm_plane *plane,
|
||||
handle = bo->hw_res_handle;
|
||||
if (bo->dumb) {
|
||||
virtio_gpu_cmd_transfer_to_host_2d
|
||||
(vgdev, handle, 0,
|
||||
(vgdev, bo, 0,
|
||||
cpu_to_le32(plane->state->src_w >> 16),
|
||||
cpu_to_le32(plane->state->src_h >> 16),
|
||||
cpu_to_le32(plane->state->src_x >> 16),
|
||||
@@ -217,7 +217,7 @@ static void virtio_gpu_cursor_plane_update(struct drm_plane *plane,
|
||||
if (bo && bo->dumb && (plane->state->fb != old_state->fb)) {
|
||||
/* new cursor -- update & wait */
|
||||
virtio_gpu_cmd_transfer_to_host_2d
|
||||
(vgdev, handle, 0,
|
||||
(vgdev, bo, 0,
|
||||
cpu_to_le32(plane->state->crtc_w),
|
||||
cpu_to_le32(plane->state->crtc_h),
|
||||
0, 0, &fence);
|
||||
|
Reference in New Issue
Block a user