]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
drm/vmwgfx: Fix a case where the code would BUG when trying to pin GMR memory
authorThomas Hellstrom <thellstrom@vmware.com>
Fri, 9 Nov 2012 09:45:14 +0000 (10:45 +0100)
committerDave Airlie <airlied@redhat.com>
Fri, 9 Nov 2012 10:49:06 +0000 (20:49 +1000)
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
Cc: stable@vger.kernel.org
Cc: linux-graphics-maintainer@vmware.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/vmwgfx/vmwgfx_dmabuf.c

index 3ce68a2e312dbba2e588a3e52595b0d7f060ef44..d1498bfd78732ef519f50d6fea726d502cffd824 100644 (file)
@@ -306,7 +306,7 @@ void vmw_bo_pin(struct ttm_buffer_object *bo, bool pin)
 
        BUG_ON(!atomic_read(&bo->reserved));
        BUG_ON(old_mem_type != TTM_PL_VRAM &&
-              old_mem_type != VMW_PL_FLAG_GMR);
+              old_mem_type != VMW_PL_GMR);
 
        pl_flags = TTM_PL_FLAG_VRAM | VMW_PL_FLAG_GMR | TTM_PL_FLAG_CACHED;
        if (pin)