Skip to content

Commit 9721634

Browse files
author
Andi Shyti
committed
drm/i915/gt: Limit the reserved VM space to only the platforms that need it
Commit 9bb66c1 ("drm/i915: Reserve some kernel space per vm") reduces the available VM space of one page in order to apply Wa_16018031267 and Wa_16018063123. This page was reserved indiscrimitely in all platforms even when not needed. Limit it to DG2 onwards. Fixes: 9bb66c1 ("drm/i915: Reserve some kernel space per vm") Signed-off-by: Andi Shyti <[email protected]> Cc: Andrzej Hajda <[email protected]> Cc: Chris Wilson <[email protected]> Cc: Jonathan Cavitt <[email protected]> Cc: Nirmoy Das <[email protected]> Reviewed-by: Nirmoy Das <[email protected]> Acked-by: Michal Mrozek <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 98850e9 commit 9721634

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

drivers/gpu/drm/i915/gt/gen8_ppgtt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,9 @@ static int gen8_init_rsvd(struct i915_address_space *vm)
961961
struct i915_vma *vma;
962962
int ret;
963963

964+
if (!intel_gt_needs_wa_16018031267(vm->gt))
965+
return 0;
966+
964967
/* The memory will be used only by GPU. */
965968
obj = i915_gem_object_create_lmem(i915, PAGE_SIZE,
966969
I915_BO_ALLOC_VOLATILE |

drivers/gpu/drm/i915/gt/intel_gt.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,12 @@ enum i915_map_type intel_gt_coherent_map_type(struct intel_gt *gt,
10241024
return I915_MAP_WC;
10251025
}
10261026

1027+
bool intel_gt_needs_wa_16018031267(struct intel_gt *gt)
1028+
{
1029+
/* Wa_16018031267, Wa_16018063123 */
1030+
return IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 55), IP_VER(12, 71));
1031+
}
1032+
10271033
bool intel_gt_needs_wa_22016122933(struct intel_gt *gt)
10281034
{
10291035
return MEDIA_VER_FULL(gt->i915) == IP_VER(13, 0) && gt->type == GT_MEDIA;

drivers/gpu/drm/i915/gt/intel_gt.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,18 @@ struct drm_printer;
8282
##__VA_ARGS__); \
8383
} while (0)
8484

85-
#define NEEDS_FASTCOLOR_BLT_WABB(engine) ( \
86-
IS_GFX_GT_IP_RANGE(engine->gt, IP_VER(12, 55), IP_VER(12, 71)) && \
87-
engine->class == COPY_ENGINE_CLASS && engine->instance == 0)
88-
8985
static inline bool gt_is_root(struct intel_gt *gt)
9086
{
9187
return !gt->info.id;
9288
}
9389

90+
bool intel_gt_needs_wa_16018031267(struct intel_gt *gt);
9491
bool intel_gt_needs_wa_22016122933(struct intel_gt *gt);
9592

93+
#define NEEDS_FASTCOLOR_BLT_WABB(engine) ( \
94+
intel_gt_needs_wa_16018031267(engine->gt) && \
95+
engine->class == COPY_ENGINE_CLASS && engine->instance == 0)
96+
9697
static inline struct intel_gt *uc_to_gt(struct intel_uc *uc)
9798
{
9899
return container_of(uc, struct intel_gt, uc);

0 commit comments

Comments
 (0)