diff options
author | Christian König <christian.koenig@amd.com> | 2018-02-01 16:39:29 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-02-19 22:19:52 +0300 |
commit | 25893a14c938d54babb1bbee46dd9b622591c866 (patch) | |
tree | 9a83f9ae9b7d855c2ecea39fdfe33abcc56a1207 /drivers/gpu/drm/ttm/ttm_bo_util.c | |
parent | cc32ad8f559c36ca2433d282aff690a6842a3a27 (diff) | |
download | linux-25893a14c938d54babb1bbee46dd9b622591c866.tar.xz |
drm/ttm: add ttm_tt_populate wrapper
Stop calling the driver callback directly.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Roger He <Hongbo.He@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo_util.c')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo_util.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index 33ffe286f3a5..38da6903cae9 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c @@ -375,8 +375,8 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo, /* * TTM might be null for moves within the same region. */ - if (ttm && ttm->state == tt_unpopulated) { - ret = ttm->bdev->driver->ttm_tt_populate(ttm, ctx); + if (ttm) { + ret = ttm_tt_populate(ttm, ctx); if (ret) goto out1; } @@ -557,11 +557,9 @@ static int ttm_bo_kmap_ttm(struct ttm_buffer_object *bo, BUG_ON(!ttm); - if (ttm->state == tt_unpopulated) { - ret = ttm->bdev->driver->ttm_tt_populate(ttm, &ctx); - if (ret) - return ret; - } + ret = ttm_tt_populate(ttm, &ctx); + if (ret) + return ret; if (num_pages == 1 && (mem->placement & TTM_PL_FLAG_CACHED)) { /* |