All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Flag the execlists context object as dirty after every use
@ 2015-08-14 11:59 Chris Wilson
  2015-08-14 12:18 ` [Intel-gfx] " Daniel Vetter
  2015-08-16  7:38 ` shuang.he
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2015-08-14 11:59 UTC (permalink / raw)
  To: intel-gfx; +Cc: Chris Wilson, stable

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>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/i915/intel_lrc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 138964afd187..41cfa6fa909d 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1013,6 +1013,8 @@ static int intel_lr_context_pin(struct drm_i915_gem_request *rq)
 		ret = intel_pin_and_map_ringbuffer_obj(ring->dev, ringbuf);
 		if (ret)
 			goto unpin_ctx_obj;
+
+		ctx_obj->dirty = true;
 	}
 
 	return ret;
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Flag the execlists context object as dirty after every use
  2015-08-14 11:59 [PATCH] drm/i915: Flag the execlists context object as dirty after every use Chris Wilson
@ 2015-08-14 12:18 ` Daniel Vetter
  2015-08-17  7:39   ` Jani Nikula
  2015-08-16  7:38 ` shuang.he
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2015-08-14 12:18 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx, stable

On Fri, Aug 14, 2015 at 12:59:19PM +0100, Chris Wilson wrote:
> 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>
> Cc: stable@vger.kernel.org

Yay for reinventing active tracking I guess, legacy hw ctx has this
already. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-Daniel
> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 138964afd187..41cfa6fa909d 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1013,6 +1013,8 @@ static int intel_lr_context_pin(struct drm_i915_gem_request *rq)
>  		ret = intel_pin_and_map_ringbuffer_obj(ring->dev, ringbuf);
>  		if (ret)
>  			goto unpin_ctx_obj;
> +
> +		ctx_obj->dirty = true;
>  	}
>  
>  	return ret;
> -- 
> 2.5.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: Flag the execlists context object as dirty after every use
  2015-08-14 11:59 [PATCH] drm/i915: Flag the execlists context object as dirty after every use Chris Wilson
  2015-08-14 12:18 ` [Intel-gfx] " Daniel Vetter
@ 2015-08-16  7:38 ` shuang.he
  1 sibling, 0 replies; 4+ messages in thread
From: shuang.he @ 2015-08-16  7:38 UTC (permalink / raw)
  To: shuang.he, julianx.dumez, christophe.sureau, lei.a.liu, intel-gfx, chris

Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 7200
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
ILK                                  302/302              302/302
SNB                                  315/315              315/315
IVB                                  336/336              336/336
BYT                                  283/283              283/283
HSW                                  378/378              378/378
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Flag the execlists context object as dirty after every use
  2015-08-14 12:18 ` [Intel-gfx] " Daniel Vetter
@ 2015-08-17  7:39   ` Jani Nikula
  0 siblings, 0 replies; 4+ messages in thread
From: Jani Nikula @ 2015-08-17  7:39 UTC (permalink / raw)
  To: Daniel Vetter, Chris Wilson; +Cc: intel-gfx, stable

On Fri, 14 Aug 2015, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Fri, Aug 14, 2015 at 12:59:19PM +0100, Chris Wilson wrote:
>> 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>
>> Cc: stable@vger.kernel.org
>
> Yay for reinventing active tracking I guess, legacy hw ctx has this
> already. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Pushed to drm-intel-fixes, thanks for the patch and review.

BR,
Jani.

> -Daniel
>> ---
>>  drivers/gpu/drm/i915/intel_lrc.c | 2 ++
>>  1 file changed, 2 insertions(+)
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
>> index 138964afd187..41cfa6fa909d 100644
>> --- a/drivers/gpu/drm/i915/intel_lrc.c
>> +++ b/drivers/gpu/drm/i915/intel_lrc.c
>> @@ -1013,6 +1013,8 @@ static int intel_lr_context_pin(struct drm_i915_gem_request *rq)
>>  		ret = intel_pin_and_map_ringbuffer_obj(ring->dev, ringbuf);
>>  		if (ret)
>>  			goto unpin_ctx_obj;
>> +
>> +		ctx_obj->dirty = true;
>>  	}
>>  
>>  	return ret;
>> -- 
>> 2.5.0
>> 
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-17  7:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-14 11:59 [PATCH] drm/i915: Flag the execlists context object as dirty after every use Chris Wilson
2015-08-14 12:18 ` [Intel-gfx] " Daniel Vetter
2015-08-17  7:39   ` Jani Nikula
2015-08-16  7:38 ` shuang.he

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.