[PATCH 38/59] drm/vram-helper: use wrapper to access memory managers
Thomas Zimmermann
tzimmermann at suse.de
Tue Aug 4 07:00:10 UTC 2020
Am 04.08.20 um 04:56 schrieb Dave Airlie:
> From: Dave Airlie <airlied at redhat.com>
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann at suse.de>
> ---
> drivers/gpu/drm/drm_gem_vram_helper.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
> index 2099851c017e..a01768adb96d 100644
> --- a/drivers/gpu/drm/drm_gem_vram_helper.c
> +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
> @@ -1075,7 +1075,7 @@ static int drm_vram_mm_debugfs(struct seq_file *m, void *data)
> {
> struct drm_info_node *node = (struct drm_info_node *) m->private;
> struct drm_vram_mm *vmm = node->minor->dev->vram_mm;
> - struct ttm_mem_type_manager *man = &vmm->bdev.man[TTM_PL_VRAM];
> + struct ttm_mem_type_manager *man = ttm_manager_type(&vmm->bdev, TTM_PL_VRAM);
> struct drm_printer p = drm_seq_file_printer(m);
>
> ttm_mem_type_manager_debug(man, &p);
> @@ -1103,7 +1103,7 @@ EXPORT_SYMBOL(drm_vram_mm_debugfs_init);
> static int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev,
> uint64_t vram_base, size_t vram_size)
> {
> - struct ttm_mem_type_manager *man = &vmm->bdev.man[TTM_PL_VRAM];
> + struct ttm_mem_type_manager *man = ttm_manager_type(&vmm->bdev, TTM_PL_VRAM);
> int ret;
>
> vmm->vram_base = vram_base;
> @@ -1127,7 +1127,7 @@ static int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev,
>
> static void drm_vram_mm_cleanup(struct drm_vram_mm *vmm)
> {
> - ttm_range_man_fini(&vmm->bdev, &vmm->bdev.man[TTM_PL_VRAM]);
> + ttm_range_man_fini(&vmm->bdev, ttm_manager_type(&vmm->bdev, TTM_PL_VRAM));
> ttm_bo_device_release(&vmm->bdev);
> }
>
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 516 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200804/3c519e7c/attachment.sig>
More information about the dri-devel
mailing list