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>
This commit is contained in:

committed by
Alex Deucher

parent
5d95109815
commit
dde5da2379
@@ -199,8 +199,8 @@ static struct ttm_backend_func cirrus_tt_backend_func = {
|
||||
};
|
||||
|
||||
|
||||
static struct ttm_tt *cirrus_ttm_tt_create(struct ttm_bo_device *bdev,
|
||||
unsigned long size, uint32_t page_flags)
|
||||
static struct ttm_tt *cirrus_ttm_tt_create(struct ttm_buffer_object *bo,
|
||||
uint32_t page_flags)
|
||||
{
|
||||
struct ttm_tt *tt;
|
||||
|
||||
@@ -208,7 +208,7 @@ static struct ttm_tt *cirrus_ttm_tt_create(struct ttm_bo_device *bdev,
|
||||
if (tt == NULL)
|
||||
return NULL;
|
||||
tt->func = &cirrus_tt_backend_func;
|
||||
if (ttm_tt_init(tt, bdev, size, page_flags)) {
|
||||
if (ttm_tt_init(tt, bo, page_flags)) {
|
||||
kfree(tt);
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user