summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-10-19 08:18:43 +0200
committerGerd Hoffmann <kraxel@redhat.com>2018-10-29 22:50:55 +0100
commitae0dc3cc38b1afdb481e460cd0dd58e200df5426 (patch)
tree7929a6a7b1612f23a50794e5865b4dc38bddc3db /drivers/gpu/drm
parent23c897d72ca8064c626be0ef73fe671488d584bb (diff)
drm/virtio: use virtio_gpu_object->hw_res_handle in virtio_gpufb_create()
Drop pointless resid variable in virtio_gpufb_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-3-kraxel@redhat.com
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_fb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_fb.c b/drivers/gpu/drm/virtio/virtgpu_fb.c
index d39f4f3350d0..800960bdd9c6 100644
--- a/drivers/gpu/drm/virtio/virtgpu_fb.c
+++ b/drivers/gpu/drm/virtio/virtgpu_fb.c
@@ -214,7 +214,7 @@ static int virtio_gpufb_create(struct drm_fb_helper *helper,
struct drm_framebuffer *fb;
struct drm_mode_fb_cmd2 mode_cmd = {};
struct virtio_gpu_object *obj;
- uint32_t resid, format, size;
+ uint32_t format, size;
int ret;
mode_cmd.width = sizes->surface_width;
@@ -231,8 +231,8 @@ static int virtio_gpufb_create(struct drm_fb_helper *helper,
if (IS_ERR(obj))
return PTR_ERR(obj);
- 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,
mode_cmd.width, mode_cmd.height);
ret = virtio_gpu_object_kmap(obj);
@@ -242,7 +242,7 @@ static int virtio_gpufb_create(struct drm_fb_helper *helper,
}
/* attach the object to the resource */
- ret = virtio_gpu_object_attach(vgdev, obj, resid, NULL);
+ ret = virtio_gpu_object_attach(vgdev, obj, obj->hw_res_handle, NULL);
if (ret)
goto err_obj_attach;