diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2018-10-19 08:18:44 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2018-10-29 22:50:55 +0100 |
commit | c40336ba5ed6c67e131cbf82a4fa37faf3bf0ed3 (patch) | |
tree | 8ee6d4261cd3950acb8b88e3a283d9bd5247f820 /drivers/gpu/drm/virtio | |
parent | ae0dc3cc38b1afdb481e460cd0dd58e200df5426 (diff) |
drm/virtio: use virtio_gpu_object->hw_res_handle in virtio_gpu_mode_dumb_create()
Drop pointless resid variable in virtio_gpu_mode_dumb_create(), just use
the hw_res_handle field in virtio_gpu_object directly.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20181019061847.18958-4-kraxel@redhat.com
Diffstat (limited to 'drivers/gpu/drm/virtio')
-rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_gem.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_gem.c b/drivers/gpu/drm/virtio/virtgpu_gem.c index 33dbd5aed705..8d53451ec4e7 100644 --- a/drivers/gpu/drm/virtio/virtgpu_gem.c +++ b/drivers/gpu/drm/virtio/virtgpu_gem.c @@ -87,7 +87,6 @@ int virtio_gpu_mode_dumb_create(struct drm_file *file_priv, struct virtio_gpu_object *obj; int ret; uint32_t pitch; - uint32_t resid; uint32_t format; if (args->bpp != 32) @@ -104,13 +103,12 @@ int virtio_gpu_mode_dumb_create(struct drm_file *file_priv, format = virtio_gpu_translate_format(DRM_FORMAT_HOST_XRGB8888); obj = gem_to_virtio_gpu_obj(gobj); - virtio_gpu_resource_id_get(vgdev, &resid); - virtio_gpu_cmd_create_resource(vgdev, obj, resid, format, + virtio_gpu_resource_id_get(vgdev, &obj->hw_res_handle); + virtio_gpu_cmd_create_resource(vgdev, obj, obj->hw_res_handle, format, args->width, args->height); /* attach the object to the resource */ - obj = gem_to_virtio_gpu_obj(gobj); - ret = virtio_gpu_object_attach(vgdev, obj, resid, NULL); + ret = virtio_gpu_object_attach(vgdev, obj, obj->hw_res_handle, NULL); if (ret) goto fail; |