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>
这个提交包含在:
Ben Skeggs
2017-11-01 03:56:19 +10:00
父节点 7b8656636a
当前提交 1de3377555
修改 2 个文件,包含 32 行新增13 行删除

查看文件

@@ -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