Skip to contentSkip to conversation

drm/virtio: align blob resources to page sizes

PATCH Applied Chia-I Wu 2 participants 2 messages Dec 19, 2020 – Dec 22, 2020

Subsystems (3)
lore
Share & tools
lore

Chia-I Wu

author reviewer
#0 lore raw

PATCH 1/1 drm/virtio: align blob resources to page sizes

They trigger the BUG_ON() in drm_gem_private_object_init otherwise.

Cc Gurchetan Singh <[email protected]>
Cc Gerd Hoffmann <[email protected]>
---
 drivers/gpu/drm/virtio/virtgpu_vram.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/virtio/virtgpu_vram.c +2 -0
index 23c21bc4d01e..d6f215c4ff8d 100644
@@ -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 */
Signature · 6 lines
2.29.2.684.gfbc64c5ab5-goog

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel