Skip to content

Commit aa64f8e

Browse files
committed
drm/i915: Add Wa_1209644611:icl,ehl
On gen11 the XY_FAST_COPY_BLT command has some size restrictions on its usage. Although this instruction is mainly used by userspace, i915 also uses it to copy object contents during some selftests, so let's ensure the restrictions are followed. Bspec: 6544 Signed-off-by: Matt Roper <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: José Roberto de Souza <[email protected]>
1 parent 415d126 commit aa64f8e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,17 @@ int i915_gem_object_fill_blt(struct drm_i915_gem_object *obj,
196196
return err;
197197
}
198198

199+
/* Wa_1209644611:icl,ehl */
200+
static bool wa_1209644611_applies(struct drm_i915_private *i915, u32 size)
201+
{
202+
u32 height = size >> PAGE_SHIFT;
203+
204+
if (!IS_GEN(i915, 11))
205+
return false;
206+
207+
return height % 4 == 3 && height <= 8;
208+
}
209+
199210
struct i915_vma *intel_emit_vma_copy_blt(struct intel_context *ce,
200211
struct i915_vma *src,
201212
struct i915_vma *dst)
@@ -237,7 +248,8 @@ struct i915_vma *intel_emit_vma_copy_blt(struct intel_context *ce,
237248
size = min_t(u64, rem, block_size);
238249
GEM_BUG_ON(size >> PAGE_SHIFT > S16_MAX);
239250

240-
if (INTEL_GEN(i915) >= 9) {
251+
if (INTEL_GEN(i915) >= 9 &&
252+
!wa_1209644611_applies(i915, size)) {
241253
*cmd++ = GEN9_XY_FAST_COPY_BLT_CMD | (10 - 2);
242254
*cmd++ = BLT_DEPTH_32 | PAGE_SIZE;
243255
*cmd++ = 0;

0 commit comments

Comments
 (0)