Skip to content

Commit 4f2c733

Browse files
committed
drm/i915: Determine uses-full-ppgtt from context for execbuf
Rather than inspect the global module parameter for whether full-ppgtt maybe enabled, we can inspect the context directly as to whether it has its own vm. Signed-off-by: Chris Wilson <[email protected]> Cc: Tvrtko Ursulin <[email protected]> Cc: Bob Paauwe <[email protected]> Cc: Rodrigo Vivi <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 48e9050 commit 4f2c733

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

drivers/gpu/drm/i915/i915_gem_execbuffer.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,12 @@ static int eb_select_context(struct i915_execbuffer *eb)
735735
return -ENOENT;
736736

737737
eb->ctx = ctx;
738-
eb->vm = ctx->ppgtt ? &ctx->ppgtt->vm : &eb->i915->ggtt.vm;
738+
if (ctx->ppgtt) {
739+
eb->vm = &ctx->ppgtt->vm;
740+
eb->invalid_flags |= EXEC_OBJECT_NEEDS_GTT;
741+
} else {
742+
eb->vm = &eb->i915->ggtt.vm;
743+
}
739744

740745
eb->context_flags = 0;
741746
if (ctx->flags & CONTEXT_NO_ZEROMAP)
@@ -2201,8 +2206,6 @@ i915_gem_do_execbuffer(struct drm_device *dev,
22012206
eb.flags = (unsigned int *)(eb.vma + args->buffer_count + 1);
22022207

22032208
eb.invalid_flags = __EXEC_OBJECT_UNKNOWN_FLAGS;
2204-
if (USES_FULL_PPGTT(eb.i915))
2205-
eb.invalid_flags |= EXEC_OBJECT_NEEDS_GTT;
22062209
reloc_cache_init(&eb.reloc_cache, eb.i915);
22072210

22082211
eb.buffer_count = args->buffer_count;

0 commit comments

Comments
 (0)