[12/59] drm/vram-helper: call the ttm manager debug function
diff mbox series

Message ID 20200804025632.3868079-13-airlied@gmail.com
State New
Headers show
Series
  • ttm misc cleanups, mem refactoring, rename objects. (v2)
Related show

Commit Message

Dave Airlie Aug. 4, 2020, 2:55 a.m. UTC
From: Dave Airlie <airlied@redhat.com>

This code was assuming there was a drm_mm here, don't do
that call the correct API.

v2: use the new exported interface.

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/drm_gem_vram_helper.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Thomas Zimmermann Aug. 4, 2020, 6:55 a.m. UTC | #1
Am 04.08.20 um 04:55 schrieb Dave Airlie:
> From: Dave Airlie <airlied@redhat.com>
> 
> This code was assuming there was a drm_mm here, don't do
> that call the correct API.
> 
> v2: use the new exported interface.
> 
> Signed-off-by: Dave Airlie <airlied@redhat.com>

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
>  drivers/gpu/drm/drm_gem_vram_helper.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
> index a93a00966f3a..c20aee2fddf3 100644
> --- a/drivers/gpu/drm/drm_gem_vram_helper.c
> +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
> @@ -1075,12 +1075,10 @@ 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 drm_mm *mm = vmm->bdev.man[TTM_PL_VRAM].priv;
> +	struct ttm_mem_type_manager *man = &vmm->bdev.man[TTM_PL_VRAM];
>  	struct drm_printer p = drm_seq_file_printer(m);
>  
> -	spin_lock(&ttm_bo_glob.lru_lock);
> -	drm_mm_print(mm, &p);
> -	spin_unlock(&ttm_bo_glob.lru_lock);
> +	ttm_mem_type_manager_debug(man, &p);
>  	return 0;
>  }
>  
>
Gerd Hoffmann Aug. 4, 2020, 10:48 a.m. UTC | #2
On Tue, Aug 04, 2020 at 12:55:45PM +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied@redhat.com>
> 
> This code was assuming there was a drm_mm here, don't do
> that call the correct API.
> 
> v2: use the new exported interface.

Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>

Patch
diff mbox series

diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
index a93a00966f3a..c20aee2fddf3 100644
--- a/drivers/gpu/drm/drm_gem_vram_helper.c
+++ b/drivers/gpu/drm/drm_gem_vram_helper.c
@@ -1075,12 +1075,10 @@  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 drm_mm *mm = vmm->bdev.man[TTM_PL_VRAM].priv;
+	struct ttm_mem_type_manager *man = &vmm->bdev.man[TTM_PL_VRAM];
 	struct drm_printer p = drm_seq_file_printer(m);
 
-	spin_lock(&ttm_bo_glob.lru_lock);
-	drm_mm_print(mm, &p);
-	spin_unlock(&ttm_bo_glob.lru_lock);
+	ttm_mem_type_manager_debug(man, &p);
 	return 0;
 }