[AMD Official Use Only - Internal Distribution Only] That's a known separated issue. Eve it get fixed, we don’t need additional call in to any bo functions. So let's just create separated fix for that one. You want to send out the patch? Regards, Hawking -----Original Message----- From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Cui, Flora Sent: Friday, January 17, 2020 10:43 To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx Subject: Re: [PATCH 2/2] drm/amdgpu: skip reservation of discovery tmr region in pre-Navi IMHO it's better to handle the size==0 case in amdgpu_bo_create_kernel_at(). 在 1/17/2020 2:57 AM, Hawking Zhang 写道: > IP discovery is only supported in Navi series and onwards. > There is no need to reserve a portion of vram as discovery tmr region > for pre-Navi adapters. > > Signed-off-by: Hawking Zhang <Hawking.Zhang@xxxxxxx> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > index 967f6d0..f21fd8fa 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > @@ -1822,14 +1822,16 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) > * reserve TMR memory at the top of VRAM which holds > * IP Discovery data and is protected by PSP. > */ > - r = amdgpu_bo_create_kernel_at(adev, > + if (adev->discovery_tmr_size > 0) { > + r = amdgpu_bo_create_kernel_at(adev, > adev->gmc.real_vram_size - adev->discovery_tmr_size, > adev->discovery_tmr_size, > AMDGPU_GEM_DOMAIN_VRAM, > &adev->discovery_memory, > NULL); > - if (r) > - return r; > + if (r) > + return r; > + } > > DRM_INFO("amdgpu: %uM of VRAM memory ready\n", > (unsigned) (adev->gmc.real_vram_size / (1024 * 1024))); _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Chawking.zhang%40amd.com%7C4d6cb0e6742e4a35941d08d79af6f6ad%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637148257906675785&sdata=4H3PE0Nai51yAi7Hy6R9E8qNmuNhlDYJQOirLYzp1QI%3D&reserved=0 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx