[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_MRskiOaMw-p4Xdq3i3Z2fJ=J2u+8LYFk0EydhRBPeafQ@mail.gmail.com>
Date: Thu, 18 Mar 2021 22:56:53 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Daniel Gomez <daniel@...c.com>
Cc: Maling list - DRI developers <dri-devel@...ts.freedesktop.org>,
David Airlie <airlied@...ux.ie>,
Felix Kuehling <Felix.Kuehling@....com>,
LKML <linux-kernel@...r.kernel.org>,
amd-gfx list <amd-gfx@...ts.freedesktop.org>,
Likun Gao <Likun.Gao@....com>, dagmcr@...il.com,
Alex Deucher <alexander.deucher@....com>,
Dave Airlie <airlied@...hat.com>,
Christian König <christian.koenig@....com>
Subject: Re: [PATCH] drm/amdgpu/ttm: Fix memory leak userptr pages
Applied. Thanks!
Alex
On Wed, Mar 17, 2021 at 12:09 PM Daniel Gomez <daniel@...c.com> wrote:
>
> If userptr pages have been pinned but not bounded,
> they remain uncleared.
>
> Signed-off-by: Daniel Gomez <daniel@...c.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index 9fd2157b133a..50c2b4827c13 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -1162,13 +1162,13 @@ static void amdgpu_ttm_backend_unbind(struct ttm_bo_device *bdev,
> struct amdgpu_ttm_tt *gtt = (void *)ttm;
> int r;
>
> - if (!gtt->bound)
> - return;
> -
> /* if the pages have userptr pinning then clear that first */
> if (gtt->userptr)
> amdgpu_ttm_tt_unpin_userptr(bdev, ttm);
>
> + if (!gtt->bound)
> + return;
> +
> if (gtt->offset == AMDGPU_BO_INVALID_OFFSET)
> return;
>
> --
> 2.30.2
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Powered by blists - more mailing lists