Skip to contentSkip to conversation

iommu/vt-d: Remove INTEL_IOMMU_BROKEN_GFX_WA

PATCH In review Lu Baolu 3 participants 5 messages Jan 30, 2024 – Feb 26, 2024

Subsystems (2)
lore
Share & tools
lore

Lu Baolu

author maintainer
#0 lore raw

PATCH v2 1/1 iommu/vt-d: Remove INTEL_IOMMU_BROKEN_GFX_WA

Commit 62edf5dc4a524 ("intel-iommu: Restore DMAR_BROKEN_GFX_WA option for broken graphics drivers") was introduced 24 years ago as a temporary workaround for graphics drivers that used physical addresses for DMA and avoided DMA APIs. This workaround was disabled by default.

As 24 years have passed, it is expected that graphics driver developers have migrated their drivers to use kernel DMA APIs. Therefore, this workaround is no longer required and could been removed.

The Intel iommu driver also provides a "igfx_off" option to turn off the DAM translation for the graphic dedicated IOMMU. Hence, there is really no good reason to keep this config option.

---
 drivers/iommu/intel/iommu.c |  4 ----
 drivers/iommu/intel/Kconfig | 11 -----------
 2 files changed, 15 deletions(-)

Change log:
v2:
- Add igfx_off option to commit message and Cc Intel graphic maintainers.

v1: https://lore.kernel.org/linux-iommu/[email protected]/

drivers/iommu/intel/iommu.c +0 -4
index 6fb5f6fceea1..fc52fcd786aa 100644
@@ -2660,10 +2660,6 @@ static int __init init_dmars(void)
 		iommu_set_root_entry(iommu);
 	}
 
-#ifdef CONFIG_INTEL_IOMMU_BROKEN_GFX_WA
-	dmar_map_gfx = 0;
-#endif
-
 	if (!dmar_map_gfx)
 		iommu_identity_mapping |= IDENTMAP_GFX;
 
drivers/iommu/intel/Kconfig +0 -11
index 012cd2541a68..d2d34eb28d94 100644
@@ -64,17 +64,6 @@ config INTEL_IOMMU_DEFAULT_ON
 	  one is found. If this option is not selected, DMAR support can
 	  be enabled by passing intel_iommu=on to the kernel.
 
-config INTEL_IOMMU_BROKEN_GFX_WA
-	bool "Workaround broken graphics drivers (going away soon)"
-	depends on BROKEN && X86
-	help
-	  Current Graphics drivers tend to use physical address
-	  for DMA and avoid using DMA APIs. Setting this config
-	  option permits the IOMMU driver to set a unity map for
-	  all the OS-visible memory. Hence the driver can continue
-	  to use physical addresses for DMA, at least until this
-	  option is removed in the 2.6.32 kernel.
-
 config INTEL_IOMMU_FLOPPY_WA
 	def_bool y
 	depends on X86
Signature · 1 line
2.34.1
#1 lore raw
Quoted 9 lines

From: Lu Baolu <[email protected]>
Sent: Tuesday, January 30, 2024 2:08 PM

