Skip to contentSkip to conversation

drm/amdgpu: add print for iommu translation mode

PATCH Superseded Graham Sider 5 participants 8 messages Mar 17, 2023 – Mar 21, 2023

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: add print for iommu translation mode

Add log to display whether RAM is direct vs DMA mapped.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +5 -1
index 8bba5e6872a1..8797a9523244 100644
@@ -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) {
+		pr_info("RAM is direct mapped to GPU (not traslated by IOMMU)\n");
 		adev->ram_is_direct_mapped = true;
+	} else {
+		pr_info("RAM is DMA mapped to GPU (translated by IOMMU)\n");
+	}
 }
 
 static const struct attribute *amdgpu_dev_attributes[] = {
Signature · 1 line
2.25.1
#1 lore raw
Quoted 3 lines · Graham Sider

Add log to display whether RAM is direct vs DMA mapped.

If this information is only useful for debugging purposes, please use drm_dbg() instead of pr_info().

Quoted 22 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +5 -1
index 8bba5e6872a1..8797a9523244 100644
@@ -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) {
+		pr_info("RAM is direct mapped to GPU (not traslated by IOMMU)\n");
  		adev->ram_is_direct_mapped = true;
+	} else {
+		pr_info("RAM is DMA mapped to GPU (translated by IOMMU)\n");
+	}
  }
 
  static const struct attribute *amdgpu_dev_attributes[] = {
Signature · 1 line
Hamza
#2 lore raw

[AMD Official Use Only - General]

Quoted 28 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Hamza Mahfooz
Sent: Friday, March 17, 2023 3:58 PM
To: Sider, Graham <[email protected]>; [email protected]
Cc: Kuehling, Felix <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: add print for iommu translation mode

Quoted 3 lines · Graham Sider

Add log to display whether RAM is direct vs DMA mapped.

If this information is only useful for debugging purposes, please use drm_dbg() instead of pr_info().

Review

Quoted 5 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void

Quoted 4 lines

index 8bba5e6872a1..8797a9523244 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
@@ -3528,8 +3528,12 @@ static void

amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev)

Quoted 6 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev)

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -1
  	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) {
+		pr_info("RAM is direct mapped to GPU (not traslated by

traslated -> translated

Kent

Quoted 12 lines

IOMMU)\n");

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev)

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
  		adev->ram_is_direct_mapped = true;
+	} else {
+		pr_info("RAM is DMA mapped to GPU (translated by

IOMMU)\n");

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev) · line 3539

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
+	}
  }
 
  static const struct attribute *amdgpu_dev_attributes[] = {

--
Hamza

#3 lore raw

[AMD Official Use Only - General]

Quoted 8 lines

-----Original Message-----
From: Russell, Kent <[email protected]>
Sent: Friday, March 17, 2023 3:58 PM
To: Mahfooz, Hamza <[email protected]>; Sider, Graham <[email protected]>; [email protected]
Cc: Kuehling, Felix <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: add print for iommu translation mode

Quoted 21 lines

[AMD Official Use Only - General]

Quoted 17 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Hamza Mahfooz
Sent: Friday, March 17, 2023 3:58 PM
To: Sider, Graham <[email protected]>; [email protected]
Cc: Kuehling, Felix <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: add print for iommu translation mode

Quoted 3 lines · Graham Sider

Add log to display whether RAM is direct vs DMA mapped.

If this information is only useful for debugging purposes, please use drm_dbg() instead of pr_info().

It's useful for more than just debug I would say. Just a quick way to grep whether IOMMU is off/pt vs device isolation mode.

Graham

Quoted 12 lines
Quoted 12 lines

Review

Quoted 6 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void

Quoted 4 lines

index 8bba5e6872a1..8797a9523244 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
@@ -3528,8 +3528,12 @@ static void

amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev)

