drm/ttm: Fix memory type compatibility check
authorThomas Hellstrom <thellstrom@vmware.com>
Mon, 28 Oct 2013 09:02:19 +0000 (02:02 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jun 2014 23:02:13 +0000 (16:02 -0700)
commit63034aee5f85e6c4decdaa600ed1febfa90a348f
treebd36354149e12ac5a02749474c2d093e76629362
parent465282b316e98ed17698900af70fa8260c9c9e70
drm/ttm: Fix memory type compatibility check

commit 59c8e66378fb78adbcd05f0d09783dde6fef282b upstream.

Also check the busy placements before deciding to move a buffer object.
Failing to do this may result in a completely unneccessary move within a
single memory type.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Weng Meiling <wengmeiling.weng@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/ttm/ttm_bo.c