Commit 62edf5dc4a524 ("intel-iommu: Restore DMAR_BROKEN_GFX_WA option for
broken graphics drivers") was introduced 24 years ago as a temporary workaround for graphics drivers that used physical addresses for DMA and avoided DMA APIs. This workaround was disabled by default.

Quoted 8 lines

As 24 years have passed, it is expected that graphics driver developers have migrated their drivers to use kernel DMA APIs. Therefore, this workaround is no longer required and could been removed.

The Intel iommu driver also provides a "igfx_off" option to turn off the DAM translation for the graphic dedicated IOMMU. Hence, there is really no good reason to keep this config option.

s/DAM/DMA/

author maintainer
#2 lore raw
Quoted 13 lines · Kevin
Quoted 13 lines

From: Lu Baolu <[email protected]>
Sent: Tuesday, January 30, 2024 2:08 PM

Commit 62edf5dc4a524 ("intel-iommu: Restore DMAR_BROKEN_GFX_WA option for
broken graphics drivers") was introduced 24 years ago as a temporary workaround for graphics drivers that used physical addresses for DMA and avoided DMA APIs. This workaround was disabled by default.

As 24 years have passed, it is expected that graphics driver developers have migrated their drivers to use kernel DMA APIs. Therefore, this workaround is no longer required and could been removed.

Quoted 6 lines
Quoted 4 lines

The Intel iommu driver also provides a "igfx_off" option to turn off the DAM translation for the graphic dedicated IOMMU. Hence, there is really no good reason to keep this config option.

s/DAM/DMA/

Fixed. :-)

Best regards,
baolu

#3 lore raw

✗ Fi.CI.BAT: failure for series starting with [v2,1/1] iommu/vt-d: Remove INTEL_IOMMU_BROKEN_GFX_WA

In reply to Lu Baolu
== Series Details ==

== Series Details ==

Series: series starting with [v2,1/1] iommu/vt-d: Remove INTEL_IOMMU_BROKEN_GFX_WA
URL : https://patchwork.freedesktop.org/series/129292/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14193 -> Patchwork_129292v1
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_129292v1 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_129292v1, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129292v1/index.html

Participating hosts (34 -> 34)
------------------------------

Additional (1): bat-kbl-2
Missing (1): fi-snb-2520m

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_129292v1:

### IGT changes ###

#### Possible regressions ####

* igt@i915_pm_rpm@module-reload:
- bat-adlm-1: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14193/bat-adlm-1/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129292v1/bat-adlm-1/igt@[email protected]

Known issues
------------

Here are the changes found in Patchwork_129292v1 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@fbdev@info:
- bat-kbl-2: NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#1849])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129292v1/bat-kbl-2/igt@[email protected]

* igt@gem_lmem_swapping@parallel-random-engines:
- bat-kbl-2: NOTRUN -> [SKIP][4] ([fdo#109271]) +35 other tests skip
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129292v1/bat-kbl-2/igt@[email protected]

* igt@i915_selftest@live@gt_pm:
- bat-rpls-2: [PASS][5] -> [DMESG-FAIL][6] ([i915#10010])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14193/bat-rpls-2/igt@i915_selftest@live@gt_pm.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129292v1/bat-rpls-2/igt@i915_selftest@live@gt_pm.html

#### Possible fixes ####

* igt@i915_selftest@live@hangcheck:
- fi-skl-guc: [DMESG-FAIL][7] ([i915#10112]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14193/fi-skl-guc/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129292v1/fi-skl-guc/igt@i915_selftest@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#10010]: https://gitlab.freedesktop.org/drm/intel/issues/10010
[i915#10112]: https://gitlab.freedesktop.org/drm/intel/issues/10112
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849

Build changes
-------------

* Linux: CI_DRM_14193 -> Patchwork_129292v1

CI-20190529: 20190529
CI_DRM_14193: c655e0fd28045dbaa581d04bf7cc266eec1c3457 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7698: af750f5e7eaad98d40d8c924eb5f05e99d3c668b @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_129292v1: c655e0fd28045dbaa581d04bf7cc266eec1c3457 @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

f5d87ca1b135 iommu/vt-d: Remove INTEL_IOMMU_BROKEN_GFX_WA

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129292v1/index.html

author maintainer
#4 lore raw
In reply to Lu Baolu
Quoted 13 lines · Lu Baolu

Commit 62edf5dc4a524 ("intel-iommu: Restore DMAR_BROKEN_GFX_WA option for broken graphics drivers") was introduced 24 years ago as a temporary workaround for graphics drivers that used physical addresses for DMA and avoided DMA APIs. This workaround was disabled by default.

As 24 years have passed, it is expected that graphics driver developers have migrated their drivers to use kernel DMA APIs. Therefore, this workaround is no longer required and could been removed.

The Intel iommu driver also provides a "igfx_off" option to turn off the DAM translation for the graphic dedicated IOMMU. Hence, there is really no good reason to keep this config option.

Quoted 7 lines
---
  drivers/iommu/intel/iommu.c |  4 ----
  drivers/iommu/intel/Kconfig | 11 -----------
  2 files changed, 15 deletions(-)

I have queued this patch for v6.9.

Best regards,
baolu