Skip to content

Commit 4a0e7b3

Browse files
Christian KönigChristianKoenigAMD
authored andcommitted
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 <christian.koenig@amd.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Fixes: a78a8da ("drm/ttm: replace busy placement with flags v6") Link: https://patchwork.freedesktop.org/patch/msgid/20240226142759.93130-1-christian.koenig@amd.com Tested-by: Stephen Rothwell <sfr@canb.auug.org.au> # compile only Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
1 parent 9cb3542 commit 4a0e7b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@ i915_ttm_placement_from_obj(const struct drm_i915_gem_object *obj,
162162
unsigned int flags = obj->flags;
163163
unsigned int i;
164164

165-
places[0].flags |= TTM_PL_FLAG_DESIRED;
166165
i915_ttm_place_from_region(num_allowed ? obj->mm.placements[0] :
167166
obj->mm.region, &places[0], obj->bo_offset,
168167
obj->base.size, flags);
168+
places[0].flags |= TTM_PL_FLAG_DESIRED;
169169

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

0 commit comments

Comments
 (0)