[Public] Thanks for your kind feedback, Luben, Felix and Alex. I will send a v2 set with your comments addressed and RB added. Regards, Guchun -----Original Message----- From: Tuikov, Luben <Luben.Tuikov@xxxxxxx> Sent: Thursday, June 10, 2021 1:06 AM To: Alex Deucher <alexdeucher@xxxxxxxxx>; Chen, Guchun <Guchun.Chen@xxxxxxx> Cc: amd-gfx list <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>; Kuehling, Felix <Felix.Kuehling@xxxxxxx> Subject: Re: [PATCH] drm/amdgpu: use adev_to_drm to get drm_device That's exactly what I said, but can see that 1/2 of the responses went to amd-gfx, and the other half to brahma ML. Regards, Luben On 2021-06-09 11:38 a.m., Alex Deucher wrote: > On Wed, Jun 9, 2021 at 5:23 AM Guchun Chen <guchun.chen@xxxxxxx> wrote: >> Fixes: >> 9faf262c32d3 drm/amdgpu: Add DMA mapping of GTT BOs >> 090f3a60d7e8 drm/amdgpu: Use delayed work to collect RAS error >> counters >> > drop the fixes lines and say something like use the adev_to_drm() > macro for consistency. With that, > Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx> > >> Signed-off-by: Guchun Chen <guchun.chen@xxxxxxx> >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- >> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c >> b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c >> index 016815b7a773..fb6bcc386de1 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c >> @@ -639,7 +639,7 @@ kfd_mem_attach_dmabuf(struct amdgpu_device *adev, struct kgd_mem *mem, >> } >> } >> >> - gobj = amdgpu_gem_prime_import(&adev->ddev, mem->dmabuf); >> + gobj = amdgpu_gem_prime_import(adev_to_drm(adev), >> + mem->dmabuf); >> if (IS_ERR(gobj)) >> return PTR_ERR(gobj); >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c >> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c >> index ec936cde2726..bfbcb9ff2453 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c >> @@ -2122,7 +2122,7 @@ static void amdgpu_ras_counte_dw(struct work_struct *work) >> struct amdgpu_ras *con = container_of(work, struct amdgpu_ras, >> ras_counte_delay_work.work); >> struct amdgpu_device *adev = con->adev; >> - struct drm_device *dev = &adev->ddev; >> + struct drm_device *dev = adev_to_drm(adev->ddev); >> unsigned long ce_count, ue_count; >> int res; >> >> -- >> 2.17.1 >> >> _______________________________________________ >> amd-gfx mailing list >> amd-gfx@xxxxxxxxxxxxxxxxxxxxx >> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flis >> ts.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7C >> luben.tuikov%40amd.com%7C04e4afbe1642484eb15008d92b5ca67d%7C3dd8961fe >> 4884e608e11a82d994e183d%7C0%7C0%7C637588499214061155%7CUnknown%7CTWFp >> bGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6M >> n0%3D%7C1000&sdata=DvbjnGu0Lafx%2FgCIejsFJgMyngl9bKIvIdLjTngQrCM% >> 3D&reserved=0 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx