aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm/ttm_bo.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-03-13 21:32:16 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-03-13 21:32:16 -0700
commitc60f7d5a8e7c639de5d9dfe07e1e91d302d506e4 (patch)
treec1d12d4963768232f3489f7dc5a6626ddd3d5fde /drivers/gpu/drm/ttm/ttm_bo.c
parentMerge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux (diff)
parentMerge tag 'ttm-fixes-3.14-2014-03-12' of git://people.freedesktop.org/~thomash/linux into drm-fixes (diff)
downloadlinux-dev-c60f7d5a8e7c639de5d9dfe07e1e91d302d506e4.tar.xz
linux-dev-c60f7d5a8e7c639de5d9dfe07e1e91d302d506e4.zip
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie: "Pretty minor set of fixes for radeon, ttm and vmwgfx. The ttm ones are a regression and an oops seen on server chipsets" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/vmwgfx: Fix a surface reference corner-case in legacy emulation mode drm/radeon/cik: properly set compute ring status on disable drm/radeon/cik: stop the sdma engines in the enable() function drm/radeon/cik: properly set sdma ring status on disable drm/radeon: fix runpm disabling on non-PX harder drm/ttm: don't oops if no invalidate_caches() drm/ttm: Work around performance regression with VM_PFNMAP
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index a06651309388..214b7992a3aa 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -351,9 +351,11 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
moved:
if (bo->evicted) {
- ret = bdev->driver->invalidate_caches(bdev, bo->mem.placement);
- if (ret)
- pr_err("Can not flush read caches\n");
+ if (bdev->driver->invalidate_caches) {
+ ret = bdev->driver->invalidate_caches(bdev, bo->mem.placement);
+ if (ret)
+ pr_err("Can not flush read caches\n");
+ }
bo->evicted = false;
}