summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm/ttm_agp_backend.c
diff options
context:
space:
mode:
authorChristian König2018-02-22 10:18:14 +0100
committerAlex Deucher2018-03-14 20:38:27 +0100
commitdde5da2379319c08ceb2295467df6e60a3cf5da1 (patch)
treed585dfd0257b7b62182e0eec09b6ea49f0135d99 /drivers/gpu/drm/ttm/ttm_agp_backend.c
parentdrm/ttm: add ttm_bo_pipeline_gutting (diff)
downloadkernel-qcow2-linux-dde5da2379319c08ceb2295467df6e60a3cf5da1.tar.gz
kernel-qcow2-linux-dde5da2379319c08ceb2295467df6e60a3cf5da1.tar.xz
kernel-qcow2-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/ttm/ttm_agp_backend.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_agp_backend.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
index f7c2aefbec7c..7c2485fe88d8 100644
--- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
+++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
@@ -110,9 +110,9 @@ static struct ttm_backend_func ttm_agp_func = {
.destroy = ttm_agp_destroy,
};
-struct ttm_tt *ttm_agp_tt_create(struct ttm_bo_device *bdev,
+struct ttm_tt *ttm_agp_tt_create(struct ttm_buffer_object *bo,
struct agp_bridge_data *bridge,
- unsigned long size, uint32_t page_flags)
+ uint32_t page_flags)
{
struct ttm_agp_backend *agp_be;
@@ -124,7 +124,7 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_bo_device *bdev,
agp_be->bridge = bridge;
agp_be->ttm.func = &ttm_agp_func;
- if (ttm_tt_init(&agp_be->ttm, bdev, size, page_flags)) {
+ if (ttm_tt_init(&agp_be->ttm, bo, page_flags)) {
kfree(agp_be);
return NULL;
}