Message ID | 20200924003214.662-1-gurchetansingh@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v4,01/19] drm/virtio: blob prep: refactor getting pages and attaching backing | expand |
On Wed, Sep 23, 2020 at 05:31:56PM -0700, Gurchetan Singh wrote:
> Useful for upcoming blob resources.
Pushed to drm-misc-next (whole series).
thanks,
Gerd
On Tue, Sep 29, 2020 at 2:33 AM Gerd Hoffmann <kraxel@redhat.com> wrote: > On Wed, Sep 23, 2020 at 05:31:56PM -0700, Gurchetan Singh wrote: > > Useful for upcoming blob resources. > > Pushed to drm-misc-next (whole series). > Thanks -- sent over a 32-bit/64-bit bug fix and requested a virtio-spec vote. > > thanks, > Gerd > >
diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index 842f8b61aa897..4c107b53e81a0 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -228,22 +228,22 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, goto err_put_objs; } + ret = virtio_gpu_object_shmem_init(vgdev, bo, &ents, &nents); + if (ret != 0) { + virtio_gpu_free_object(&shmem_obj->base); + return ret; + } + if (params->virgl) { virtio_gpu_cmd_resource_create_3d(vgdev, bo, params, objs, fence); + virtio_gpu_object_attach(vgdev, bo, ents, nents); } else { virtio_gpu_cmd_create_resource(vgdev, bo, params, objs, fence); + virtio_gpu_object_attach(vgdev, bo, ents, nents); } - ret = virtio_gpu_object_shmem_init(vgdev, bo, &ents, &nents); - if (ret != 0) { - virtio_gpu_free_object(&shmem_obj->base); - return ret; - } - - virtio_gpu_object_attach(vgdev, bo, ents, nents); - *bo_ptr = bo; return 0;