summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-08-14 12:59:19 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-13 09:07:50 -0700
commit8de8663a93eee38e82bcdd511d2b4f9e99de02a0 (patch)
tree045454e6a4ffe9b93d1cfc7b530db76ff325fe2a
parentc407ed50a8f9d0be5839a7af9a4a6e14aea8cb33 (diff)
downloadlwn-8de8663a93eee38e82bcdd511d2b4f9e99de02a0.tar.gz
lwn-8de8663a93eee38e82bcdd511d2b4f9e99de02a0.zip
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 <chris@chris-wilson.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/i915/intel_lrc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 424e62197787..9ab7c1c758ae 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;