diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2017-10-31 20:56:19 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-11-02 06:32:23 +0300 |
commit | 1de3377555f14495c49c935810c220f014dbef71 (patch) | |
tree | bdefa0d63120dc9603fdc2f87d8a9858d81f27ed /drivers/gpu/drm/nouveau/nouveau_ttm.c | |
parent | 7b8656636add64ea5c184a5de4a326d33a1d021e (diff) | |
download | linux-1de3377555f14495c49c935810c220f014dbef71.tar.xz |
drm/nouveau: allocate vram with nvkm_ram_get()
This will cause a subtle behaviour change on GPUs that are in mixed-memory
configurations in that VRAM in the degraded section of VRAM will no longer
be used for TTM buffer objects.
That section of VRAM is not meant to be used for displayable/compressed
surfaces, and we have no reliable way with the current interfaces to be
able to make that decision properly.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_ttm.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_ttm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c index 3bf3b60130e0..8c4f45ea6234 100644 --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c @@ -60,11 +60,9 @@ static void nouveau_vram_manager_del(struct ttm_mem_type_manager *man, struct ttm_mem_reg *reg) { - struct nouveau_drm *drm = nouveau_bdev(man->bdev); - struct nvkm_ram *ram = nvxx_fb(&drm->client.device)->ram; - struct nvkm_mem *mem = nouveau_mem(reg)->_mem; + struct nvkm_memory *memory = nouveau_mem(reg)->_mem->memory; nouveau_mem_del(reg); - ram->func->put(ram, &mem); + nvkm_memory_unref(&memory); } static int |