From: Chris Wilson Date: Fri, 14 Aug 2015 11:59:19 +0000 (+0100) Subject: drm/i915: Flag the execlists context object as dirty after every use X-Git-Tag: v4.1.7~20 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=8de8663a93eee38e82bcdd511d2b4f9e99de02a0;p=users%2Fjedix%2Flinux-maple.git drm/i915: Flag the execlists context object as dirty after every use commit 903ecd0bb970438c3a60c2c33ec9032d6443bf67 upstream. Everytime we use the logical context with execlists it becomes dirty (as the hardware will write the new register values afterwards, as well as the GPU state that will be used). We need to then flag the context as dirty everytime since after a swap-out/swap-in cycle the dirty flag will be cleared, and a further swap-out cycle will then loose the most recent GPU state. Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 424e621977871..9ab7c1c758aeb 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -848,6 +848,8 @@ static int intel_lr_context_pin(struct intel_engine_cs *ring, ret = intel_pin_and_map_ringbuffer_obj(ring->dev, ringbuf); if (ret) goto unpin_ctx_obj; + + ctx_obj->dirty = true; } return ret;