From 51c0cefd40ea4538e01b6871f5056515b7bfb0b7 Mon Sep 17 00:00:00 2001 From: jsg Date: Sat, 15 Jun 2024 03:40:23 +0000 Subject: [PATCH] drm/amdgpu: Update BO eviction priorities From Felix Kuehling 04cf241fe5e525020a512c5392f37a4541aa5e7c in linux-6.6.y/6.6.33 b0b13d532105e0e682d95214933bb8483a063184 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c index f4f80f6ec96..ffee2d9a97d 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c @@ -615,6 +615,8 @@ int amdgpu_bo_create(struct amdgpu_device *adev, else amdgpu_bo_placement_from_domain(bo, bp->domain); if (bp->type == ttm_bo_type_kernel) + bo->tbo.priority = 2; + else if (!(bp->flags & AMDGPU_GEM_CREATE_DISCARDABLE)) bo->tbo.priority = 1; if (!bp->destroy) -- 2.20.1