File 1015-drm-i915-gpu-reset-oops-fix.patch of Package drm.openSUSE_Leap_42.3_Update
---
drivers/gpu/drm/i915/intel_lrc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1308,14 +1308,14 @@ static void reset_common_ring(struct int
/* Catch up with any missed context-switch interrupts */
I915_WRITE(RING_CONTEXT_STATUS_PTR(engine), _MASKED_FIELD(0xffff, 0));
- if (request->ctx != port[0].request->ctx) {
+ if (port[0].request && request->ctx != port[0].request->ctx) {
i915_gem_request_put(port[0].request);
port[0] = port[1];
memset(&port[1], 0, sizeof(port[1]));
}
/* CS is stopped, and we will resubmit both ports on resume */
- GEM_BUG_ON(request->ctx != port[0].request->ctx);
+ GEM_BUG_ON(port[0].request && request->ctx != port[0].request->ctx);
port[0].count = 0;
port[1].count = 0;