Commit 8bde6c0d authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/vram-helper: Don't put new BOs into VRAM

Most drivers that use VRAM helpers have only a few MiB of framebuffer
memory available. To reduce fragmentation, new BOs are now put into
system memory by default. Only pin operations are allowed to move BOs
into VRAM.

v2:
	* rebased onto latest drm-tip
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200922145700.25413-4-tzimmermann@suse.de
parent 4d92d7d7
...@@ -222,8 +222,7 @@ struct drm_gem_vram_object *drm_gem_vram_create(struct drm_device *dev, ...@@ -222,8 +222,7 @@ struct drm_gem_vram_object *drm_gem_vram_create(struct drm_device *dev,
acc_size = ttm_bo_dma_acc_size(bdev, size, sizeof(*gbo)); acc_size = ttm_bo_dma_acc_size(bdev, size, sizeof(*gbo));
gbo->bo.bdev = bdev; gbo->bo.bdev = bdev;
drm_gem_vram_placement(gbo, DRM_GEM_VRAM_PL_FLAG_VRAM | drm_gem_vram_placement(gbo, DRM_GEM_VRAM_PL_FLAG_SYSTEM);
DRM_GEM_VRAM_PL_FLAG_SYSTEM);
/* /*
* A failing ttm_bo_init will call ttm_buffer_object_destroy * A failing ttm_bo_init will call ttm_buffer_object_destroy
......
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