diff options
author | Dave Airlie <airlied@redhat.com> | 2020-09-15 10:21:15 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-09-16 09:33:24 +1000 |
commit | 7eec915138279d7a83ff8f219846bf7c8ae637c1 (patch) | |
tree | ed3ff19a6a2f97dc13b16034819d257a84f07e29 /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |
parent | 9c3006a4cc1b165652a07727caf7926054f9aa9f (diff) | |
download | lwn-7eec915138279d7a83ff8f219846bf7c8ae637c1.tar.gz lwn-7eec915138279d7a83ff8f219846bf7c8ae637c1.zip |
drm/ttm/tt: add wrappers to set tt state.
This adds 2 getters and 4 setters, however unbound and populated
are currently the same thing, this will change, it also drops
a BUG_ON that seems not that useful.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200915024007.67163-2-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index c2678e021f95..3e8376891ec8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -1304,7 +1304,7 @@ static int amdgpu_ttm_tt_populate(struct ttm_bo_device *bdev, return -ENOMEM; ttm->page_flags |= TTM_PAGE_FLAG_SG; - ttm->state = tt_unbound; + ttm_tt_set_populated(ttm); return 0; } @@ -1324,7 +1324,7 @@ static int amdgpu_ttm_tt_populate(struct ttm_bo_device *bdev, drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages, gtt->ttm.dma_address, ttm->num_pages); - ttm->state = tt_unbound; + ttm_tt_set_populated(ttm); return 0; } |