Commit b39100a5 authored by Chia-I Wu's avatar Chia-I Wu Committed by Gerd Hoffmann

drm/virtio: align blob resources to page sizes

They trigger the BUG_ON() in drm_gem_private_object_init otherwise.
Signed-off-by: default avatarChia-I Wu <olvaffe@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20201219031959.92932-1-olvaffe@gmail.com
Cc: Gurchetan Singh <gurchetansingh@chromium.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent d1f66f05
...@@ -134,6 +134,8 @@ int virtio_gpu_vram_create(struct virtio_gpu_device *vgdev, ...@@ -134,6 +134,8 @@ int virtio_gpu_vram_create(struct virtio_gpu_device *vgdev,
obj = &vram->base.base.base; obj = &vram->base.base.base;
obj->funcs = &virtio_gpu_vram_funcs; obj->funcs = &virtio_gpu_vram_funcs;
params->size = PAGE_ALIGN(params->size);
drm_gem_private_object_init(vgdev->ddev, obj, params->size); drm_gem_private_object_init(vgdev->ddev, obj, params->size);
/* Create fake offset */ /* Create fake offset */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment