Commit 2d965536 authored by Thomas Daniel's avatar Thomas Daniel Committed by Daniel Vetter

drm/i915/bdw: Populate lrc with aliasing ppgtt if required

A previous commit broke aliasing PPGTT for lrc, resulting in a kernel oops
on boot. Add a check so that is full PPGTT is not in use the context is
populated with the aliasing PPGTT.

Issue: VIZ-4278
Signed-off-by: default avatarThomas Daniel <thomas.daniel@intel.com>
Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent d84a0f32
...@@ -1452,12 +1452,17 @@ static int ...@@ -1452,12 +1452,17 @@ static int
populate_lr_context(struct intel_context *ctx, struct drm_i915_gem_object *ctx_obj, populate_lr_context(struct intel_context *ctx, struct drm_i915_gem_object *ctx_obj,
struct intel_engine_cs *ring, struct intel_ringbuffer *ringbuf) struct intel_engine_cs *ring, struct intel_ringbuffer *ringbuf)
{ {
struct drm_device *dev = ring->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_i915_gem_object *ring_obj = ringbuf->obj; struct drm_i915_gem_object *ring_obj = ringbuf->obj;
struct i915_hw_ppgtt *ppgtt = ctx->ppgtt; struct i915_hw_ppgtt *ppgtt = ctx->ppgtt;
struct page *page; struct page *page;
uint32_t *reg_state; uint32_t *reg_state;
int ret; int ret;
if (!ppgtt)
ppgtt = dev_priv->mm.aliasing_ppgtt;
ret = i915_gem_object_set_to_cpu_domain(ctx_obj, true); ret = i915_gem_object_set_to_cpu_domain(ctx_obj, true);
if (ret) { if (ret) {
DRM_DEBUG_DRIVER("Could not set to CPU domain\n"); DRM_DEBUG_DRIVER("Could not set to CPU domain\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment