drm/amdgpu: Update BO eviction priorities
authorjsg <jsg@openbsd.org>
Sat, 15 Jun 2024 03:40:23 +0000 (03:40 +0000)
committerjsg <jsg@openbsd.org>
Sat, 15 Jun 2024 03:40:23 +0000 (03:40 +0000)
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

index f4f80f6..ffee2d9 100644 (file)
@@ -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)