Skip to contentSkip to conversation

drm/i915/gem: Remove gpu reloc workaround

PATCH In review Thomas Hellström 3 participants 3 messages Oct 27, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/gem: Remove gpu reloc workaround

GPU relocs are gone. There should be no need for this workaround anymore. Remove it.

---
 .../gpu/drm/i915/gem/i915_gem_execbuffer.c    | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +1 -18
index 1231224728e4..04af88e6d453 100644
@@ -1327,7 +1327,6 @@ eb_relocate_entry(struct i915_execbuffer *eb,
 {
 	struct drm_i915_private *i915 = eb->i915;
 	struct eb_vma *target;
-	int err;
 
 	/* we've already hold a reference to all valid objects */
 	target = eb_get_vma(eb, reloc->target_handle);
@@ -1357,25 +1356,9 @@ eb_relocate_entry(struct i915_execbuffer *eb,
 		return -EINVAL;
 	}
 
-	if (reloc->write_domain) {
+	if (reloc->write_domain)
 		target->flags |= EXEC_OBJECT_WRITE;
 
-		/*
-		 * Sandybridge PPGTT errata: We need a global gtt mapping
-		 * for MI and pipe_control writes because the gpu doesn't
-		 * properly redirect them through the ppgtt for non_secure
-		 * batchbuffers.
-		 */
-		if (reloc->write_domain == I915_GEM_DOMAIN_INSTRUCTION &&
-		    GRAPHICS_VER(eb->i915) == 6) {
-			err = i915_vma_bind(target->vma,
-					    target->vma->obj->cache_level,
-					    PIN_GLOBAL, NULL);
-			if (err)
-				return err;
-		}
-	}
-
 	/*
 	 * If the relocation already has the right value in it, no
 	 * more work needs to be done.
Signature · 1 line
2.31.1
#1 lore raw
Quoted 5 lines · Thomas Hellström

GPU relocs are gone. There should be no need for this workaround anymore. Remove it.

I was completely wrong here, sorry. Digging through the git history it looks like this came from:

Commit 149c84077fe717af883bae459623ef1cebd86388

Author: Daniel Vetter <[email protected]>
Date:   Wed Feb 15 23:50:23 2012 +0100

drm/i915: implement SNB workaround for lazy global gtt

PIPE_CONTROL on snb needs global gtt mappings in place to workaround a hw gotcha. No other commands need such a workaround. Luckily we can detect a PIPE_CONTROL commands easily because they have a write_domain = I915_GEM_DOMAIN_INSTRUCTION (and nothing else has that).

so it looks to be unrelated to GPU relocs, which AFAIK didn't exist at the time. I just saw the MI comment and assumed it was talking about the MI_STORE_DWORD...

Quoted 46 lines
---
 .../gpu/drm/i915/gem/i915_gem_execbuffer.c    | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +1 -19
index 1231224728e4..04af88e6d453 100644
@@ -1327,7 +1327,6 @@ eb_relocate_entry(struct i915_execbuffer *eb,
 {
        struct drm_i915_private *i915 = eb->i915;
        struct eb_vma *target;
-       int err;
 
        /* we've already hold a reference to all valid objects */
        target = eb_get_vma(eb, reloc->target_handle);
@@ -1357,25 +1356,9 @@ eb_relocate_entry(struct i915_execbuffer *eb,
                return -EINVAL;
        }
 
-       if (reloc->write_domain) {
+       if (reloc->write_domain)
                target->flags |= EXEC_OBJECT_WRITE;
 
-               /*
-                * Sandybridge PPGTT errata: We need a global gtt mapping
-                * for MI and pipe_control writes because the gpu doesn't
-                * properly redirect them through the ppgtt for non_secure
-                * batchbuffers.
-                */
-               if (reloc->write_domain == I915_GEM_DOMAIN_INSTRUCTION &&
-                   GRAPHICS_VER(eb->i915) == 6) {
-                       err = i915_vma_bind(target->vma,
-                                           target->vma->obj->cache_level,
-                                           PIN_GLOBAL, NULL);
-                       if (err)
-                               return err;
-               }
-       }
-
        /*
         * If the relocation already has the right value in it, no
         * more work needs to be done.
--

2.31.1

#2 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/gem: Remove gpu reloc workaround

In reply to Thomas Hellström
== Series Details ==

== Series Details ==

Series: drm/i915/gem: Remove gpu reloc workaround
URL : https://patchwork.freedesktop.org/series/96333/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10795 -> Patchwork_21457
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes introduced in Patchwork_21457, please notify your bug team 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_21457/index.html

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

Additional (2): fi-tgl-1115g4 fi-icl-u2
Missing (5): bat-dg1-6 bat-dg1-5 fi-bsw-cyan bat-adlp-4 fi-pnv-d510

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@workarounds:
- fi-rkl-guc: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10795/fi-rkl-guc/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-rkl-guc/igt@i915_selftest@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_basic@query-info:
- fi-tgl-1115g4: NOTRUN -> [SKIP][3] ([fdo#109315])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-tgl-1115g4/igt@amdgpu/[email protected]

* igt@amdgpu/amd_cs_nop@fork-gfx0:
- fi-icl-u2: NOTRUN -> [SKIP][4] ([fdo#109315]) +17 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-icl-u2/igt@amdgpu/[email protected]

* igt@amdgpu/amd_cs_nop@nop-gfx0:
- fi-tgl-1115g4: NOTRUN -> [SKIP][5] ([fdo#109315] / [i915#2575]) +16 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-tgl-1115g4/igt@amdgpu/[email protected]

* igt@gem_huc_copy@huc-copy:
- fi-tgl-1115g4: NOTRUN -> [SKIP][6] ([i915#2190])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-tgl-1115g4/igt@[email protected]
- fi-icl-u2: NOTRUN -> [SKIP][7] ([i915#2190])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-icl-u2/igt@[email protected]

* igt@i915_pm_backlight@basic-brightness:
- fi-tgl-1115g4: NOTRUN -> [SKIP][8] ([i915#1155])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-tgl-1115g4/igt@[email protected]

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-tgl-1115g4: NOTRUN -> [SKIP][9] ([fdo#111827]) +8 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-tgl-1115g4/igt@[email protected]

* igt@kms_chamelium@dp-crc-fast:
- fi-bsw-nick: NOTRUN -> [SKIP][10] ([fdo#109271] / [fdo#111827]) +8 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-bsw-nick/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-icl-u2: NOTRUN -> [SKIP][11] ([fdo#111827]) +8 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-icl-u2/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-tgl-1115g4: NOTRUN -> [SKIP][12] ([i915#4103]) +1 similar issue
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-tgl-1115g4/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- fi-icl-u2: NOTRUN -> [SKIP][13] ([fdo#109278]) +2 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-icl-u2/igt@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- fi-tgl-1115g4: NOTRUN -> [SKIP][14] ([fdo#109285])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-tgl-1115g4/igt@[email protected]
- fi-icl-u2: NOTRUN -> [SKIP][15] ([fdo#109285])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-icl-u2/igt@[email protected]

* igt@kms_frontbuffer_tracking@basic:
- fi-cml-u2: [PASS][16] -> [DMESG-WARN][17] ([i915#4269])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10795/fi-cml-u2/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-cml-u2/igt@[email protected]

* igt@kms_psr@primary_mmap_gtt:
- fi-tgl-1115g4: NOTRUN -> [SKIP][18] ([i915#1072]) +3 similar issues
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-tgl-1115g4/igt@kms_psr@primary_mmap_gtt.html

* igt@prime_vgem@basic-fence-flip:
- fi-bsw-nick: NOTRUN -> [SKIP][19] ([fdo#109271]) +57 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-bsw-nick/igt@[email protected]

* igt@prime_vgem@basic-userptr:
- fi-icl-u2: NOTRUN -> [SKIP][20] ([i915#3301])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-icl-u2/igt@[email protected]
- fi-tgl-1115g4: NOTRUN -> [SKIP][21] ([i915#3301])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-tgl-1115g4/igt@[email protected]

* igt@runner@aborted:
- fi-rkl-guc: NOTRUN -> [FAIL][22] ([i915#2426] / [i915#3928] / [i915#4312])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-rkl-guc/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s3:
- fi-bsw-nick: [INCOMPLETE][23] ([i915#2369] / [i915#3159]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10795/fi-bsw-nick/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-bsw-nick/igt@[email protected]

* igt@kms_frontbuffer_tracking@basic:
- fi-cfl-8109u: [DMESG-FAIL][25] ([i915#295]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10795/fi-cfl-8109u/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-cfl-8109u/igt@[email protected]

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b:
- fi-cfl-8109u: [DMESG-WARN][27] ([i915#295]) -> [PASS][28] +10 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10795/fi-cfl-8109u/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21457/fi-cfl-8109u/igt@[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
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2369]: https://gitlab.freedesktop.org/drm/intel/issues/2369
[i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#295]: https://gitlab.freedesktop.org/drm/intel/issues/295
[i915#3159]: https://gitlab.freedesktop.org/drm/intel/issues/3159
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3303]: https://gitlab.freedesktop.org/drm/intel/issues/3303
[i915#3928]: https://gitlab.freedesktop.org/drm/intel/issues/3928
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4269]: https://gitlab.freedesktop.org/drm/intel/issues/4269
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312

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

* Linux: CI_DRM_10795 -> Patchwork_21457

CI-20190529: 20190529
CI_DRM_10795: 59f3569eebe53403249227d476e81d09c63c0f0c @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6262: d1c793b26e31cc6ae3f9fa3239805a9bbcc749fb @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_21457: 3508936c9378cc0406fcd0e175c066dac89dfc0b @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

3508936c9378 drm/i915/gem: Remove gpu reloc workaround

== Logs ==

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