Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit 5363e35

Browse files
wegorz76danvet
authored andcommitted
drm/i915: Add relocation exceptions for two other platforms
For topic/intel-for-CI branch only. We have established previously we stop using relocations starting from gen12 platforms with Tigerlake as an exception. We keep this statement but we want to enable relocations conditionally for Alderlake S+P under require_force_probe flag set. Keeping relocations under require_force_probe flag is interim solution until IGTs will be rewritten to use softpin. v2: - remove inline from function definition (Jani) - fix indentation v3: change to GRAPHICS_VER() (Zbigniew) v4: remove RKL from flag as it is already shipped (Rodrigo) v5: prepare patch to be used within topic/intel-for-CI branch only v6: change comment (Rodrigo) Signed-off-by: Zbigniew Kempczyński <[email protected]> Cc: Dave Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Jason Ekstrand <[email protected]> Cc: Rodrigo Vivi <[email protected]> Acked-by: Dave Airlie <[email protected]> Acked-by: Rodrigo Vivi <[email protected]>
1 parent 3b7c1a2 commit 5363e35

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -491,16 +491,27 @@ eb_unreserve_vma(struct eb_vma *ev)
491491
ev->flags &= ~__EXEC_OBJECT_RESERVED;
492492
}
493493

494+
static bool platform_has_relocs_enabled(const struct i915_execbuffer *eb)
495+
{
496+
/*
497+
* Relocations are disallowed starting from gen12 with Tigerlake
498+
* as an exception. To unblock CI, we are temporarily allowing it
499+
* for Rocketlake and Alderlake.
500+
*/
501+
if (GRAPHICS_VER(eb->i915) < 12 || IS_TIGERLAKE(eb->i915) ||
502+
IS_ROCKETLAKE(eb->i915) || IS_ALDERLAKE_S(eb->i915) ||
503+
IS_ALDERLAKE_P(eb->i915))
504+
return true;
505+
506+
return false;
507+
}
508+
494509
static int
495510
eb_validate_vma(struct i915_execbuffer *eb,
496511
struct drm_i915_gem_exec_object2 *entry,
497512
struct i915_vma *vma)
498513
{
499-
/* Relocations are disallowed for all platforms after TGL-LP. This
500-
* also covers all platforms with local memory.
501-
*/
502-
if (entry->relocation_count &&
503-
GRAPHICS_VER(eb->i915) >= 12 && !IS_TIGERLAKE(eb->i915))
514+
if (entry->relocation_count && !platform_has_relocs_enabled(eb))
504515
return -EINVAL;
505516

506517
if (unlikely(entry->flags & eb->invalid_flags))

0 commit comments

Comments
 (0)