From 5f898d99de9248d421615205e81c468b4d8117e0 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Tue, 4 Oct 2011 20:13:15 +0200 Subject: [PATCH] vmwgfx: Make sure the reserved area is at the start of vram Signed-off-by: Jakob Bornecrantz Signed-off-by: Thomas Hellstrom Signed-off-by: Dave Airlie --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index c14eb764e096..7ee8b8e12185 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -717,6 +717,9 @@ static int vmw_surface_dmabuf_pin(struct vmw_framebuffer *vfb) vmw_framebuffer_to_vfbs(&vfb->base); unsigned long size = vfbs->base.base.pitch * vfbs->base.base.height; int ret; + struct ttm_placement ne_placement = vmw_vram_ne_placement; + + ne_placement.lpfn = (size + (PAGE_SIZE - 1)) / PAGE_SIZE; vfbs->buffer = kzalloc(sizeof(*vfbs->buffer), GFP_KERNEL); if (unlikely(vfbs->buffer == NULL)) -- 2.39.5