]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/nouveau/gr/gf100-: lose contents of global ctxbufs across suspend
authorBen Skeggs <bskeggs@redhat.com>
Tue, 19 Sep 2023 21:55:58 +0000 (17:55 -0400)
committerLyude Paul <lyude@redhat.com>
Tue, 19 Sep 2023 22:21:50 +0000 (18:21 -0400)
Some of these buffers are quite large, and there's no need to preserve
them across suspend.

Mark the contents as lost to speedup suspend/resume.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Acked-by: Danilo Krummrich <me@dakr.org>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230919220442.202488-4-lyude@redhat.com
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c

index 3648868bb9fc5138d6f94fc281ff49168808028e..c494a1ff2d5727cef5ce01131379462be4c4a16e 100644 (file)
@@ -2032,18 +2032,18 @@ gf100_gr_oneinit(struct nvkm_gr *base)
        }
 
        /* Allocate global context buffers. */
-       ret = nvkm_memory_new(device, NVKM_MEM_TARGET_INST, gr->func->grctx->pagepool_size,
-                             0x100, false, &gr->pagepool);
+       ret = nvkm_memory_new(device, NVKM_MEM_TARGET_INST_SR_LOST,
+                             gr->func->grctx->pagepool_size, 0x100, false, &gr->pagepool);
        if (ret)
                return ret;
 
-       ret = nvkm_memory_new(device, NVKM_MEM_TARGET_INST, gr->func->grctx->bundle_size,
+       ret = nvkm_memory_new(device, NVKM_MEM_TARGET_INST_SR_LOST, gr->func->grctx->bundle_size,
                              0x100, false, &gr->bundle_cb);
        if (ret)
                return ret;
 
-       ret = nvkm_memory_new(device, NVKM_MEM_TARGET_INST, gr->func->grctx->attrib_cb_size(gr),
-                             0x1000, false, &gr->attrib_cb);
+       ret = nvkm_memory_new(device, NVKM_MEM_TARGET_INST_SR_LOST,
+                             gr->func->grctx->attrib_cb_size(gr), 0x1000, false, &gr->attrib_cb);
        if (ret)
                return ret;