diff options
author | Christian König <christian.koenig@amd.com> | 2020-09-08 16:55:55 +0200 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2020-09-11 13:31:23 +0200 |
commit | e03d342c621b985b68b3062cdbc3cdd6c6d7860b (patch) | |
tree | cd0f01c43b40cf251acf610f305bdad79e091728 /drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | |
parent | drm/nouveau: stop using TTM placement flags (diff) | |
download | linux-dev-e03d342c621b985b68b3062cdbc3cdd6c6d7860b.tar.xz linux-dev-e03d342c621b985b68b3062cdbc3cdd6c6d7860b.zip |
drm/vmwgfx: stop setting multiple domain flags
Setting more than one placement flag is illegal.
Fix this by using the current flags.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/389824/?series=81551&rev=1
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_bo.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c index 3229451d0706..03f5660d85a4 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c @@ -354,10 +354,11 @@ void vmw_bo_pin_reserved(struct vmw_buffer_object *vbo, bool pin) pl.fpfn = 0; pl.lpfn = 0; - pl.flags = TTM_PL_FLAG_VRAM | VMW_PL_FLAG_GMR | VMW_PL_FLAG_MOB - | TTM_PL_FLAG_SYSTEM | TTM_PL_FLAG_CACHED; + pl.flags = bo->mem.placement; if (pin) pl.flags |= TTM_PL_FLAG_NO_EVICT; + else + pl.flags &= ~TTM_PL_FLAG_NO_EVICT; memset(&placement, 0, sizeof(placement)); placement.num_placement = 1; |