mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
Merge e8b6e76f69 ("drm/virtio: implement context init: plumb {base_fence_ctx, ring_idx} to virtio_gpu_fence_alloc") into android-mainline
Steps on the way to 5.16-rc1 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ie2d64ec13e010ec299691c5cced57bc2c86ac6ce
This commit is contained in:
@@ -426,8 +426,9 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev,
|
||||
int index);
|
||||
|
||||
/* virtgpu_fence.c */
|
||||
struct virtio_gpu_fence *virtio_gpu_fence_alloc(
|
||||
struct virtio_gpu_device *vgdev);
|
||||
struct virtio_gpu_fence *virtio_gpu_fence_alloc(struct virtio_gpu_device *vgdev,
|
||||
uint64_t base_fence_ctx,
|
||||
uint32_t ring_idx);
|
||||
void virtio_gpu_fence_emit(struct virtio_gpu_device *vgdev,
|
||||
struct virtio_gpu_ctrl_hdr *cmd_hdr,
|
||||
struct virtio_gpu_fence *fence);
|
||||
|
||||
@@ -71,7 +71,9 @@ static const struct dma_fence_ops virtio_gpu_fence_ops = {
|
||||
.timeline_value_str = virtio_gpu_timeline_value_str,
|
||||
};
|
||||
|
||||
struct virtio_gpu_fence *virtio_gpu_fence_alloc(struct virtio_gpu_device *vgdev)
|
||||
struct virtio_gpu_fence *virtio_gpu_fence_alloc(struct virtio_gpu_device *vgdev,
|
||||
uint64_t base_fence_ctx,
|
||||
uint32_t ring_idx)
|
||||
{
|
||||
struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv;
|
||||
struct virtio_gpu_fence *fence = kzalloc(sizeof(struct virtio_gpu_fence),
|
||||
|
||||
@@ -173,7 +173,7 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,
|
||||
goto out_memdup;
|
||||
}
|
||||
|
||||
out_fence = virtio_gpu_fence_alloc(vgdev);
|
||||
out_fence = virtio_gpu_fence_alloc(vgdev, vgdev->fence_drv.context, 0);
|
||||
if(!out_fence) {
|
||||
ret = -ENOMEM;
|
||||
goto out_unresv;
|
||||
@@ -288,7 +288,7 @@ static int virtio_gpu_resource_create_ioctl(struct drm_device *dev, void *data,
|
||||
if (params.size == 0)
|
||||
params.size = PAGE_SIZE;
|
||||
|
||||
fence = virtio_gpu_fence_alloc(vgdev);
|
||||
fence = virtio_gpu_fence_alloc(vgdev, vgdev->fence_drv.context, 0);
|
||||
if (!fence)
|
||||
return -ENOMEM;
|
||||
ret = virtio_gpu_object_create(vgdev, ¶ms, &qobj, fence);
|
||||
@@ -367,7 +367,7 @@ static int virtio_gpu_transfer_from_host_ioctl(struct drm_device *dev,
|
||||
if (ret != 0)
|
||||
goto err_put_free;
|
||||
|
||||
fence = virtio_gpu_fence_alloc(vgdev);
|
||||
fence = virtio_gpu_fence_alloc(vgdev, vgdev->fence_drv.context, 0);
|
||||
if (!fence) {
|
||||
ret = -ENOMEM;
|
||||
goto err_unlock;
|
||||
@@ -427,7 +427,8 @@ static int virtio_gpu_transfer_to_host_ioctl(struct drm_device *dev, void *data,
|
||||
goto err_put_free;
|
||||
|
||||
ret = -ENOMEM;
|
||||
fence = virtio_gpu_fence_alloc(vgdev);
|
||||
fence = virtio_gpu_fence_alloc(vgdev, vgdev->fence_drv.context,
|
||||
0);
|
||||
if (!fence)
|
||||
goto err_unlock;
|
||||
|
||||
|
||||
@@ -302,7 +302,8 @@ static int virtio_gpu_plane_prepare_fb(struct drm_plane *plane,
|
||||
return 0;
|
||||
|
||||
if (bo->dumb && (plane->state->fb != new_state->fb)) {
|
||||
vgfb->fence = virtio_gpu_fence_alloc(vgdev);
|
||||
vgfb->fence = virtio_gpu_fence_alloc(vgdev, vgdev->fence_drv.context,
|
||||
0);
|
||||
if (!vgfb->fence)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user