diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-02-10 02:15:26 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-02-10 02:15:26 +0000 |
commit | 6780ac82cf3725731061bca667b56a2360d78c5e (patch) | |
tree | 17607bcd0f5dab88218729534e5900c0c731d804 /sys/dev | |
parent | 54f266af498c7927a80270ee69922c788f150471 (diff) |
drm/ttm: Handle in-memory region copies
From Jakob Bornecrantz
f8f0599d88fb76646bdd8b735dc2574ad80c625d in ubuntu 3.8
9a0599ddeae012a771bba5e23393fc52d8a59d89 in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/ttm/ttm_bo_util.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/ttm/ttm_bo_util.c b/sys/dev/pci/drm/ttm/ttm_bo_util.c index 60426189811..44ec787e16d 100644 --- a/sys/dev/pci/drm/ttm/ttm_bo_util.c +++ b/sys/dev/pci/drm/ttm/ttm_bo_util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ttm_bo_util.c,v 1.3 2014/02/09 10:57:26 jsg Exp $ */ +/* $OpenBSD: ttm_bo_util.c,v 1.4 2014/02/10 02:15:25 jsg Exp $ */ /************************************************************************** * * Copyright (c) 2007-2009 VMware, Inc., Palo Alto, CA., USA @@ -347,7 +347,9 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo, if (old_iomap == NULL && ttm == NULL) goto out2; - if (ttm->state == tt_unpopulated) { + /* TTM might be null for moves within the same region. + */ + if (ttm && ttm->state == tt_unpopulated) { ret = ttm->bdev->driver->ttm_tt_populate(ttm); if (ret) { /* if we fail here don't nuke the mm node |