diff options
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/Kconfig.debug | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 21 |
2 files changed, 25 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug index 47e845353ffa..e7fd3e76f8a2 100644 --- a/drivers/gpu/drm/i915/Kconfig.debug +++ b/drivers/gpu/drm/i915/Kconfig.debug @@ -21,6 +21,14 @@ config DRM_I915_DEBUG depends on DRM_I915 depends on EXPERT # only for developers depends on !COMPILE_TEST # never built by robots + select PCI_MSI # ... for iommu enabled by default + select IOMMU_API + select IOMMU_IOVA + select IOMMU_SUPPORT + select NEED_DMA_MAP_STATE + select DMAR_TABLE + select INTEL_IOMMU + select INTEL_IOMMU_DEFAULT_ON select DEBUG_FS select PREEMPT_COUNT select I2C_CHARDEV @@ -40,6 +48,7 @@ config DRM_I915_DEBUG select DRM_I915_DEBUG_RUNTIME_PM select DRM_I915_SW_FENCE_DEBUG_OBJECTS select DRM_I915_SELFTEST + select BROKEN # for prototype uAPI default n help Choose this option to turn on extra driver debugging that may affect diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c index c0e6712651f3..5ecc85b96a3d 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c @@ -495,16 +495,27 @@ eb_unreserve_vma(struct eb_vma *ev) ev->flags &= ~__EXEC_OBJECT_RESERVED; } +static bool platform_has_relocs_enabled(const struct i915_execbuffer *eb) +{ + /* + * Relocations are disallowed starting from gen12 with Tigerlake + * as an exception. To unblock CI, we are temporarily allowing it + * for Rocketlake and Alderlake. + */ + if (GRAPHICS_VER(eb->i915) < 12 || IS_TIGERLAKE(eb->i915) || + IS_ROCKETLAKE(eb->i915) || IS_ALDERLAKE_S(eb->i915) || + IS_ALDERLAKE_P(eb->i915)) + return true; + + return false; +} + static int 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. - */ - if (entry->relocation_count && - GRAPHICS_VER(eb->i915) >= 12 && !IS_TIGERLAKE(eb->i915)) + if (entry->relocation_count && !platform_has_relocs_enabled(eb)) return -EINVAL; if (unlikely(entry->flags & eb->invalid_flags)) |