diff options
author | Christian König <[email protected]> | 2024-02-26 15:27:59 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2024-03-04 11:09:32 +0100 |
commit | 4a0e7b3c37531aabddf6f144b83ae9b65ec809fd (patch) | |
tree | 6d2fe729fd68a5fd6edf869d9eb1469ab2f7bd38 | |
parent | 9cb3542aeeac31b3dd6b5a7d58b9b7d6fe9fd2bc (diff) |
drm/i915: fix applying placement flag
Switching from a separate list to flags introduced a bug here.
We were accidentially ORing the flag before initailizing the placement
and not after. So this code didn't do nothing except producing a
warning.
Signed-off-by: Christian König <[email protected]>
Reported-by: Stephen Rothwell <[email protected]>
Fixes: a78a8da51b36 ("drm/ttm: replace busy placement with flags v6")
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Tested-by: Stephen Rothwell <[email protected]> # compile only
Reviewed-by: Lucas De Marchi <[email protected]>
-rw-r--r-- | drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c index 27dcfd8a34bb..e6f177183c0f 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c @@ -162,10 +162,10 @@ i915_ttm_placement_from_obj(const struct drm_i915_gem_object *obj, unsigned int flags = obj->flags; unsigned int i; - places[0].flags |= TTM_PL_FLAG_DESIRED; i915_ttm_place_from_region(num_allowed ? obj->mm.placements[0] : obj->mm.region, &places[0], obj->bo_offset, obj->base.size, flags); + places[0].flags |= TTM_PL_FLAG_DESIRED; /* Cache this on object? */ for (i = 0; i < num_allowed; ++i) { |