* [PATCH] drm/amdgpu: Fix the lpfn checking condition in drm buddy
@ 2022-09-14 12:53 Ma Jun
2022-09-14 13:50 ` Christian König
0 siblings, 1 reply; 2+ messages in thread
From: Ma Jun @ 2022-09-14 12:53 UTC (permalink / raw)
To: amd-gfx, christian.koenig, arunpravin.paneerselvam
Cc: alexander.deucher, guchun.chen
Because the value of man->size is changed during suspend/resume process,
use mgr->mm.size instead of man->size here for lpfn checking.
Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Suggested-by: Christian König <christian.koenig@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
index 48e3dc28b156..0b598b510bd8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
@@ -441,7 +441,7 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man,
if (place->flags & TTM_PL_FLAG_TOPDOWN)
vres->flags |= DRM_BUDDY_TOPDOWN_ALLOCATION;
- if (fpfn || lpfn != man->size)
+ if (fpfn || lpfn != mgr->mm.size)
/* Allocate blocks in desired range */
vres->flags |= DRM_BUDDY_RANGE_ALLOCATION;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amdgpu: Fix the lpfn checking condition in drm buddy
2022-09-14 12:53 [PATCH] drm/amdgpu: Fix the lpfn checking condition in drm buddy Ma Jun
@ 2022-09-14 13:50 ` Christian König
0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2022-09-14 13:50 UTC (permalink / raw)
To: Ma Jun, amd-gfx, arunpravin.paneerselvam; +Cc: alexander.deucher, guchun.chen
Am 14.09.22 um 14:53 schrieb Ma Jun:
> Because the value of man->size is changed during suspend/resume process,
> use mgr->mm.size instead of man->size here for lpfn checking.
>
> Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
> Suggested-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
> index 48e3dc28b156..0b598b510bd8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
> @@ -441,7 +441,7 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man,
> if (place->flags & TTM_PL_FLAG_TOPDOWN)
> vres->flags |= DRM_BUDDY_TOPDOWN_ALLOCATION;
>
> - if (fpfn || lpfn != man->size)
> + if (fpfn || lpfn != mgr->mm.size)
> /* Allocate blocks in desired range */
> vres->flags |= DRM_BUDDY_RANGE_ALLOCATION;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-14 13:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14 12:53 [PATCH] drm/amdgpu: Fix the lpfn checking condition in drm buddy Ma Jun
2022-09-14 13:50 ` Christian König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.