diff options
author | Christian König <christian.koenig@amd.com> | 2021-08-30 09:22:06 +0200 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2022-01-26 15:29:24 +0100 |
commit | 3f268ef06f8cf3c481dbd5843d564f5170c6df54 (patch) | |
tree | 102bbd239b2a6faeb16b64c2faf83e2cbb915bac /drivers/gpu/drm/ttm/ttm_resource.c | |
parent | de3688e469b08be958914674e8b01cb0cea42388 (diff) | |
download | linux-3f268ef06f8cf3c481dbd5843d564f5170c6df54.tar.gz linux-3f268ef06f8cf3c481dbd5843d564f5170c6df54.tar.bz2 linux-3f268ef06f8cf3c481dbd5843d564f5170c6df54.zip |
drm/ttm: add back a reference to the bdev to the res manager
It is simply a lot cleaner to have this around instead of adding
the device throughout the call chain.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20220124122514.1832-3-christian.koenig@amd.com
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_resource.c')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_resource.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c index 7e5e32d2ef12..4717128633e9 100644 --- a/drivers/gpu/drm/ttm/ttm_resource.c +++ b/drivers/gpu/drm/ttm/ttm_resource.c @@ -143,16 +143,19 @@ EXPORT_SYMBOL(ttm_resource_compat); * ttm_resource_manager_init * * @man: memory manager object to init + * @bdev: ttm device this manager belongs to * @p_size: size managed area in pages. * * Initialise core parts of a manager object. */ void ttm_resource_manager_init(struct ttm_resource_manager *man, + struct ttm_device *bdev, unsigned long p_size) { unsigned i; spin_lock_init(&man->move_lock); + man->bdev = bdev; man->size = p_size; for (i = 0; i < TTM_MAX_BO_PRIORITY; ++i) |