diff options
| author | Chia-I Wu <[email protected]> | 2020-12-19 03:19:59 +0000 |
|---|---|---|
| committer | Gerd Hoffmann <[email protected]> | 2020-12-22 12:43:30 +0000 |
| commit | b39100a55ceab858daa35f03e227b54a03cc11ee (patch) | |
| tree | f00ca04bebe741819d381d4ac3dfd2e80f428ff9 /drivers/gpu/drm/virtio/virtgpu_vram.c | |
| parent | drm/qxl: use flexible-array member instead of zero-length array (diff) | |
| download | kernel-b39100a55ceab858daa35f03e227b54a03cc11ee.tar.gz kernel-b39100a55ceab858daa35f03e227b54a03cc11ee.zip | |
drm/virtio: align blob resources to page sizes
They trigger the BUG_ON() in drm_gem_private_object_init otherwise.
Signed-off-by: Chia-I Wu <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Cc: Gurchetan Singh <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/virtio/virtgpu_vram.c')
| -rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_vram.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_vram.c b/drivers/gpu/drm/virtio/virtgpu_vram.c index 23c21bc4d01e..d6f215c4ff8d 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vram.c +++ b/drivers/gpu/drm/virtio/virtgpu_vram.c @@ -134,6 +134,8 @@ int virtio_gpu_vram_create(struct virtio_gpu_device *vgdev, obj = &vram->base.base.base; obj->funcs = &virtio_gpu_vram_funcs; + + params->size = PAGE_ALIGN(params->size); drm_gem_private_object_init(vgdev->ddev, obj, params->size); /* Create fake offset */ |
