Skip to contentSkip to conversation

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

PATCH Applied Thomas Daniel 3 participants 3 messages Aug 19, 2014 – Aug 26, 2014 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 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

---
 drivers/gpu/drm/i915/intel_lrc.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_lrc.c +5 -0
index c096b9b..b54f312 100644
@@ -1452,12 +1452,17 @@ static int
 populate_lr_context(struct intel_context *ctx, struct drm_i915_gem_object *ctx_obj,
 		    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 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");
Signature · 1 line
1.7.9.5
Reviewed-by on v1 1/1
#2 lore raw
Quoted 3 lines · Thomas Daniel

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.

Usually, we add a bit of history to the patch (even for trivial things) something like:

v2: blah blah blah blah

But doesn't really matter much this time.

Signature · 1 line
Damien
Quoted 35 lines

Issue: VIZ-4278

---
 drivers/gpu/drm/i915/intel_lrc.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_lrc.c +5 -0
index c096b9b..b54f312 100644
@@ -1452,12 +1452,17 @@ static int
 populate_lr_context(struct intel_context *ctx, struct drm_i915_gem_object *ctx_obj,
 		    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 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");
Signature · 6 lines
1.7.9.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
Quoted 5 lines · Damien Lespiau
Quoted 3 lines · Thomas Daniel

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.

Quoted 8 lines

Usually, we add a bit of history to the patch (even for trivial things) something like:

v2: blah blah blah blah

But doesn't really matter much this time.

Queued for -next, thanks for the patch.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch