RE: [PATCH v2] drm/amdgpu: add print for iommu translation mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Official Use Only - General]

Ping :)

Best,
Graham

> -----Original Message-----
> From: Kuehling, Felix <Felix.Kuehling@xxxxxxx>
> Sent: Monday, March 20, 2023 12:16 PM
> To: Sider, Graham <Graham.Sider@xxxxxxx>; amd-
> gfx@xxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v2] drm/amdgpu: add print for iommu translation mode
> 
> On 2023-03-20 10:08, Graham Sider wrote:
> > Add log to display whether RAM is direct vs DMA mapped.
> >
> > Signed-off-by: Graham Sider <Graham.Sider@xxxxxxx>
> 
> Acked-by: Felix Kuehling <Felix.Kuehling@xxxxxxx>
> 
> 
> > ---
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++++-
> >   1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > index 3bd6c5aef796..83774824694b 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > @@ -3528,8 +3528,12 @@ static void
> amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev)
> >   	struct iommu_domain *domain;
> >
> >   	domain = iommu_get_domain_for_dev(adev->dev);
> > -	if (!domain || domain->type == IOMMU_DOMAIN_IDENTITY)
> > +	if (!domain || domain->type == IOMMU_DOMAIN_IDENTITY) {
> > +		dev_info(adev->dev, "RAM is direct mapped to GPU (not
> translated by IOMMU)\n");
> >   		adev->ram_is_direct_mapped = true;
> > +	} else {
> > +		dev_info(adev->dev, "RAM is DMA mapped to GPU
> (translated by IOMMU)\n");
> > +	}
> >   }
> >
> >   static const struct attribute *amdgpu_dev_attributes[] = {




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux