We have established previously we stop using relocations starting
from gen12 platforms with Tigerlake as an exception. Unfortunately
we need extend transition period and support relocations for two
other igfx platforms - Rocketlake and Alderlake.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczyn...@intel.com>
Cc: Dave Airlie <airl...@redhat.com>
Cc: Daniel Vetter <daniel.vet...@intel.com>
Cc: Jason Ekstrand <ja...@jlekstrand.net>
---
 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c 
b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
index 297143511f99..f80da1d6d9b2 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -496,11 +496,15 @@ eb_validate_vma(struct i915_execbuffer *eb,
                struct drm_i915_gem_exec_object2 *entry,
                struct i915_vma *vma)
 {
-       /* Relocations are disallowed for all platforms after TGL-LP.  This
-        * also covers all platforms with local memory.
+       /*
+        * Relocations are disallowed starting from gen12 with some exceptions
+        * - TGL/RKL/ADL.
         */
        if (entry->relocation_count &&
-           INTEL_GEN(eb->i915) >= 12 && !IS_TIGERLAKE(eb->i915))
+           INTEL_GEN(eb->i915) >= 12 && !(IS_TIGERLAKE(eb->i915) ||
+                                          IS_ROCKETLAKE(eb->i915) ||
+                                          IS_ALDERLAKE_S(eb->i915) ||
+                                          IS_ALDERLAKE_P(eb->i915)))
                return -EINVAL;
 
        if (unlikely(entry->flags & eb->invalid_flags))
-- 
2.26.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to