Quoted 8 lines
Quoted 6 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev)

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -1
  	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) {
+		pr_info("RAM is direct mapped to GPU (not traslated by

traslated -> translated

Thanks, my keyboard keeps skipping the on the 'n' key lately :( time for a clean.

Graham

Quoted 13 lines

Kent

Quoted 12 lines

IOMMU)\n");

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev)

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
  		adev->ram_is_direct_mapped = true;
+	} else {
+		pr_info("RAM is DMA mapped to GPU (translated by

IOMMU)\n");

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev) · line 3539

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
+	}
  }
 
  static const struct attribute *amdgpu_dev_attributes[] = {

--
Hamza

#4 lore raw
Quoted 26 lines · Graham

[AMD Official Use Only - General]

Quoted 22 lines

-----Original Message-----
From: Russell, Kent <[email protected]>
Sent: Friday, March 17, 2023 3:58 PM
To: Mahfooz, Hamza <[email protected]>; Sider, Graham <[email protected]>; [email protected]
Cc: Kuehling, Felix <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: add print for iommu translation mode

[AMD Official Use Only - General]

Quoted 10 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Hamza Mahfooz
Sent: Friday, March 17, 2023 3:58 PM
To: Sider, Graham <[email protected]>; [email protected]
Cc: Kuehling, Felix <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: add print for iommu translation mode

Quoted 7 lines
Quoted 6 lines
Quoted 6 lines · Graham Sider
Quoted 3 lines

Add log to display whether RAM is direct vs DMA mapped.

If this information is only useful for debugging purposes, please use drm_dbg() instead of pr_info().

It's useful for more than just debug I would say. Just a quick way to grep whether IOMMU is off/pt vs device isolation mode.

I agree. The kernel log otherwise tells you the default IOMMU domain, but it may not match the domain actually used for the GPU. Without this message there is no easy way to tell from a kernel log. This will help with triaging issues from logs provided by external and internal users.

Quoted 14 lines

Graham

Quoted 11 lines
Quoted 11 lines

Review

Quoted 5 lines
---
   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++++-
   1 file changed, 5 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void

Quoted 4 lines

index 8bba5e6872a1..8797a9523244 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
@@ -3528,8 +3528,12 @@ static void

amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev)

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev)

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -1
   	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) {
+		pr_info("RAM is direct mapped to GPU (not traslated by

Use dev_info. That way you can tell which GPU the message applies to in a multi-GPU system.

Regards,
  Felix

Quoted 18 lines
Quoted 2 lines

traslated -> translated

Thanks, my keyboard keeps skipping the on the 'n' key lately :( time for a clean.

Graham

Quoted 12 lines

Kent

Quoted 11 lines

IOMMU)\n");

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev)

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
   		adev->ram_is_direct_mapped = true;
+	} else {
+		pr_info("RAM is DMA mapped to GPU (translated by

IOMMU)\n");

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev) · line 3539

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
+	}
   }
 
   static const struct attribute *amdgpu_dev_attributes[] = {

--
Hamza

#5 lore raw

[Public]

Quoted 69 lines

-----Original Message-----
From: Kuehling, Felix <[email protected]>
Sent: Friday, March 17, 2023 5:16 PM
To: Sider, Graham <[email protected]>; Russell, Kent <[email protected]>; Mahfooz, Hamza <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: add print for iommu translation mode

Quoted 27 lines · Graham

[AMD Official Use Only - General]

Quoted 23 lines

-----Original Message-----
From: Russell, Kent <[email protected]>
Sent: Friday, March 17, 2023 3:58 PM
To: Mahfooz, Hamza <[email protected]>; Sider, Graham <[email protected]>; [email protected]
Cc: Kuehling, Felix <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: add print for iommu translation mode

[AMD Official Use Only - General]

Quoted 11 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Hamza Mahfooz
Sent: Friday, March 17, 2023 3:58 PM
To: Sider, Graham <[email protected]>; [email protected]
Cc: Kuehling, Felix <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: add print for iommu translation mode

Quoted 8 lines
Quoted 7 lines
Quoted 7 lines · Graham Sider
Quoted 3 lines

Add log to display whether RAM is direct vs DMA mapped.

If this information is only useful for debugging purposes, please use
drm_dbg() instead of pr_info().

It's useful for more than just debug I would say. Just a quick way to grep

whether IOMMU is off/pt vs device isolation mode.

I agree. The kernel log otherwise tells you the default IOMMU domain, but it may not match the domain actually used for the GPU. Without this message there is no easy way to tell from a kernel log. This will help with triaging issues from logs provided by external and internal users.

Quoted 14 lines

Graham

Quoted 11 lines
Quoted 11 lines

Review

Quoted 5 lines
---
   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++++-
   1 file changed, 5 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void

Quoted 4 lines

index 8bba5e6872a1..8797a9523244 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
@@ -3528,8 +3528,12 @@ static void

amdgpu_device_check_iommu_direct_map(struct amdgpu_device

*adev)

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
   	struct iommu_domain *domain;
 
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev)

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -1
   	domain = iommu_get_domain_for_dev(adev->dev);
