From a427f540e58ebfa6735c7a5eec3de33ae4c847f5 Mon Sep 17 00:00:00 2001 From: Lorenzo Rossi Date: Sun, 25 May 2025 12:19:12 +0200 Subject: [PATCH] nvk: Don't advertise BAR memory for Kepler cards Previously the driver would advertize the memory heap for BAR memory, but no memory type to use it. This would cause a lot of crashes for programs using the driver. Part-of: --- src/nouveau/vulkan/nvk_physical_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nouveau/vulkan/nvk_physical_device.c b/src/nouveau/vulkan/nvk_physical_device.c index c851ffa2547..224172834e8 100644 --- a/src/nouveau/vulkan/nvk_physical_device.c +++ b/src/nouveau/vulkan/nvk_physical_device.c @@ -1422,7 +1422,8 @@ nvk_create_drm_physical_device(struct vk_instance *_instance, }; if (pdev->info.bar_size_B > 0 && - pdev->info.bar_size_B < pdev->info.vram_size_B) { + pdev->info.bar_size_B < pdev->info.vram_size_B && + pdev->info.cls_eng3d >= MAXWELL_A) { bar_heap_idx = pdev->mem_heap_count++; pdev->mem_heaps[bar_heap_idx] = (struct nvk_memory_heap) { .size = pdev->info.bar_size_B,