All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] drm/amdgpu: minor cleanup for amdgpu_ttm_bind
@ 2017-10-20  9:20 Christian König
       [not found] ` <20171020092036.11145-1-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Christian König @ 2017-10-20  9:20 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

From: Christian König <christian.koenig@amd.com>

Filter the placement mask before using it. In theory it could be that we
have other flags set here as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index dcdfb8d176fc..32c822f3db11 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -910,7 +910,8 @@ int amdgpu_ttm_bind(struct ttm_buffer_object *bo, struct ttm_mem_reg *bo_mem)
 	placement.busy_placement = &placements;
 	placements.fpfn = 0;
 	placements.lpfn = adev->mc.gart_size >> PAGE_SHIFT;
-	placements.flags = bo->mem.placement | TTM_PL_FLAG_TT;
+	placements.flags = (bo->mem.placement & ~TTM_PL_MASK_MEM) |
+		TTM_PL_FLAG_TT;
 
 	r = ttm_bo_mem_space(bo, &placement, &tmp, true, false);
 	if (unlikely(r))
-- 
2.11.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-10-24  6:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-20  9:20 [PATCH 1/5] drm/amdgpu: minor cleanup for amdgpu_ttm_bind Christian König
     [not found] ` <20171020092036.11145-1-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-10-20  9:20   ` [PATCH 2/5] drm/amdgpu: nuke amdgpu_ttm_is_bound() Christian König
     [not found]     ` <20171020092036.11145-2-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-10-23  7:33       ` Chunming Zhou
     [not found]         ` <0f8c52bb-fefa-319a-2926-e30a403d0867-5C7GfCeVMHo@public.gmane.org>
2017-10-23  8:11           ` Christian König
     [not found]             ` <09bdc92d-f3bd-6b07-85fc-8943220248cc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-23  8:34               ` Chunming Zhou
     [not found]                 ` <d404cdc7-9b5a-297f-1d21-25bb1b037ac1-5C7GfCeVMHo@public.gmane.org>
2017-10-23 14:26                   ` Christian König
     [not found]                     ` <f763be73-ed30-e278-d951-3ff2d88735c5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-24  1:41                       ` Chunming Zhou
     [not found]                         ` <8203a931-2c05-cd50-2788-ab10e70382de-5C7GfCeVMHo@public.gmane.org>
2017-10-24  6:51                           ` Christian König
2017-10-20  9:20   ` [PATCH 3/5] drm/amdgpu: remove extra parameter from amdgpu_ttm_bind() Christian König
2017-10-20  9:20   ` [PATCH 4/5] drm/amdgpu: move GART recovery into GTT manager Christian König
2017-10-20  9:20   ` [PATCH 5/5] drm/amdgpu: don't flush the TLB before initializing GART Christian König
2017-10-20  9:28   ` [PATCH 1/5] drm/amdgpu: minor cleanup for amdgpu_ttm_bind Michel Dänzer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.