Skip to content

Commit 264b5b5

Browse files
sulixjlahtine-intel
authored andcommitted
drm/i915: Allow evicting to use the requested placement
In commit a78a8da ("drm/ttm: replace busy placement with flags v6"), the old system of having a separate placement list (for placements which should be used without eviction) and a 'busy' placement list (for placements which should be attempted if eviction is required) was replaced with a new one where placements could be marked 'FALLBACK' (to be attempted if eviction is required) or 'DESIRED' (to be attempted first, but not if eviction is required). i915 had always included the requested placement in the list of 'busy' placements: i.e., the placement could be used either if eviction is required or not. But when the new system was put in place, the requested (first) placement was marked 'DESIRED', so would never be used if eviction became necessary. While a bug in the original commit prevented this flag from working, when this was fixed in 4a0e7b3 ("drm/i915: fix applying placement flag"), it caused long hangs on DG2 systems with small BAR. Don't mark the requested placement DESIRED (or FALLBACK), allowing it to be used in both situations. This matches the old behaviour, and resolves the hangs. Thanks to Justin Brewer for bisecting the issue. Fixes: a78a8da ("drm/ttm: replace busy placement with flags v6") Fixes: 4a0e7b3 ("drm/i915: fix applying placement flag") Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11255 Signed-off-by: David Gow <david@davidgow.net> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240804091851.122186-2-david@davidgow.net (cherry picked from commit 54bf0af) Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
1 parent 8bdd9ef commit 264b5b5

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/gpu/drm/i915/gem/i915_gem_ttm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ i915_ttm_placement_from_obj(const struct drm_i915_gem_object *obj,
165165
i915_ttm_place_from_region(num_allowed ? obj->mm.placements[0] :
166166
obj->mm.region, &places[0], obj->bo_offset,
167167
obj->base.size, flags);
168-
places[0].flags |= TTM_PL_FLAG_DESIRED;
169168

170169
/* Cache this on object? */
171170
for (i = 0; i < num_allowed; ++i) {

0 commit comments

Comments
 (0)