-	if (!domain || domain->type == IOMMU_DOMAIN_IDENTITY)
+	if (!domain || domain->type == IOMMU_DOMAIN_IDENTITY) {
+		pr_info("RAM is direct mapped to GPU (not traslated by

Use dev_info. That way you can tell which GPU the message applies to in a multi-GPU system.

Good point - will do that. Thanks!

Graham

Quoted 23 lines

Regards,
  Felix

Quoted 3 lines
Quoted 2 lines

traslated -> translated

Thanks, my keyboard keeps skipping the on the 'n' key lately :( time for a

clean.

Quoted 15 lines

Graham

Quoted 12 lines

Kent

Quoted 11 lines

IOMMU)\n");

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev)

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
   		adev->ram_is_direct_mapped = true;
+	} else {
+		pr_info("RAM is DMA mapped to GPU (translated by

IOMMU)\n");

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev) · line 3539

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
+	}
   }
 
   static const struct attribute *amdgpu_dev_attributes[] = {

--
Hamza

#6 lore raw
In reply to Sider, Graham

Am 17.03.23 um 21:04 schrieb Sider, Graham:

Quoted 26 lines

[AMD Official Use Only - General]

Quoted 22 lines

-----Original Message-----
From: Russell, Kent <[email protected]>
Sent: Friday, March 17, 2023 3:58 PM
To: Mahfooz, Hamza <[email protected]>; Sider, Graham <[email protected]>; [email protected]
Cc: Kuehling, Felix <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: add print for iommu translation mode

[AMD Official Use Only - General]

Quoted 10 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Hamza Mahfooz
Sent: Friday, March 17, 2023 3:58 PM
To: Sider, Graham <[email protected]>; [email protected]
Cc: Kuehling, Felix <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: add print for iommu translation mode

Quoted 7 lines
Quoted 6 lines
Quoted 6 lines · Graham Sider
Quoted 3 lines

Add log to display whether RAM is direct vs DMA mapped.

If this information is only useful for debugging purposes, please use drm_dbg() instead of pr_info().

It's useful for more than just debug I would say. Just a quick way to grep whether IOMMU is off/pt vs device isolation mode.

Mhm, shouldn't the IOMMU code note that as well?

Christian.

Quoted 38 lines

Graham

Quoted 11 lines
Quoted 11 lines

Review

Quoted 5 lines
---
   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++++-
   1 file changed, 5 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void

Quoted 4 lines

index 8bba5e6872a1..8797a9523244 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
@@ -3528,8 +3528,12 @@ static void

amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev)

Quoted 8 lines
Quoted 6 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev)

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -1
   	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) {
+		pr_info("RAM is direct mapped to GPU (not traslated by

traslated -> translated

Thanks, my keyboard keeps skipping the on the 'n' key lately :( time for a clean.

Graham

Quoted 12 lines

Kent

Quoted 11 lines

IOMMU)\n");

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev)

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
   		adev->ram_is_direct_mapped = true;
+	} else {
+		pr_info("RAM is DMA mapped to GPU (translated by

IOMMU)\n");

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev) · line 3539

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
+	}
   }
 
   static const struct attribute *amdgpu_dev_attributes[] = {

--
Hamza

#7 lore raw

[Public]

Quoted 44 lines

-----Original Message-----
From: Christian König <[email protected]>
Sent: Tuesday, March 21, 2023 2:53 PM
To: Sider, Graham <[email protected]>; Russell, Kent <[email protected]>; Mahfooz, Hamza <[email protected]>; [email protected]
Cc: Kuehling, Felix <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: add print for iommu translation mode

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.

Am 17.03.23 um 21:04 schrieb Sider, Graham:

Quoted 30 lines

[AMD Official Use Only - General]

Quoted 26 lines

-----Original Message-----
From: Russell, Kent <[email protected]>
Sent: Friday, March 17, 2023 3:58 PM
To: Mahfooz, Hamza <[email protected]>; Sider, Graham <[email protected]>; [email protected]
Cc: Kuehling, Felix <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: add print for iommu translation mode

[AMD Official Use Only - General]

Quoted 14 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Hamza Mahfooz
Sent: Friday, March 17, 2023 3:58 PM
To: Sider, Graham <[email protected]>; [email protected]
Cc: Kuehling, Felix <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: add print for iommu translation mode

Quoted 2 lines · Graham Sider

Add log to display whether RAM is direct vs DMA mapped.

Quoted 9 lines
Quoted 5 lines
Quoted 4 lines
Quoted 4 lines
Quoted 1 line

If this information is only useful for debugging purposes, please use
drm_dbg() instead of pr_info().

It's useful for more than just debug I would say. Just a quick way to grep

whether IOMMU is off/pt vs device isolation mode.

Mhm, shouldn't the IOMMU code note that as well?

As of right now, not exactly. Copy-pasting Felix's comment here:

The kernel log [currently] tells you the default IOMMU domain, but it may not match the domain actually used for the GPU. Without this message there is no easy way to tell from a kernel log. This will help with triaging issues from logs provided by external and internal users.

Graham

Quoted 43 lines

Christian.

Quoted 14 lines

Graham

Quoted 11 lines
Quoted 11 lines

Review

Quoted 5 lines
---
   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++++-
   1 file changed, 5 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void

Quoted 4 lines

index 8bba5e6872a1..8797a9523244 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
@@ -3528,8 +3528,12 @@ static void

amdgpu_device_check_iommu_direct_map(struct amdgpu_device

*adev)

Quoted 9 lines
Quoted 8 lines
Quoted 6 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev)

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -1
           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) {
+          pr_info("RAM is direct mapped to GPU (not traslated by

traslated -> translated

Thanks, my keyboard keeps skipping the on the 'n' key lately :( time for a

clean.

Quoted 15 lines

Graham

Quoted 12 lines

Kent

Quoted 11 lines

IOMMU)\n");

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev)

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
                   adev->ram_is_direct_mapped = true;
+  } else {
+          pr_info("RAM is DMA mapped to GPU (translated by

IOMMU)\n");

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev) · line 3539

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
+  }
   }
 
   static const struct attribute *amdgpu_dev_attributes[] = {

--
Hamza