diff options
author | Christian König <christian.koenig@amd.com> | 2018-02-22 10:18:14 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-03-14 14:38:27 -0500 |
commit | dde5da2379319c08ceb2295467df6e60a3cf5da1 (patch) | |
tree | d585dfd0257b7b62182e0eec09b6ea49f0135d99 /drivers/gpu/drm/bochs | |
parent | 5d95109815493e273a2ef9010df0939aa3cfe10f (diff) | |
download | blackbird-op-linux-dde5da2379319c08ceb2295467df6e60a3cf5da1.tar.gz blackbird-op-linux-dde5da2379319c08ceb2295467df6e60a3cf5da1.zip |
drm/ttm: add bo as parameter to the ttm_tt_create callback
Instead of calculating the size in bytes just to recalculate the number
of pages from it pass the BO directly to the function.
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/bochs')
-rw-r--r-- | drivers/gpu/drm/bochs/bochs_mm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/bochs/bochs_mm.c b/drivers/gpu/drm/bochs/bochs_mm.c index 18b95329f631..39cd08416773 100644 --- a/drivers/gpu/drm/bochs/bochs_mm.c +++ b/drivers/gpu/drm/bochs/bochs_mm.c @@ -176,8 +176,7 @@ static struct ttm_backend_func bochs_tt_backend_func = { .destroy = &bochs_ttm_backend_destroy, }; -static struct ttm_tt *bochs_ttm_tt_create(struct ttm_bo_device *bdev, - unsigned long size, +static struct ttm_tt *bochs_ttm_tt_create(struct ttm_buffer_object *bo, uint32_t page_flags) { struct ttm_tt *tt; @@ -186,7 +185,7 @@ static struct ttm_tt *bochs_ttm_tt_create(struct ttm_bo_device *bdev, if (tt == NULL) return NULL; tt->func = &bochs_tt_backend_func; - if (ttm_tt_init(tt, bdev, size, page_flags)) { + if (ttm_tt_init(tt, bo, page_flags)) { kfree(tt); return NULL; } |