Message ID | 20201219031959.92932-1-olvaffe@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/virtio: align blob resources to page sizes | expand |
On Fri, Dec 18, 2020 at 07:19:59PM -0800, Chia-I Wu wrote: > They trigger the BUG_ON() in drm_gem_private_object_init otherwise. > > Signed-off-by: Chia-I Wu <olvaffe@gmail.com> > Cc: Gurchetan Singh <gurchetansingh@chromium.org> > Cc: Gerd Hoffmann <kraxel@redhat.com> Pushed to drm-misc-next. thanks, Gerd
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 */
They trigger the BUG_ON() in drm_gem_private_object_init otherwise. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Cc: Gurchetan Singh <gurchetansingh@chromium.org> Cc: Gerd Hoffmann <kraxel@redhat.com> --- drivers/gpu/drm/virtio/virtgpu_vram.c | 2 ++ 1 file changed, 2 insertions(+)