summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/mgag200
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2018-02-22 10:18:14 +0100
committerAlex Deucher <alexander.deucher@amd.com>2018-03-14 14:38:27 -0500
commitdde5da2379319c08ceb2295467df6e60a3cf5da1 (patch)
treed585dfd0257b7b62182e0eec09b6ea49f0135d99 /drivers/gpu/drm/mgag200
parent5d95109815493e273a2ef9010df0939aa3cfe10f (diff)
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/mgag200')
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_ttm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_ttm.c b/drivers/gpu/drm/mgag200/mgag200_ttm.c
index 69beb2046008..05570f0de4d7 100644
--- a/drivers/gpu/drm/mgag200/mgag200_ttm.c
+++ b/drivers/gpu/drm/mgag200/mgag200_ttm.c
@@ -199,8 +199,8 @@ static struct ttm_backend_func mgag200_tt_backend_func = {
};
-static struct ttm_tt *mgag200_ttm_tt_create(struct ttm_bo_device *bdev,
- unsigned long size, uint32_t page_flags)
+static struct ttm_tt *mgag200_ttm_tt_create(struct ttm_buffer_object *bo,
+ uint32_t page_flags)
{
struct ttm_tt *tt;
@@ -208,7 +208,7 @@ static struct ttm_tt *mgag200_ttm_tt_create(struct ttm_bo_device *bdev,
if (tt == NULL)
return NULL;
tt->func = &mgag200_tt_backend_func;
- if (ttm_tt_init(tt, bdev, size, page_flags)) {
+ if (ttm_tt_init(tt, bo, page_flags)) {
kfree(tt);
return NULL;
}