aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_notifier.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_notifier.c b/drivers/gpu/drm/nouveau/nouveau_notifier.c
index 7ba3fc0b30c..5b39718ae1f 100644
--- a/drivers/gpu/drm/nouveau/nouveau_notifier.c
+++ b/drivers/gpu/drm/nouveau/nouveau_notifier.c
@@ -35,19 +35,22 @@ nouveau_notifier_init_channel(struct nouveau_channel *chan)
35{ 35{
36 struct drm_device *dev = chan->dev; 36 struct drm_device *dev = chan->dev;
37 struct nouveau_bo *ntfy = NULL; 37 struct nouveau_bo *ntfy = NULL;
38 uint32_t flags; 38 uint32_t flags, ttmpl;
39 int ret; 39 int ret;
40 40
41 if (nouveau_vram_notify) 41 if (nouveau_vram_notify) {
42 flags = NOUVEAU_GEM_DOMAIN_VRAM; 42 flags = NOUVEAU_GEM_DOMAIN_VRAM;
43 else 43 ttmpl = TTM_PL_FLAG_VRAM;
44 } else {
44 flags = NOUVEAU_GEM_DOMAIN_GART; 45 flags = NOUVEAU_GEM_DOMAIN_GART;
46 ttmpl = TTM_PL_FLAG_TT;
47 }
45 48
46 ret = nouveau_gem_new(dev, NULL, PAGE_SIZE, 0, flags, 0, 0, &ntfy); 49 ret = nouveau_gem_new(dev, NULL, PAGE_SIZE, 0, flags, 0, 0, &ntfy);
47 if (ret) 50 if (ret)
48 return ret; 51 return ret;
49 52
50 ret = nouveau_bo_pin(ntfy, flags); 53 ret = nouveau_bo_pin(ntfy, ttmpl);
51 if (ret) 54 if (ret)
52 goto out_err; 55 goto out_err;
53 56