From: jsg Date: Sat, 15 Jun 2024 03:40:23 +0000 (+0000) Subject: drm/amdgpu: Update BO eviction priorities X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=51c0cefd40ea4538e01b6871f5056515b7bfb0b7;p=openbsd drm/amdgpu: Update BO eviction priorities From Felix Kuehling 04cf241fe5e525020a512c5392f37a4541aa5e7c in linux-6.6.y/6.6.33 b0b13d532105e0e682d95214933bb8483a063184 in mainline linux --- 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)