mirror of
https://github.com/torvalds/linux.git
synced 2026-05-02 13:32:40 -04:00
drm/virtio: params struct for virtio_gpu_cmd_create_resource()
Add format, width and height fields to the virtio_gpu_object_params struct. With that in place we can use the parameter struct for virtio_gpu_cmd_create_resource() calls too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Noralf Trønnes <noralf@tronnes.org> Link: http://patchwork.freedesktop.org/patch/msgid/20190318113332.10900-4-kraxel@redhat.com
This commit is contained in:
@@ -302,6 +302,9 @@ static int virtio_gpu_resource_create_ioctl(struct drm_device *dev, void *data,
|
||||
INIT_LIST_HEAD(&validate_list);
|
||||
memset(&mainbuf, 0, sizeof(struct ttm_validate_buffer));
|
||||
|
||||
params.format = rc->format;
|
||||
params.width = rc->width;
|
||||
params.height = rc->height;
|
||||
params.size = rc->size;
|
||||
|
||||
/* allocate a single page size object */
|
||||
@@ -314,8 +317,7 @@ static int virtio_gpu_resource_create_ioctl(struct drm_device *dev, void *data,
|
||||
obj = &qobj->gem_base;
|
||||
|
||||
if (!vgdev->has_virgl_3d) {
|
||||
virtio_gpu_cmd_create_resource(vgdev, qobj, rc->format,
|
||||
rc->width, rc->height);
|
||||
virtio_gpu_cmd_create_resource(vgdev, qobj, ¶ms);
|
||||
|
||||
ret = virtio_gpu_object_attach(vgdev, qobj, NULL);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user