@@ -306,7 +306,8 @@ i915_gem_create_context(struct drm_device *dev,
}
ctx->ppgtt = ppgtt;
- }
+ } else
+ ctx->ppgtt = to_i915(dev)->mm.aliasing_ppgtt;
trace_i915_context_create(ctx);
@@ -2363,15 +2363,11 @@ populate_lr_context(struct intel_context *ctx, struct drm_i915_gem_object *ctx_o
struct intel_ringbuffer *ringbuf)
{
struct drm_device *dev = engine->dev;
- struct drm_i915_private *dev_priv = dev->dev_private;
struct i915_hw_ppgtt *ppgtt = ctx->ppgtt;
struct page *page;
uint32_t *reg_state;
int ret;
- if (!ppgtt)
- ppgtt = dev_priv->mm.aliasing_ppgtt;
-
ret = i915_gem_object_set_to_cpu_domain(ctx_obj, true);
if (ret) {
DRM_DEBUG_DRIVER("Could not set to CPU domain\n");
In populate_lr_context(), if the ctx->ppgtt == NULL, then it will populate the PDPs with aliasing PPGTT. This patch will directly set the ctx->ppgtt to aliasing PPGTT if full PPGTT mode isn't enabled when creating a context. Signed-off-by: Zhi Wang <zhi.a.wang@intel.com> --- drivers/gpu/drm/i915/i915_gem_context.c | 3 ++- drivers/gpu/drm/i915/intel_lrc.c | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-)